Skip to content

Commit

Permalink
refactor MaintenanceGroupSaver
Browse files Browse the repository at this point in the history
  • Loading branch information
Milos-RTEi committed Nov 8, 2023
1 parent 641c6f6 commit d6da905
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,17 @@ bool MaintenanceGroupSaver::saveToEnv(EnvForSaving& env, const MaintenanceGroup*
String value;
const Area& area = *(i->first);

// add weight-load+renewable+ror
env.key.clear() << area.name << ".weights";
value << i->second.load << '%' << i->second.renewable << '%' << i->second.ror;
// add weight-load
env.key.clear() << area.name << ".weight-load";
value.clear() << i->second.load;
env.section->add(env.key, value);
// add weight-renewable
env.key.clear() << area.name << ".weight-renewable";
value.clear() << i->second.renewable;
env.section->add(env.key, value);
// add weight-ror
env.key.clear() << area.name << ".weight-ror";
value.clear() << i->second.ror;
env.section->add(env.key, value);
}
}
Expand Down

0 comments on commit d6da905

Please sign in to comment.