diff --git a/src/opti-lib/src/BatterySimulation.cpp b/src/opti-lib/src/BatterySimulation.cpp index e33d0a8..5ec0726 100644 --- a/src/opti-lib/src/BatterySimulation.cpp +++ b/src/opti-lib/src/BatterySimulation.cpp @@ -56,6 +56,13 @@ double BatterySimulation::iter_get_load(double inp, double out, double hours) //num_overvolted += 1 + diff * 2; num_overvolted += 1 + diff; //num_overvolted += GMat().Pow(1 + diff, 1.01); + + // Warning: You may do this only AFTER the penalty was calculated. + // It will however impact the penalty in the NEXT iteration, which is very bad. + if (load > pars.MAX_CAPACITY_AMPH) + { + //load -= inp * m_mulPowerToCapacity; + } } if (load < pars.MIN_LOAD_AMPH) { diff --git a/src/opti-lib/src/ConfigSol.cpp b/src/opti-lib/src/ConfigSol.cpp index 2c61c2b..13b218f 100644 --- a/src/opti-lib/src/ConfigSol.cpp +++ b/src/opti-lib/src/ConfigSol.cpp @@ -14,6 +14,7 @@ using namespace EnjoLib; ConfigSol::~ConfigSol(){} ConfigSol::ConfigSol() { + BATTERY_CHARGE_MAX_PERCENTAGE = 0.90; } EnjoLib::Str ConfigSol::GetFileNameProt() const