ConicBundle
Public Member Functions | List of all members
ConicBundle::ModifiableOracleObject Class Reference

ModifiableOracle provides all oracles with a uniform interface for a modification routine and an on/off switch for internal correctness checks. More...

#include <MatrixCBSolver.hxx>

Inheritance diagram for ConicBundle::ModifiableOracleObject:
ConicBundle::FunctionObject ConicBundle::BoxOracle ConicBundle::MatrixFunctionOracle ConicBundle::PSCOracle ConicBundle::SOCOracle ConicBundle::CFunction ConicBundle::NNCBoxSupportFunction ConicBundle::PSCAffineFunction ConicBundle::SOCSupportFunction

Public Member Functions

virtual ~ModifiableOracleObject ()
 virtual destructor
 
virtual int apply_modification (const OracleModification &oracle_modification, const CH_Matrix_Classes::Matrix *new_center, const CH_Matrix_Classes::Matrix *old_center, bool &discard_objective_in_center, bool &discard_model, bool &discard_aggregates, MinorantExtender *&minorant_extender)
 This routine need not be implemented unless variables (constraints in Lagrangean relaxation) are added or deleted on the fly. More...
 
virtual bool check_correctness () const
 switch on/off some correctnes checks on the oracle
 

Detailed Description

ModifiableOracle provides all oracles with a uniform interface for a modification routine and an on/off switch for internal correctness checks.

Member Function Documentation

◆ apply_modification()

virtual int ConicBundle::ModifiableOracleObject::apply_modification ( const OracleModification oracle_modification,
const CH_Matrix_Classes::Matrix new_center,
const CH_Matrix_Classes::Matrix old_center,
bool &  discard_objective_in_center,
bool &  discard_model,
bool &  discard_aggregates,
MinorantExtender *&  minorant_extender 
)
virtual

This routine need not be implemented unless variables (constraints in Lagrangean relaxation) are added or deleted on the fly.

The routine is only called by the solver if the variables indeed get modified. oracle_modification is then used to either transfer user supplied instructions to the oracle on how to modify itself or to inform the oracle about changes the solver was asked to perform on the variables. If available, the solver will also show the effect of these changes on the center point in new_center and old_center; if these are not available then they hold NULL. A user supplied oracle_modification will be checked for consistency with the actual changes in the variables and mismatches will cause failures.

The remaining variables are output variables by which the oracle tells the solver which information has a chance to be preserved in view of these changes. If e.g. the deletion of some nonzero variables invalidates the function value in the new center, the oracle has to set discard_objective_in_center=true. If the entire model cannot be preserved (this includes the aggregates and the function values), the oracle needs to set discard_model=true; If only aggregate minorants cannot be preserved, the oracle needs to set discard_aggregates=true. Whenever new variables were added, the model can only be preserved if the remaining minorants (maybe without aggregates) can be extended for these new variables. In this case the oracle has to supply the appropriate MinorantExtender via minorant_extender and only those minorants will be kept for which this operation succeeds.

Return value 0 indicates that these actions allow to continue without errors, other return values result in an overall error on these changes. The default implementation just returns 1 and does not allow modifications.

Reimplemented in ConicBundle::PSCOracle, ConicBundle::PSCAffineFunction, ConicBundle::SOCOracle, ConicBundle::SOCSupportFunction, ConicBundle::NNCBoxSupportFunction, ConicBundle::BoxOracle, and ConicBundle::CFunction.


The documentation for this class was generated from the following file: