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.
16 lines
345 B
Python
16 lines
345 B
Python
import math
|
|
|
|
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
|
|
|
wells = []
|
|
if report_step == 1:
|
|
wells = ["P1"]
|
|
elif report_step == 2:
|
|
wells = ["P2"]
|
|
elif report_step == 3:
|
|
wells = ["P3"]
|
|
elif report_step == 4:
|
|
wells = ["P4"]
|
|
|
|
actionx_callback("CLOSEWELL", wells)
|