NDOSolver / FiOracle
Interfaces and Solvers for NonDifferentiable Optimization
|
Functions | |
virtual void | SetLowerBound (cHpNum LwBnd=- Inf< HpNum >(), cIndex wFi=Inf< Index >())=0 |
virtual void | CheckIdentical (const bool Chk=true) |
virtual void | SetMPLog (std::ostream *outs=0, const char lvl=0) |
virtual void | SetMPTime (const bool TimeIt=true) |
Other initializations | |
virtual void | SetPar (const int wp, cHpNum value)=0 |
virtual void | SetThreads (int nthreads) |
The solution of the Master Problem may be a costly task; hence, especially in the first iterations it may just not be smart to solve it exactly. This requires properly setting algorithmic parameters of the MPSolver. At least the algorithmic parameters defined in the base class need to be handled by the derived ones, although they can possibly add their own.
|
inlinevirtual |
When a new item is inserted in the bundle, checks can be done to ensure that it is not identical to other items already present, i.e., an useless duplicate [see CheckItem() below]. Since these checks can be costly, they are done only if CheckIdentical( true ) is called; by default, or if CheckIdentical( false ) is called, they are not.
Reimplemented in MPTester, OSIMPSolver, and QPPenaltyMP.
|
pure virtual |
Sets a lower bound on the value of the (translated) model Fi_{B,Lambda}; since Fi_{B,Lambda}( 0 ) = 0, LwBnd must clearly be a nonpositive value.
When Fi is a decomposable function [see SetDim() above], each of its components may have a separate model Fi[ k ]_{B,Lambda}, thus this method has different meanings according to the value of wFi. For 1 <= wFi <= NrFi, the lower bound is on the individual model Fi[ wFi ]_{B,Lambda}, while for wFi > NrFi the lower bound is on the global model Fi_{B,Lambda} = sum_{k = 0 ... NrFi} Fi[ k ]_{B,Lambda}. Note that the 0-th component is taken into account for the global model, while, being a linear function, it clearly cannot have any "individual" lower bound.
These lower bounds are automatically updated when the current point Lambda is changed [see ChangeCurrPoint() below], and they are equivalent to inserting in the bundle of the proper component an all-0 subgradient with alfa_{Lambda}[ i ] = - LwBnd (which is nonnegative). The same holds for the "global" lower bound, except that it is an "aggregated" all-zero subgradient.
Passing - Inf< HpNum >() as the lower bound means that no such bound is available; this is the default.
Implemented in MPTester, OSIMPSolver, and QPPenaltyMP.
|
inlinevirtual |
The class outputs "log" information onto the ostream pointed by outs. lvl controls the "level of verbosity" of the code: lvl == 0 means that nothing at all is printed, and values larger than 0 mean increasing amounts of information, the specific effect of each value being derived- class-dependent. outs == 0 implies lvl == 0.
Reimplemented in MPTester, and QPPenaltyMP.
|
inlinevirtual |
SetMPTime() allocates an OPTtimers object [see OPTtypes.h] that should be used for timing the calls to relevant methods of the class. The time can be read with MPTime() [see below]. By default, or if SetMPTime( false ) is called, no timing is done. Note that, since all the relevant methods of the class are pure virtual, MPSolver can only manage the OPTtimers object, but it is due to derived classes to actually implement the timing.
Note that time accumulates over the calls: calling SetMPTime(), however, resets the counters, allowing to time specific groups of calls.
Reimplemented in MPTester.
|
pure virtual |
Change "float" algorithmic parameters of the MPSolver. This method is pure virtual, i.e., it has to be defined in derived classes, which may extend this it to allow setting the algorithmic-specific parameters.
The enum MPParam is used for selecting the parameter to be set, with the following intended meaning:
Note that the type of ‘wp’ is int rather than MPParam, which is not a problem as enums can always be used where intsare required (i.e., SetPar( MPSolver::kMaxTime , ... ) is a valid call). This is done in order to allow derived classes to extend the set of parameters they can handle while keeping the same signature for SetPar().
Implemented in MPTester, OSIMPSolver, and QPPenaltyMP.
|
inlinevirtual |
Set the maximum number of threads that the MPSolver is allowed to use. This method is given a default empty implementation (doing nothing) for those MPSolver that do no have any parallel processing capability.
Reimplemented in MPTester, and OSIMPSolver.