|
const std::vector< int > & | findMapping (Variable &var) |
|
virtual | ~Solver () |
|
const OptimizationResult & | solve () |
|
const OptimizationResult & | getLastResult () const |
|
void | printStatus (std::ostream &os) |
|
virtual const std::string & | getMoreInfo () const |
|
virtual void | printValuesAtSolution ()=0 |
|
virtual std::string | toString ()=0 |
|
void | setMemoryLevel (int level) |
|
void | setAutoDumpFile (const std::string &file) |
|
void | activateAutoDump () |
|
void | deactivateAutoDump () |
|
void | dump (const std::string &file="") const |
|
int | n () |
|
Variable & | getProblemVariable () |
|
void | setVariableValue (const VectorXd &value) |
|
| ObserverSubject () |
|
virtual | ~ObserverSubject () |
|
virtual | ~Observer () |
|
template<int EVT> |
void | bind (SubjectBase< EVT > &subject) |
| Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
|
|
template<int EVT> |
void | stopPropagation () |
|
void | bind (subject_type &subject) |
| Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
|
|
void | bind (subject_type &subject) |
| Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
|
|
void | bind (subject_type &subject) |
| Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
|
|
virtual | ~Subject () |
|
template<int EVT, class Derived , class Base > |
void | connect (Derived &object, void(Base::*newCallback)(int)) const |
| Call this method to register a non-static method as a callback. More...
|
|
template<int EVT> |
void | connect (void(*newCallback)(int)) const |
| Call this method to register a free function as a callback. More...
|
|
template<int EVT, class Derived , class Base > |
void | disconnect (Derived &object, void(Base::*callbackToErase)(int)) const |
| Disconnect non-static method. More...
|
|
template<int EVT> |
void | disconnect (void(*callbackToErase)(int)) const |
| Disconnect free function. More...
|
|
template<int EVT> |
void | propagate () const |
|
template<int EVT> |
void | propagate (int timestamp) const |
|
void | connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const |
| Call this method to register a non-static method as a callback. More...
|
|
void | connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const |
| Call this method to register a free function as a callback. More...
|
|
void | disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const |
| Disconnect non-static method. More...
|
|
void | disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const |
| Disconnect free function. More...
|
|
void | propagate (int timestamp) const |
|
void | propagate () const |
|
void | connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const |
| Call this method to register a non-static method as a callback. More...
|
|
void | connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const |
| Call this method to register a free function as a callback. More...
|
|
void | disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const |
| Disconnect non-static method. More...
|
|
void | disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const |
| Disconnect free function. More...
|
|
void | propagate (int timestamp) const |
|
void | propagate () const |
|
void | connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const |
| Call this method to register a non-static method as a callback. More...
|
|
void | connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const |
| Call this method to register a free function as a callback. More...
|
|
void | disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const |
| Disconnect non-static method. More...
|
|
void | disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const |
| Disconnect free function. More...
|
|
void | propagate (int timestamp) const |
|
void | propagate () const |
|
| NamedInstance (const std::string &name) |
|
const std::string & | getName () const |
|
virtual | ~NamedInstance () |
|
Solver class.
- Warning
- None
This is a base class for every optimization solver in ocra. It provides an interface for derived solvers and some core methods. It has two responsibilities of its own:
- (i) keep (lazily) up-do-date the variable of the optimization problem,
- (ii) maintain the mappings of function's variables relative to this problem variable.
(i) can be explain by an example: if we want to optimize the sum of two functions f(x,y) and g(y,z), then we need to solve a problem over V=(x,y,z). V is said to be the problem variable. If at one point g becomes a function of y only, then we have a new problem variable V'=(x,y). The solver tracks correctly such changes to keep the problem variable up-to-date. This implies to observe the EVT_CHANGE_DEPENDENCIES events coming from the variables of all constraints and objectives. This observation is configured in the internalAdd/RemoveObjective/Constraint methods which the user must call when adding/removing an objective/constraint in a derived solver. When this event is triggered, a flag is simply change, the actual recomputation of the problem variable will only take automatically place, if needed, when the solve method is called.
(ii) the variable of any constraint or objective in an optimization problem is a subset of the problem variable. Many solvers need to know how a specific variable is mapped with respect to the problem variable. The Solver class provides facilities to keep the mapping of each constraint/objective's variable wrt the problem variable up-to-date. It is done in a transparent way for the user, who just need to use the findMapping() method to retrieve the mapping of a variable.
Some general rules which must be followed by the derived solver:
- when there are several objectives, they are added in one objective. If not (multi-objective optimization e.g.), the documentation of the particular solver must report it,
- likewise, when there is several constraints, the problem considers (naturally) their intersection, unless documented differently.
Definition at line 70 of file Solver.h.