FLOPC++
|
All flopc++ code is contained within the flopc namespace. More...
Classes | |
class | Boolean_and |
class | Boolean_base |
class | Boolean_bool |
class | Boolean_Constant |
class | Boolean_equal |
class | Boolean_greater |
class | Boolean_greaterEq |
class | Boolean_less |
class | Boolean_lessEq |
class | Boolean_negate |
class | Boolean_not_equal |
class | Boolean_or |
class | Boolean_SUBSETREF |
class | Comparison |
class | Constant |
Reference counted class for all "constant" types of data. More... | |
class | Constant_abs |
class | Constant_base |
Base class for all "constant" types of data. More... | |
class | Constant_ceil |
class | Constant_div |
class | Constant_double |
class | Constant_exp |
class | Constant_floor |
class | Constant_if |
class | Constant_index |
class | Constant_max |
class | Constant_max_2 |
class | Constant_min |
class | Constant_min_2 |
class | Constant_minus |
class | Constant_mult |
class | Constant_plus |
class | Constant_pos |
class | Constant_product |
class | Constant_sum |
class | Constant_unary_minus |
class | Constraint |
class | Constraint_base |
class | DataRef |
Reference to a set of data. More... | |
class | Expression_constant |
class | Expression_div |
class | Expression_minus |
class | Expression_mult |
class | Expression_operator |
class | Expression_plus |
class | Expression_sum |
class | Functor |
Function object. Often used. More... | |
class | Functor_conditional |
class | Handle |
Utility for doing reference counted pointers. More... | |
class | InsertFunctor |
Internal representation of a "set". More... | |
class | insertFunctor |
Inserter for construction of a subset. More... | |
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 | MP |
class | MP_binary_variable |
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. More... | |
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 | 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_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_base |
Reference to a set of index values. 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 | 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 | MP_expression_base |
The base class for all expressions. 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_base |
Internal representation of a index. More... | |
class | MP_index_constant |
class | MP_index_dif |
Internal representation of an index expression. 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_subsetRef |
class | MP_index_sum |
Internal representation of an index expression. More... | |
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 |
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_set_base |
Internal representation of a "set". More... | |
class | MP_stage |
class | MP_stochastic_data |
class | MP_subset |
Internal representation of a "set". More... | |
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 | Named |
Utility interface class for adding a string name onto a structure. More... | |
class | NormalMessenger |
class | RowMajor |
class | SUBSETREF |
Internal representation of a "set". More... | |
class | SubsetRef |
Internal representation of a "set". More... | |
class | TerminalExpression |
The base class for all expressions. More... | |
class | VariableRef |
class | VerboseMessenger |
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 | 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) |
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 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... | |
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... | |
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) |
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 | mpif (const MP_boolean &c, const Constant &a, const Constant &b) |
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) |
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 | 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 > | |
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 60 of file MP_utilities.hpp.
Referenced by flopc::MP_set_base::check(), and flopc::MP_set_base::checkStage().
Constant flopc::mpif | ( | const MP_boolean & | c, |
const Constant & | a, | ||
const Constant & | b | ||
) |
Definition at line 218 of file MP_constant.cpp.
Referenced by flopc::Constant::Constant().
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 79 of file MP_index.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 128 of file MP_domain.cpp.
References flopc::MP_domain::condition, flopc::MP_domain_base::donext, flopc::MP_domain::getEmpty(), flopc::Handle< T >::increment(), 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 63 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 67 of file MP_index.cpp.
returns a Constant as a result of addition of two MP_index values.
Definition at line 141 of file MP_constant.cpp.
References flopc::Constant_index::Constant.
MP_index_exp flopc::operator- | ( | MP_index & | i, |
const Constant & | j | ||
) |
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 difference between an MP_index and an integer. (i-5)
Definition at line 75 of file MP_index.cpp.
returns a Constant as a result of a difference of two MP_index values.
Definition at line 159 of file MP_constant.cpp.
References flopc::Constant_index::Constant.
Definition at line 173 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 461 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 482 of file MP_model.cpp.
References flopc::MP_model::MAXIMIZE, and flopc::MP_model::MINIMIZE.
const int flopc::outOfBound = -2 |
Distinct return value on conditions where an index goes out of bounds.
Definition at line 66 of file MP_utilities.hpp.
Referenced by flopc::MP_set_base::check(), flopc::MP_set_base::checkStage(), flopc::DataRef::evaluate(), flopc::Boolean_SUBSETREF::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::MP::GenerateFunctor::operator()(), flopc::MP_data::operator()(), flopc::MP_subset< nbr >::operator()(), and flopc::MP_constraint::row_number().