Add Schedule::runPyAction() to be called from the simulator
This commit is contained in:
parent
9ce5ca2b21
commit
34d71e0c2e
@ -280,6 +280,7 @@ namespace Opm
|
||||
const std::map< std::string, int >& rst_keywords( size_t timestep ) const;
|
||||
|
||||
SimulatorUpdate applyAction(std::size_t reportStep, const Action::ActionX& action, const std::vector<std::string>& matching_wells, const std::unordered_map<std::string, double>& wellpi);
|
||||
SimulatorUpdate runPyAction(std::size_t reportStep, const Action::PyAction& pyaction, EclipseState& ecl_state, SummaryState& summary_state);
|
||||
void applyWellProdIndexScaling(const std::string& well_name, const std::size_t reportStep, const double scalingFactor);
|
||||
|
||||
|
||||
|
@ -1332,6 +1332,12 @@ File {} line {}.)", pattern, location.keyword, location.filename, location.linen
|
||||
|
||||
|
||||
|
||||
SimulatorUpdate Schedule::runPyAction(std::size_t reportStep, const Action::PyAction& pyaction, EclipseState& ecl_state, SummaryState& summary_state) {
|
||||
SimulatorUpdate sim_update;
|
||||
pyaction.run(ecl_state, *this, reportStep, summary_state);
|
||||
return sim_update;
|
||||
}
|
||||
|
||||
void Schedule::applyWellProdIndexScaling(const std::string& well_name, const std::size_t reportStep, const double newWellPI) {
|
||||
if (reportStep >= this->snapshots.size())
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user