|
opm-common
|
Class Action::Result holds the boolean result of a ACTIONX condition like. More...
#include <ActionResult.hpp>
Classes | |
| class | ValueRange |
| Random access range of values. More... | |
| class | MatchingEntities |
| Container of matching entities. More... | |
| class | Impl |
| Implementation of Action::Result. More... | |
Public Member Functions | |
| Result (bool result_arg) | |
| Constructor. | |
| Result (const Result &rhs) | |
| Copy constructor. | |
| Result (Result &&rhs) | |
| Move constructor. | |
| ~Result () | |
| Destructor. | |
| Result & | wells (const std::vector< std::string > &w) |
| Assignment operator. | |
| bool | conditionSatisfied () const |
| Predicate for whether or not the result set represents a 'true' value. | |
| Result & | makeSetUnion (const Result &rhs) |
| Incorporate another result set into the current set as if by set union. | |
| 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.
| bool Opm::Action::Result::conditionSatisfied | ( | ) | const |
Predicate for whether or not the result set represents a 'true' value.
| 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 | ) |
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.
| [in] | rhs | Other result set. |
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 will be tested for equality. |
that. | Opm::Action::Result & Opm::Action::Result::wells | ( | const std::vector< std::string > & | w | ) |