20#ifndef ActionCOnfig_HPP
21#define ActionCOnfig_HPP
23#include <opm/input/eclipse/Schedule/Action/ActionX.hpp>
24#include <opm/input/eclipse/Schedule/Action/PyAction.hpp>
31namespace Opm::Action {
37namespace Opm::Action {
62 Actions(
const std::vector<ActionX>& action,
63 const std::vector<PyAction>& pyactions);
109 bool ready(
const State& state, std::time_t sim_time)
const;
142 std::vector<const ActionX*>
143 pending(
const State& state, std::time_t sim_time)
const;
158 bool has(
const std::string& name)
const;
161 auto begin()
const {
return this->actions_.begin(); }
164 auto end()
const {
return this->actions_.end(); }
179 template<
class Serializer>
182 serializer(this->actions_);
183 serializer(this->pyactions_);
188 std::vector<ActionX> actions_{};
191 std::vector<PyAction> pyactions_{};
Definition ActionX.hpp:72
Container of action keywords.
Definition Actions.hpp:44
bool has(const std::string &name) const
ActionX object existence predicate.
Definition Actions.cpp:170
std::size_t py_size() const
Number of PyAction objects in this collection.
Definition Actions.cpp:94
std::vector< const PyAction * > pending_python(const State &state) const
Retrieve PyAction objects that are ready to run.
Definition Actions.cpp:157
std::size_t ecl_size() const
Number of ActionX objects in this collection.
Definition Actions.cpp:89
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition Actions.hpp:180
auto begin() const
Beginning of this collection's ActionX objects.
Definition Actions.hpp:161
bool operator==(const Actions &data) const
Equality predicate.
Definition Actions.cpp:176
void add(const ActionX &action)
Include ActionX object in current collection.
Definition Actions.cpp:64
std::vector< const ActionX * > pending(const State &state, std::time_t sim_time) const
Retrieve ActionX objects that are ready to run.
Definition Actions.cpp:143
auto end() const
End of this collection's ActionX objects.
Definition Actions.hpp:164
bool ready(const State &state, std::time_t sim_time) const
Runnability predicate.
Definition Actions.cpp:117
static Actions serializationTestObject()
Create a serialisation test object.
Definition Actions.cpp:55
const ActionX & operator[](const std::string &name) const
Look up ActionX object by name.
Definition Actions.cpp:124
int max_input_lines() const
Maximum number of records in any one ACTIONX block.
Definition Actions.cpp:99
Actions()=default
Default constructor.
bool empty() const
Whether or not this collection is empty.
Definition Actions.cpp:112
Definition PyAction.hpp:40
Management information about the current run's ACTION system, especially concerning the number of tim...
Definition State.hpp:51
Class for (de-)serializing.
Definition Serializer.hpp:94