List the matching wells for Action eval

This commit is contained in:
Joakim Hove 2019-11-29 17:30:18 +01:00
parent e74c451b7b
commit f97b76a9b5

View File

@ -1056,11 +1056,18 @@ public:
for (const auto& action : actions.pending(simTime)) {
auto actionResult = action->eval(simTime, context);
if (actionResult) {
std::string msg = "The action: " + action->name() + " evaluated to true at report step: " + std::to_string(reportStep);
std::string wells_string;
const auto& matching_wells = actionResult.wells();
if (matching_wells.size() > 0) {
for (std::size_t iw = 0; iw < matching_wells.size() - 1; iw++)
wells_string += matching_wells[iw] + ", ";
wells_string += matching_wells.back();
}
std::string msg = "The action: " + action->name() + " evaluated to true at report step: " + std::to_string(reportStep) + " wells: " + wells_string;
Opm::OpmLog::info(msg);
schedule.applyAction(reportStep, *action, actionResult);
} else {
std::string msg = "The action: " + action->name() + " evaluated to false sat report step: " + std::to_string(reportStep);
std::string msg = "The action: " + action->name() + " evaluated to false at report step: " + std::to_string(reportStep);
Opm::OpmLog::info(msg);
}
}