My Project
|
Class Action::Result holds the boolean result of a ACTIONX condition like. More...
#include <ActionResult.hpp>
Classes | |
class | Impl |
Implementation of Action::Result. More... | |
class | MatchingEntities |
Container of matching entities. More... | |
class | ValueRange |
Random access range of values. More... | |
Public Member Functions | |
Result (bool result_arg) | |
Constructor. | |
Result (const Result &rhs) | |
Copy constructor. | |
Result (Result &&rhs) | |
Move constructor. | |
~Result () | |
Destructor. | |
Result & | makeSetUnion (const Result &rhs) |
Assignment operator. | |
Result & | makeSetIntersection (const Result &rhs) |
Incorporate another result set into the current set as if by set intersection. | |
const MatchingEntities & | matches () const |
Retrieve set of matching entities. | |
bool | operator== (const Result &that) const |
Equality predicate. | |
Class Action::Result holds the boolean result of a ACTIONX condition like.
WWCT > 0.75
In addition to the overall truthness of the expression an Action::Result instance can optionally have a set of matching entities such as wells or groups. For instance the the result of:
FWCT > 0.75
will not contain any wells, whereas the result of:
WWCT > 0.75
will contain a set of all the wells matching the condition. The set of matching entities can be queried with the matches() member function. When a result with matching entities and a result without matching entities are combined, for instance as,
WWCT > 0.50 AND FPR > 1000
the result will have all the wells corresponding to the first condition. When multiple results with matching entities are combined with logical operators AND and OR, the set of matching entities are combined accordingly–as a set union for 'OR' and a set intersection for 'AND'.
It is possible to have a result which evaluates to true and still have zero matching entities
WWCT > 1.25 OR FOPT > 1
in which case it is likely that the WWCT condition is false, but the FOPT condition is true. If the condition evaluates to true the set of matching entities will be passed to the Schedule::applyAction() method, and will be substituted in place of the name pattern '?' in keywords like WELOPEN.
|
explicit |
Constructor.
Creates a result set with a known condition value.
[in] | result_arg | Condition value. |
Opm::Action::Result::Result | ( | const Result & | rhs | ) |
Copy constructor.
[in] | rhs | Source object from which to form an independent copy. |
Opm::Action::Result::Result | ( | Result && | rhs | ) |
Move constructor.
[in,out] | rhs | Source object from which form a new object. Left in an empty state on return from the move constructor. |
|
default |
Destructor.
Needed for PIMPL idiom.
Opm::Action::Result & Opm::Action::Result::makeSetIntersection | ( | const Result & | rhs | ) |
Incorporate another result set into the current set as if by set intersection.
Final result set condition value is logical AND of the current condition value and that of the other result set. Set of matching entities is the intersection of the current set and that of the other result set, albeit with special case handling of empty sets of matching entities.
[in] | rhs | Other result set. |
rhs
result set has been incorporated. Opm::Action::Result & Opm::Action::Result::makeSetUnion | ( | const Result & | rhs | ) |
Assignment operator.
[in] | rhs | Source object whose value will overwrite *this.
\return *this.
Move-assignment operator.
\param[in] rhs Source object which will be moved into \code *this.
Left in an empty state on return from the move constructor.
\return *this.
Include a sequence of well names as matching entities.
Duplicates, if any, will be ignored.
\param[in] w Sequence of well names.
\return *this.
Result& wells(const std::vector<std::string>& w);
Predicate for whether or not the result set represents a 'true'
value.
bool conditionSatisfied() const;
Incorporate another result set into the current set as if by set
union.
Final result set condition value is logical OR of the current
condition value and that of the other result set. Set of matching
entities is union of the current set and that of the other result
set.
\param[in] rhs Other result set.
\return \code *this
Class Action::Result holds the boolean result of a ACTIONX condition like. Definition ActionResult.hpp:69 Definition Source.hpp:48 rhs result set has been incorporated. |
const Opm::Action::Result::MatchingEntities & Opm::Action::Result::matches | ( | ) | const |
Retrieve set of matching entities.
Empty unless conditionSatisfied() is true.
bool Opm::Action::Result::operator== | ( | const Result & | that | ) | const |
Equality predicate.
[in] | that | Object against which *this
|
that
.