The run() function invoked by PYACTION has got a new fifth argument which is a callable the script should utilize to apply the keywords from an ACTIONX keyword. The callable is implemented as C++ lambda which will run the Schedule::iterateScheduleSection() method and make sure an updated SimulatorUpdate variable can be passed back to the simulator.
10 lines
266 B
Python
10 lines
266 B
Python
def run(ecl_state, schedule, report_step, sim, actionx_callback):
|
|
wells_shut = False
|
|
|
|
for well in sim.wells:
|
|
if sim.well_var(well, "WWCT") > 0.50:
|
|
schedule.shut_well(well, report_step)
|
|
wells_shut = True
|
|
|
|
return wells_shut
|