Merge pull request #3413 from totto82/fixLocalFraction

make sure the newly switched well is included in the local fraction sum
This commit is contained in:
Tor Harald Sandve
2021-06-28 15:41:45 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -143,7 +143,7 @@ getGroupInjectionControl(const Group& group,
WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, baseif_.currentStep(), baseif_.guideRate(), tcalc.guideTargetMode(), pu, false, injectionPhase);
auto localFraction = [&](const std::string& child) {
return fcalc.localFraction(child, "");
return fcalc.localFraction(child, child);
};
auto localReduction = [&](const std::string& group_name) {
@@ -237,7 +237,7 @@ getGroupProductionControl(const Group& group,
WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, baseif_.currentStep(), baseif_.guideRate(), tcalc.guideTargetMode(), pu, true, Phase::OIL);
auto localFraction = [&](const std::string& child) {
return fcalc.localFraction(child, "");
return fcalc.localFraction(child, child);
};
auto localReduction = [&](const std::string& group_name) {

View File

@@ -998,7 +998,7 @@ getGroupInjectionTargetRate(const Group& group,
WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, currentStep(), guideRate(), tcalc.guideTargetMode(), pu, false, injectionPhase);
auto localFraction = [&](const std::string& child) {
return fcalc.localFraction(child, "");
return fcalc.localFraction(child, child); //Note child needs to be passed to always include since the global isGrup map is not updated yet.
};
auto localReduction = [&](const std::string& group_name) {
@@ -1070,7 +1070,7 @@ getGroupProductionTargetRate(const Group& group,
WellGroupHelpers::FractionCalculator fcalc(schedule, well_state, group_state, currentStep(), guideRate(), tcalc.guideTargetMode(), pu, true, Phase::OIL);
auto localFraction = [&](const std::string& child) {
return fcalc.localFraction(child, "");
return fcalc.localFraction(child, child); //Note child needs to be passed to always include since the global isGrup map is not updated yet.
};
auto localReduction = [&](const std::string& group_name) {