Commit ef9fbc3b authored by Gerrit Erichsen's avatar Gerrit Erichsen
Browse files

Fixing bug, where the user could not enter max capacity

parent 047fbd38
......@@ -1191,11 +1191,11 @@ bool CharLGui::configureAlgorithm(CharLAlgorithm * algorithm,
else
{
locationIndex = algorithm->createLocation(nodeIndex,
location->getUniqueName().toStdString(),
location->getLatitude(),
location->getLongitude(),
location->getAreaSolar(),
location->getAreaWind());
location->getUniqueName().toStdString(),
location->getLatitude(),
location->getLongitude(),
location->getAreaSolar(),
location->getAreaWind());
m_mapNodesLocations.insert(location, std::pair<size_t, size_t>(nodeIndex, locationIndex));
}
......@@ -1299,24 +1299,26 @@ bool CharLGui::configureAlgorithm(CharLAlgorithm * algorithm,
{
const SolarTableItem * moduleConfig = static_cast<const SolarTableItem *>(m_modelSolar->getItem(config->getSelectedItemProducer()));
const PhotovoltaicTableItem * module = static_cast<const PhotovoltaicTableItem *>(m_modelModulesPV->getItem(moduleConfig->getModuleID()));
algorithm->addPvPlant(nodeIndex, locationIndex, moduleConfig->getName().toStdString(),
std::min(config->getMinPower() + targetOption * config->getStepSizePower(),
config->getMaxPower()),
1.3/*DCtoAC*/, module->getArea(),
module->getTemperatureCoefficient() * 0.01,
module->getPeakMaximumPower(),
module->getMPPVoltage(),
module->getOpenCircuitVoltage(),
module->getShortCircuitCurrent(),
module->getModuleLengthLongSide(),
module->getModuleLengthShortSide(),
module->getPowerCurveIrradiation(), false /*portrait*/,
moduleConfig->getTiltAngle(),
algorithm->addPvPlant(nodeIndex, locationIndex,
moduleConfig->getName().toStdString(),
std::min(config->getMinPower() + targetOption * config->getStepSizePower(),
config->getMaxPower()),
1.3/*DCtoAC*/,
module->getArea(),
module->getTemperatureCoefficient() * 0.01,
module->getPeakMaximumPower(),
module->getMPPVoltage(),
module->getOpenCircuitVoltage(),
module->getShortCircuitCurrent(),
module->getModuleLengthLongSide(),
module->getModuleLengthShortSide(),
module->getPowerCurveIrradiation(), false /*portrait*/,
moduleConfig->getTiltAngle(),
moduleConfig->getAzimuthAngle() - 180., // minus 180. degrees to go from compass to solar position algorithm
moduleConfig->getAreaRatio(),
module->getEfficiencyCurveInverter(),
moduleConfig->getSpecInvestCost(), moduleConfig->getSpecFixOaMCost(),
moduleConfig->getLifeTime()); // bw: added from GUI
moduleConfig->getAreaRatio(),
module->getEfficiencyCurveInverter(),
moduleConfig->getSpecInvestCost(), moduleConfig->getSpecFixOaMCost(),
moduleConfig->getLifeTime()); // bw: added from GUI
/* TODO: Parameters currently missing (0)
* dsToAcRatio
* arePortraitOriented
......
......@@ -556,7 +556,9 @@ bool ConfigTableModel::setData(const QModelIndex &index, const QVariant &value,
valueDouble = value.toDouble(&ok);
if (ok && valueDouble >= 0.)
{
if (m_additionalInfo == AdditionalInfo::Capacity)
if (m_additionalInfo == AdditionalInfo::Capacity
|| m_additionalInfo == AdditionalInfo::Storage
|| m_additionalInfo == AdditionalInfo::Biomass)
{
m_data[index.row()].setMaxCapacity(valueDouble);
}
......
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