Make GCONSALE an injector

This commit is contained in:
Tor Harald Sandve
2019-11-26 11:14:12 +01:00
parent be27bb6154
commit 225d6ea26d
2 changed files with 8 additions and 1 deletions
@@ -63,7 +63,8 @@ enum class InjectionCMode : int {
RESV = 2,
REIN = 4,
VREP = 8,
FLD = 16
FLD = 16,
SALE = 32
};
static const std::string InjectionCMode2String( InjectionCMode enumValue );
static InjectionCMode InjectionCModeFromString( const std::string& stringValue );
@@ -1629,6 +1629,12 @@ namespace {
new_gconsale->add(groupName, sales_target, max_rate, min_rate, procedure);
auto group_ptr = std::make_shared<Group>(this->getGroup(groupName, currentStep));
Group::GroupInjectionProperties injection;
injection.phase = Phase::GAS;
if (group_ptr->updateInjection(injection)) {
this->updateGroup(std::move(group_ptr), currentStep);
}
}
this->gconsale.update(currentStep, new_gconsale);
}