mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix bug in runOptimize1_
This commit is contained in:
parent
869de90b56
commit
23225d24e5
@ -843,15 +843,15 @@ GasLiftSingleWellGeneric::
|
|||||||
runOptimize1_()
|
runOptimize1_()
|
||||||
{
|
{
|
||||||
std::unique_ptr<GasLiftWellState> state;
|
std::unique_ptr<GasLiftWellState> state;
|
||||||
auto inc_count = this->well_state_.gliftGetAlqIncreaseCount(this->well_name_);
|
int inc_count = this->well_state_.gliftGetAlqIncreaseCount(this->well_name_);
|
||||||
auto dec_count = this->well_state_.gliftGetAlqDecreaseCount(this->well_name_);
|
int dec_count = this->well_state_.gliftGetAlqDecreaseCount(this->well_name_);
|
||||||
if (dec_count == 0 && inc_count == 0) {
|
if (dec_count == 0 && inc_count == 0) {
|
||||||
state = tryIncreaseLiftGas_();
|
state = tryIncreaseLiftGas_();
|
||||||
if (!state && !state->alqChanged()) {
|
if (!state || !(state->alqChanged())) {
|
||||||
state = tryDecreaseLiftGas_();
|
state = tryDecreaseLiftGas_();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dec_count == 0) {
|
else if (dec_count == 0) {
|
||||||
assert(inc_count > 0);
|
assert(inc_count > 0);
|
||||||
state = tryIncreaseLiftGas_();
|
state = tryIncreaseLiftGas_();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user