Commit 9f561c90 authored by Gerrit Erichsen's avatar Gerrit Erichsen
Browse files

fixing storage config issues

parent 44c0ee0d
......@@ -1266,6 +1266,10 @@ bool CharLGui::configureAlgorithm(CharLAlgorithm * algorithm,
% nVariationsPowerDis)
* config->getStepSizePower2(),
config->getMaxPower2());
qDebug() << "option " << plantOption << " with " << nVariationsCapacity << "and " << nVariationsPowerDis << "results in";
qDebug() << configPower << "MW in a range of " << config->getMinPower() << "to" << config->getMaxPower();
qDebug() << configCapacity << "MW in a range of " << config->getMinCapacity() << "to" << config->getMaxCapacity();
qDebug() << configPowerDis << "MW in a range of " << config->getMinPower2() << "to" << config->getMaxPower2();
if (configPower > 1. && configCapacity > 1.)
{
algorithm->addStoragePlant(nodeIndex, locationIndex, storage->getName().toStdString(),
......
......@@ -272,7 +272,9 @@ QVariant ConfigTableModel::data(const QModelIndex &index, int role) const
}
return m_data[index.row()].getStepSizePower();
case 5:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return m_data[index.row()].getMaxCapacity();
}
......@@ -282,17 +284,42 @@ QVariant ConfigTableModel::data(const QModelIndex &index, int role) const
}
break;
case 6:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return m_data[index.row()].getMinCapacity();
}
break;
case 7:
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return m_data[index.row()].getStepSizeCapacity();
}
break;
case 8:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return m_data[index.row()].getMaxPower2();
}
break;
case 9:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return m_data[index.row()].getMinPower2();
}
break;
case 10:
if (m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
return m_data[index.row()].getStepSizePower2();
}
break;
default:
return QVariant();
}
......@@ -848,6 +875,7 @@ int ConfigTableModel::getNumberOfVariationsForItem(int itemIndex, int entryNo) c
{
variations3++;
}
if (entryNo == 2) return variations3;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment