Class RPGBuilder::DurationExpr
Defined in File RPGBuilder.h
Nested Relationships
This class is a nested type of Class RPGBuilder.
Class Documentation
-
class DurationExpr
A class defining a single duration constraint, in LNF.
Public Functions
-
inline DurationExpr()
-
inline DurationExpr(const double &d)
Create a duration expression, with unknown operator and empty weights and variables.
- Parameters:
d – The constant term for the duration expression
-
double minOf(const vector<double> &minVars, const vector<double> &maxVars)
Evaluate the minimum possible value that satisfies this duration expression, given the provided lower- and upper-bounds on the values of the task numeric variables.
- Parameters:
minVars – Minimum values of the task variables
maxvars – Maximum values of the task variables
- Returns:
The lowest permissible duration, according to this duration expression.
-
double maxOf(const vector<double> &minVars, const vector<double> &maxVars)
Evaluate the maximum possible value that satisfies this duration expression, given the provided lower- and upper-bounds on the values of the task numeric variables.
- Parameters:
minVars – Minimum values of the task variables
maxvars – Maximum values of the task variables
- Returns:
The greatest permissible duration, according to this duration expression.
Public Members
-
vector<double> weights
The weights of the variables in the duration expression
-
vector<int> variables
The IDs of the variables in the duration expression.
See also
RPGBuilder::getPNE
-
VAL::comparison_op op
The comparison operator for this duration expression. Is one of:
VAL::E_GREATEQ
for(>= ?duration ...)
VAL::E_GREATER
for(> ?duration ...)
VAL::E_EQUALS
for(= ?duration ...)
VAL::E_LESS
for(< ?duration ...)
VAL::E_LESSEQ
for(<= ?duration ...)
-
double constant
The constant term for the duration expression
-
inline DurationExpr()