Add Group active_cmode

This commit is contained in:
Joakim Hove 2020-10-26 20:53:39 +01:00
parent a81eb8f9d4
commit 45c784f8d8
3 changed files with 6 additions and 1 deletions

View File

@ -169,6 +169,7 @@ struct GroupProductionProperties {
std::string name;
ProductionCMode gconprod_cmode = ProductionCMode::NONE;
ProductionCMode active_cmode = ProductionCMode::NONE;
ExceedAction exceed_action = ExceedAction::NONE;
UDAValue oil_target;
UDAValue water_target;
@ -190,6 +191,7 @@ struct GroupProductionProperties {
{
serializer(name);
serializer(gconprod_cmode);
serializer(active_cmode);
serializer(exceed_action);
oil_target.serializeOp(serializer);
water_target.serializeOp(serializer);

View File

@ -219,6 +219,7 @@ Group::GroupProductionProperties Group::GroupProductionProperties::serializeObje
Group::GroupProductionProperties result("Group123");
result.name = "Group123";
result.gconprod_cmode = ProductionCMode::PRBL;
result.active_cmode = ProductionCMode::PRBL;
result.exceed_action = ExceedAction::WELL;
result.oil_target = UDAValue(1.0);
result.water_target = UDAValue(2.0);
@ -236,6 +237,7 @@ Group::GroupProductionProperties Group::GroupProductionProperties::serializeObje
bool Group::GroupProductionProperties::operator==(const GroupProductionProperties& other) const {
return
this->name == other.name &&
this->active_cmode == other.active_cmode &&
this->gconprod_cmode == other.gconprod_cmode &&
this->exceed_action == other.exceed_action &&
this->oil_target == other.oil_target &&
@ -439,7 +441,7 @@ bool Group::updateParent(const std::string& parent) {
Group::ProductionControls Group::productionControls(const SummaryState& st) const {
Group::ProductionControls pc;
pc.cmode = this->production_properties.gconprod_cmode;
pc.cmode = this->production_properties.active_cmode;
pc.exceed_action = this->production_properties.exceed_action;
pc.oil_target = UDA::eval_group_uda(this->production_properties.oil_target, this->m_name, st, this->udq_undefined);
pc.water_target = UDA::eval_group_uda(this->production_properties.water_target, this->m_name, st, this->udq_undefined);

View File

@ -367,6 +367,7 @@ namespace {
auto group_ptr = std::make_shared<Group>(this->getGroup(group_name, handlerContext.currentStep));
Group::GroupProductionProperties production(group_name);
production.gconprod_cmode = controlMode;
production.active_cmode = controlMode;
production.oil_target = oil_target;
production.gas_target = gas_target;
production.water_target = water_target;