Skip to content

Commit

Permalink
Default max battery charge percentage of 90% (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
mj-xmr authored Oct 5, 2022
1 parent 72086ff commit 05cea49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/opti-lib/src/BatterySimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions src/opti-lib/src/ConfigSol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using namespace EnjoLib;
ConfigSol::~ConfigSol(){}
ConfigSol::ConfigSol()
{
BATTERY_CHARGE_MAX_PERCENTAGE = 0.90;
}

EnjoLib::Str ConfigSol::GetFileNameProt() const
Expand Down

0 comments on commit 05cea49

Please sign in to comment.