FLOPC++
|
All flopc++ code is contained within the flopc namespace. More...
Classes | |
class | Boolean_bool |
class | Boolean_Constant |
class | Boolean_SUBSETREF |
class | Boolean_negate |
class | Boolean_and |
class | Boolean_or |
class | Boolean_alltrue |
class | Comparison |
class | Boolean_lessEq |
class | Boolean_less |
class | Boolean_greaterEq |
class | Boolean_greater |
class | Boolean_equal |
class | Boolean_not_equal |
class | Boolean_base |
Base class for all "boolean" types of data. More... | |
class | MP_boolean |
Reference counted class for all "boolean" types of data.This contains counters to ConstantBase pointers. These pointers may be of any of the Boolean_base * type. This can be a constant valued boolean as well. explain SUBSETREF explain using pointer in – should be private? More... | |
class | Constant_index |
class | Constant_double |
class | Constant_abs |
class | Constant_pos |
class | Constant_ceil |
class | Constant_floor |
class | Constant_exp |
class | Constant_min_2 |
class | Constant_max_2 |
class | Constant_plus |
class | Constant_minus |
class | Constant_mult |
class | Constant_div |
class | Constant_max |
class | Constant_min |
class | Constant_sum |
class | Constant_product |
class | Constant_base |
Base class for all "constant" types of data. More... | |
class | Constant |
Reference counted class for all "constant" types of data. More... | |
class | Constraint |
class | MP_constraint |
Semantic representation of a linear constraint.This is one of the main public interface classes. It is always constructed through operator overloading between expressions, constants, and variables. There are many 'friend' overloaded operators to do the constuction. The basic idea is to make the constraint look like a paper-model constraint in C++ code. Once constructed, it should be added to the model. More... | |
class | DataRef |
Reference to a set of data. More... | |
class | MP_data |
Input data set.This is one of the main public interface classes. It is normally directly constructed given a set of indices (domain) over which it is valid. If the data is not bound at construction, either the value() or initialize() method must be called which (deep) copies in the actual data. If one wishes to refer to external data instead rather than doing a deep copy, use the constructor which takes the value pointer as an argument. This copies the original data pointer value (rather than a deep copy). This is used for construction of : More... | |
class | MP_stochastic_data |
class | Functor_conditional |
class | MP_subset |
Internal representation of a "set". More... | |
class | MP_domain_base |
Reference to a set of index values. More... | |
class | MP_domain |
Range over which some other constuct is defined.This is one of the main public interface classes. One uses this in the context of a constraint, objective, variable, or data. It is usually used in conjunction with an MP_set, or a subset, but can be used without one. It is the range over which the other construct is defined. More... | |
class | MP_domain_set |
Range over which some other constuct is defined.This is one of the main public interface classes. One uses this in the context of a constraint, objective, variable, or data. This class in the MP_domain family uses an MP_set and and index for defining the Range over which the construct is defined. More... | |
class | MP_domain_subset |
Range over which some other constuct is defined. Uses subsetting.This is one of the main public interface classes. One uses this in the context of a constraint, objective, variable, or data. This class in the MP_domain family uses an MP_subset and a vector of indexes for defining the Range over which the construct is defined. More... | |
class | insertFunctor |
Inserter for construction of a subset. More... | |
class | Expression_constant |
class | Expression_plus |
class | Expression_minus |
class | Expression_mult |
class | Expression_sum |
struct | Coef |
Internal representation of a Coefficient in a matrix. More... | |
class | GenerateFunctor |
Functor to facilitate generation of coefficients. More... | |
class | ObjectiveGenerateFunctor |
Functor to facilitate generation of the objective function. More... | |
class | MP_expression_base |
The base class for all expressions. More... | |
class | MP_expression |
Symbolic representation of a linear expression.This is one of the main public interface classes. It is the basis for all linear expressions, including constraints, objective function, and expressions involving indexes. Although these can be created directly and independently, it is expected these will be created through the use of the operators which are later in this file. (operator+, operator-, etc.) More... | |
class | TerminalExpression |
The base class for all expressions. More... | |
class | Expression_operator |
The base class for all expressions. More... | |
class | MP_index_constant |
class | MP_index_subsetRef |
class | MP_index_base |
Internal representation of a index. More... | |
class | MP_index |
Representation of an index.This is one of the main public interface classes. It is used to iterate through, or index into an MP_domain. It is also used to share the 'current' index offsets between expressions which share an index. More... | |
class | MP_index_exp |
Representation of an expression involving an index.This is one of the main public interface classes. It is used to create complex arrangements of index values. Index expressions can involve: More... | |
class | MP_index_mult |
Internal representation of an index expression. More... | |
class | MP_index_sum |
Internal representation of an index expression. More... | |
class | MP_index_dif |
Internal representation of an index expression. More... | |
class | CoefLess |
class | Messenger |
Inteface for hooking up to internal flopc++ message handling.In more advanced use of FlopC++, it may be desirable to get access to internal calls for messages. In essence, sub-class this Messenger class, and register it with the MP_model. Also overload whichever message events you wish to handle. More... | |
class | NormalMessenger |
class | VerboseMessenger |
class | MP_model |
This is the anchor point for all constructs in a FlopC++ model.The constructors take an OsiSolverInterface, and (optionally) a replacemente for the Messenger class. There are some built-in changes to the verbosity for output. The main methods to use are: More... | |
class | MP_set_base |
Internal representation of a "set". More... | |
class | MP_set |
Representation of a set for indexing into some other construct.This is one of the main public interface classes. One uses this when constructing MP_domains, and subsets. It is frequent that one would directly construct sets of indices, then use expressions to subset or slice the data. More... | |
class | MP_stage |
class | InsertFunctor |
Internal representation of a "set". More... | |
class | SubsetRef |
Internal representation of a "set". More... | |
class | SUBSETREF |
Internal representation of a "set". More... | |
class | Functor |
Function object. Often used. More... | |
class | RowMajor |
class | Named |
Utility interface class for adding a string name onto a structure. More... | |
class | Handle |
Utility for doing reference counted pointers. More... | |
class | VariableRef |
class | MP_variable |
Symantic representation of a variable.This is one of the main public interface classes. It should be directly declared by clients of the FlopC++. The parametersof construction are MP_set s which specify the indexes over which the variable is defined. More... | |
class | MP_binary_variable |
Enumerations | |
enum | Sense_enum { LE, GE, EQ } |
Enumeration for indicating direction of a constraint. More... | |
enum | variableType { continuous, discrete } |
Enumeration for indicating variable type. More... | |
Functions | |
void | forall (const MP_domain &d, const Functor &f) |
Global function for performing a Functor on each member of a MP_domain. More... | |
void | forall (const Functor &f) |
Global function for performing a Functor without having a set to operate on. More... | |
void | operator<<= (const MP_domain &s, const MP_domain &d) |
Global function which copies members of MP_domain d into another (possibly non-empty) MP_domain. More... | |
void | minimize (const MP_expression &obj) |
This is one of the main entry points for executionThis calls the OsiSolverInterface to execute the solver with the objective of MINIMIZING the argment MP_expression. More... | |
void | minimize_max (MP_set &d, const MP_expression &obj) |
This is one of the main entry points for executionThis calls the OsiSolverInterface to execute the solver with the objective of MINIMIZING THE MAXIMUM of the MP_expression evaluation of the MP_set. More... | |
void | maximize (const MP_expression &obj) |
This is one of the main entry points for executionThis calls the OsiSolverInterface to execute the solver with the objective of MAXIMIZING of the MP_expression. More... | |
MP_boolean | alltrue (const MP_domain &d, const MP_boolean &b) |
boolean which returns true if all in domain evaluate to true.This is used in the normal formation of an expression. More... | |
MP_boolean | operator! (const MP_boolean &b) |
For computing the logical negation of a booleanThis is used in the normal formation of an expression. More... | |
MP_boolean | operator&& (const MP_boolean &e1, const MP_boolean &e2) |
For computing the logical AND of two booleansThis is used in the normal formation of an expression. More... | |
MP_boolean | operator|| (const MP_boolean &e1, const MP_boolean &e2) |
For computing the logical OR of two booleansThis is used in the normal formation of an expression. More... | |
MP_boolean | operator<= (const MP_index_exp &e1, const MP_index_exp &e2) |
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an expression. This is useful when combining index expressions. More... | |
MP_boolean | operator<= (const Constant &e1, const Constant &e2) |
constructs a boolean evaluator by comparing two constants.This is used in the normal formation of an expression. This utility of this is when comparing constants More... | |
MP_boolean | operator< (const MP_index_exp &e1, const MP_index_exp &e2) |
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an expression. This is useful when combining index expressions. More... | |
MP_boolean | operator< (const Constant &e1, const Constant &e2) |
constructs a boolean evaluator by comparing two constants.This is used in the normal formation of an expression. This utility of this is when comparing constants More... | |
MP_boolean | operator>= (const MP_index_exp &e1, const MP_index_exp &e2) |
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an expression. This is useful when combining index expressions. More... | |
MP_boolean | operator>= (const Constant &e1, const Constant &e2) |
constructs a boolean evaluator by comparing two constants.This is used in the normal formation of an expression. This utility of this is when comparing constants More... | |
MP_boolean | operator> (const MP_index_exp &e1, const MP_index_exp &e2) |
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an expression. This is useful when combining index expressions. More... | |
MP_boolean | operator> (const Constant &e1, const Constant &e2) |
constructs a boolean evaluator by comparing two constants.This is used in the normal formation of an expression. This utility of this is when comparing constants More... | |
MP_boolean | operator== (const MP_index_exp &e1, const MP_index_exp &e2) |
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an expression. This is useful when combining index expressions. More... | |
MP_boolean | operator!= (const MP_index_exp &e1, const MP_index_exp &e2) |
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an expression. This is useful when combining index expressions. More... | |
MP_boolean | operator== (const Constant &e1, const Constant &e2) |
constructs a boolean evaluator by comparing two constants.This is used in the normal formation of an expression. This utility of this is when comparing constants More... | |
MP_boolean | operator!= (const Constant &e1, const Constant &e2) |
constructs a boolean evaluator by comparing two constants.This is used in the normal formation of an expression. This utility of this is when comparing constants More... | |
Constant | abs (const Constant &c) |
for computing the absolute value of a constant value.This is used in the normal formation of an expression such as abs(-5) More... | |
Constant | pos (const Constant &c) |
for returning non-negative value of the constant.This is used in the formation of an expression. It is used to return a non-negative value.. More... | |
Constant | ceil (const Constant &c) |
The ceiling integral value of the input constant.This is used in the formation of an expression. It is used to "round up" a numeric constant which is potentially non-integer. More... | |
Constant | floor (const Constant &c) |
The floor integral value of the input constant.This is used in the formation of an expression. It is used to "truncate" a numeric constant which is potentially non-integer. More... | |
Constant | minimum (const Constant &a, const Constant &b) |
Returns the smaller of two constants.This is used in the formation of an expression. More... | |
Constant | maximum (const Constant &a, const Constant &b) |
Returns the larger of two constants.This is used in the formation of an expression. More... | |
Constant | operator+ (const Constant &a, const Constant &b) |
Returns the sum of two constants.This is used in the formation of an expression. More... | |
Constant | operator+ (MP_index &a, MP_index &b) |
returns a Constant as a result of addition of two MP_index values. More... | |
Constant | operator- (const Constant &a, const Constant &b) |
Returns the difference of two constants.This is used in the formation of an expression. More... | |
Constant | operator- (MP_index &a, MP_index &b) |
returns a Constant as a result of a difference of two MP_index values. More... | |
Constant | operator* (const Constant &a, const Constant &b) |
Returns the product of two constants.This is used in the formation of an expression. More... | |
Constant | operator/ (const Constant &a, const Constant &b) |
Returns the quotient of two constants.This is used in the formation of an expression. More... | |
Constant | maximum (const MP_domain &i, const Constant &e) |
Returns the maximum over the domain of the constant. More... | |
Constant | minimum (const MP_domain &i, const Constant &e) |
Returns the sum of two constants. More... | |
Constant | sum (const MP_domain &i, const Constant &e) |
Returns the sum of two constants. More... | |
Constant | product (const MP_domain &i, const Constant &e) |
Returns the sum of two constants. More... | |
Constraint | operator<= (const MP_expression &l, const MP_expression &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator<= (const Constant &l, const MP_expression &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator<= (const MP_expression &l, const Constant &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator<= (const VariableRef &l, const VariableRef &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator>= (const MP_expression &l, const MP_expression &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator>= (const Constant &l, const MP_expression &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator>= (const MP_expression &l, const Constant &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator>= (const VariableRef &l, const VariableRef &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator== (const MP_expression &l, const MP_expression &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator== (const Constant &l, const MP_expression &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator== (const MP_expression &l, const Constant &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
Constraint | operator== (const VariableRef &l, const VariableRef &r) |
Uses operator overloading to construct an ConstraintConstucts a Constraint using operator overloading. More... | |
MP_domain | operator* (const MP_domain &a, const MP_domain &b) |
MP_expression | operator+ (const MP_expression &e1, const MP_expression &e2) |
Operator which sums two MP_expressions, forms a new MP_expression. More... | |
MP_expression | operator+ (const MP_expression &e1, const Constant &e2) |
MP_expression | operator+ (const Constant &e1, const MP_expression &e2) |
MP_expression | operator- (const MP_expression &e1, const MP_expression &e2) |
MP_expression | operator- (const MP_expression &e1, const Constant &e2) |
MP_expression | operator- (const Constant &e1, const MP_expression &e2) |
MP_expression | operator* (const Constant &e1, const MP_expression &e2) |
MP_expression | operator* (const MP_expression &e1, const Constant &e2) |
MP_expression | sum (const MP_domain &d, const MP_expression &e) |
MP_index_exp | operator+ (MP_index &i, const Constant &j) |
MP_index_exp | operator+ (MP_index &i, const int &j) |
MP_index_exp | operator- (MP_index &i, const Constant &j) |
MP_index_exp | operator- (MP_index &i, const int &j) |
MP_index_exp | operator* (MP_index &i, const Constant &j) |
std::ostream & | operator<< (std::ostream &os, const MP_model::MP_status &condition) |
allows print of result from call to solve(); More... | |
std::ostream & | operator<< (std::ostream &os, const MP_model::MP_direction &direction) |
allows print of direction used when calling solve. (MIN/MAX) More... | |
template<int nbr, class T > | |
std::vector< T > | makeVector (T i1, T i2=0, T i3=0, T i4=0, T i5=0) |
int | mod (int a, int b) |
return the strictly positive modulus of two integers More... | |
Variables | |
const int | outOfBound = -2 |
Distinct return value on conditions where an index goes out of bounds. More... | |
All flopc++ code is contained within the flopc namespace.
Flopc++ is an open source algebraic modelling language implemented as a C++ class library. It uses the common COIN-OR OsiSolverInterface abstract interface to allow for easy integration with many of today's top Math Programming solvers.
main 3 components are listed below. Much of the rest of the code is to facilitate the operator overloading makes this such a powerful modeling environment.
|
inline |
return the strictly positive modulus of two integers
Definition at line 57 of file MP_utilities.hpp.
Referenced by flopc::MP_set_base::check(), and flopc::MP_set_base::checkStage().
MP_index_exp flopc::operator* | ( | MP_index & | i, |
const Constant & | j | ||
) |
returns an index expression from a product between an MP_index and a Constant.
Definition at line 87 of file MP_index.cpp.
MP_expression flopc::operator* | ( | const Constant & | e1, |
const MP_expression & | e2 | ||
) |
Operator which multiplies a Constant by an MP_expression, and forms a new MP_expression
Definition at line 166 of file MP_expression.cpp.
MP_expression flopc::operator* | ( | const MP_expression & | e1, |
const Constant & | e2 | ||
) |
Operator which multiplies an MP_expression by a Constant, and forms a new MP_expression
Definition at line 169 of file MP_expression.cpp.
flopc::MP_domain flopc::operator* | ( | const MP_domain & | a, |
const MP_domain & | b | ||
) |
operator which creates a new domain as the pairwise combinations of two input domains.
Definition at line 125 of file MP_domain.cpp.
References flopc::MP_domain::condition, flopc::MP_domain_base::donext, flopc::MP_domain::getEmpty(), and flopc::MP_domain::last.
MP_index_exp flopc::operator+ | ( | MP_index & | i, |
const Constant & | j | ||
) |
returns an index expression from a sum between an MP_index and a Constant.
Definition at line 71 of file MP_index.cpp.
MP_index_exp flopc::operator+ | ( | MP_index & | i, |
const int & | j | ||
) |
returns an index expression from a sum between an MP_index and an integer. (i+5)
Definition at line 75 of file MP_index.cpp.
MP_expression flopc::operator+ | ( | const MP_expression & | e1, |
const MP_expression & | e2 | ||
) |
Operator which sums two MP_expressions, forms a new MP_expression.
Definition at line 143 of file MP_expression.cpp.
MP_expression flopc::operator+ | ( | const MP_expression & | e1, |
const Constant & | e2 | ||
) |
Operator which sums an MP_expression and a constant, and forms a new MP_expression
Definition at line 146 of file MP_expression.cpp.
returns a Constant as a result of addition of two MP_index values.
Definition at line 146 of file MP_constant.cpp.
MP_expression flopc::operator+ | ( | const Constant & | e1, |
const MP_expression & | e2 | ||
) |
Operator which sums a constant and an MP_expression , and forms a new MP_expression
Definition at line 149 of file MP_expression.cpp.
MP_index_exp flopc::operator- | ( | MP_index & | i, |
const Constant & | j | ||
) |
Definition at line 79 of file MP_index.cpp.
MP_index_exp flopc::operator- | ( | MP_index & | i, |
const int & | j | ||
) |
returns an index expression from a difference between an MP_index and an integer. (i-5)
Definition at line 83 of file MP_index.cpp.
MP_expression flopc::operator- | ( | const MP_expression & | e1, |
const MP_expression & | e2 | ||
) |
Operator which subtracts an MP_expression from an MP_expression, and forms a new MP_expression
Definition at line 153 of file MP_expression.cpp.
MP_expression flopc::operator- | ( | const MP_expression & | e1, |
const Constant & | e2 | ||
) |
Operator which subtracts a Constant from an MP_expression, and forms a new MP_expression
Definition at line 157 of file MP_expression.cpp.
MP_expression flopc::operator- | ( | const Constant & | e1, |
const MP_expression & | e2 | ||
) |
Operator which subtracts an MP_expression from a Constant, and forms a new MP_expression
Definition at line 161 of file MP_expression.cpp.
returns a Constant as a result of a difference of two MP_index values.
Definition at line 164 of file MP_constant.cpp.
std::ostream & flopc::operator<< | ( | std::ostream & | os, |
const MP_model::MP_status & | condition | ||
) |
allows print of result from call to solve();
Definition at line 475 of file MP_model.cpp.
References flopc::MP_model::ABANDONED, flopc::MP_model::DUAL_INFEASIBLE, flopc::MP_model::OPTIMAL, and flopc::MP_model::PRIMAL_INFEASIBLE.
std::ostream & flopc::operator<< | ( | std::ostream & | os, |
const MP_model::MP_direction & | direction | ||
) |
allows print of direction used when calling solve. (MIN/MAX)
Definition at line 496 of file MP_model.cpp.
References flopc::MP_model::MAXIMIZE, and flopc::MP_model::MINIMIZE.
MP_expression flopc::sum | ( | const MP_domain & | d, |
const MP_expression & | e | ||
) |
forms an expression by summing an expression over a domain.
Definition at line 173 of file MP_expression.cpp.
const int flopc::outOfBound = -2 |
Distinct return value on conditions where an index goes out of bounds.
Definition at line 63 of file MP_utilities.hpp.
Referenced by flopc::MP_set_base::check(), flopc::MP_set_base::checkStage(), flopc::Boolean_SUBSETREF::evaluate(), flopc::DataRef::evaluate(), flopc::MP_subset< nbr >::evaluate(), flopc::SubsetRef< nbr >::evaluate(), flopc::DataRef::evaluate_lhs(), flopc::RowMajor::f(), flopc::VariableRef::getColumn(), flopc::MP_subset< nbr >::insert(), flopc::GenerateFunctor::operator()(), flopc::MP_data::operator()(), flopc::MP_subset< nbr >::operator()(), and flopc::MP_constraint::row_number().