20 #ifndef ACTION_STATE_HPP
21 #define ACTION_STATE_HPP
26 #include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.hpp>
43 RunState(std::time_t sim_time)
48 void add_run(std::time_t sim_time) {
49 this->last_run = sim_time;
53 static RunState serializeObject()
62 bool operator==(
const RunState& other)
const {
63 return this->run_count == other.run_count &&
64 this->last_run == other.last_run;
67 template<
class Serializer>
70 serializer(this->run_count);
71 serializer(this->last_run);
74 std::size_t run_count;
81 void add_run(
const ActionX& action, std::time_t sim_time,
Result result);
82 std::size_t run_count(
const ActionX& action)
const;
83 std::time_t run_time(
const ActionX& action)
const;
84 std::optional<Result> result(
const std::string& action)
const;
87 template<
class Serializer>
90 serializer.map(this->run_state);
91 serializer.map(this->last_result);
95 static State serializeObject();
96 bool operator==(
const State& other)
const;
99 using action_id = std::pair<std::string, std::size_t>;
100 static action_id make_id(
const ActionX& action);
101 std::map<action_id, RunState> run_state;
102 std::map<std::string, Result> last_result;
Definition: ActionX.hpp:74
Definition: Actions.hpp:41
Definition: ActionResult.hpp:99
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29