diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index d24b5afb0..9c20658ca 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -1467,6 +1467,14 @@ namespace { } this->snapshots.back().udq_active.update( std::move(udq_active) ); } + + + if (!rst_state.actions.empty()) { + auto actions = this->snapshots.back().actions(); + for (const auto& rst_action : rst_state.actions) + actions.add( Action::ActionX(rst_action) ); + this->snapshots.back().actions.update( std::move(actions) ); + } } std::shared_ptr Schedule::python() const diff --git a/tests/parser/ScheduleRestartTests.cpp b/tests/parser/ScheduleRestartTests.cpp index 4f422cb8b..aa5950b0d 100644 --- a/tests/parser/ScheduleRestartTests.cpp +++ b/tests/parser/ScheduleRestartTests.cpp @@ -171,3 +171,11 @@ BOOST_AUTO_TEST_CASE(LoadUDQRestartSim) { } } } + +BOOST_AUTO_TEST_CASE(LoadActionRestartSim) { + const auto& [sched, restart_sched] = load_schedule_pair("UDQ_ACTIONX.DATA", "UDQ_ACTIONX_RESTART.DATA", "UDQ_ACTIONX.X0007", 7); + const auto& input_actions = sched[7].actions(); + const auto& rst_actions = restart_sched[7].actions(); + + BOOST_CHECK_EQUAL(input_actions.ecl_size(), rst_actions.ecl_size()); +} diff --git a/tests/test_AggregateActionxData.cpp b/tests/test_AggregateActionxData.cpp index 654ef3ba7..95d8fe3e0 100644 --- a/tests/test_AggregateActionxData.cpp +++ b/tests/test_AggregateActionxData.cpp @@ -998,7 +998,7 @@ BOOST_AUTO_TEST_CASE(Declared_Actionx_data) } { - auto rst_file = std::make_shared("TEST_ACTIONX.UNRST"); + auto rst_file = std::make_shared("UDQ_ACTIONX_TEST1.UNRST"); auto rst_view = std::make_shared(std::move(rst_file), 3); auto rst_state = Opm::RestartIO::RstState::load(std::move(rst_view), es.runspec(), simCase.parser); const auto& input_actions = sched[rptStep].actions();