Use SingleWellState for production and injection control

This commit is contained in:
Joakim Hove
2021-08-04 12:03:36 +02:00
parent c381459804
commit 581f571c9d
14 changed files with 69 additions and 75 deletions

View File

@@ -1235,9 +1235,8 @@ bool
GasLiftSingleWellGeneric::OptimizeState::
checkThpControl()
{
const int index = this->parent.well_state_.wellIndex(this->parent.well_name_);
const Well::ProducerCMode& control_mode
= this->parent.well_state_.currentProductionControl(index);
const int well_index = this->parent.well_state_.wellIndex(this->parent.well_name_);
const Well::ProducerCMode& control_mode = this->parent.well_state_.well(well_index).production_cmode;
return control_mode == Well::ProducerCMode::THP;
}