Fix removeSurplus alq

Add water rate target limit
Add the gradient to the checkXXXTarget so that surplus alq is removed
until it would go below the target. I.e. the group still want to produce it  target
This commit is contained in:
Tor Harald Sandve
2022-10-27 15:52:12 +02:00
parent cd09c130b3
commit 1a09608263
4 changed files with 56 additions and 27 deletions

View File

@@ -750,8 +750,9 @@ GasLiftSingleWellGeneric::getRateWithGroupLimit_(Rate rate_type, const double ne
double gr_target, new_gr_rate, efficiency;
const std::string* group_name = nullptr;
for (const auto& [group_name_temp, efficiency_temp] : pairs) {
if (gr_name_no_check == group_name_temp)
if (gr_name_no_check == group_name_temp) {
continue;
}
auto gr_target_opt = this->group_info_.getTarget(rate_type, group_name_temp);
if (gr_target_opt) {
@@ -1251,6 +1252,7 @@ GasLiftSingleWellGeneric::runOptimizeLoop_(bool increase)
cur_alq,
alq_is_limited,
new_rates.water,
new_rates.water_is_limited,
increase_opt);
return ret_value;
}