#include <scipParaSolution.h>
Public Member Functions | |
ScipParaSolution () | |
ScipParaSolution (ScipParaSolver *solver, SCIP_Real objval, int inNvars, SCIP_VAR **vars, SCIP_Real *vals) | |
ScipParaSolution (double inObjectiveFunctionValue, int inNVars, int *inIndicesAmongSolvers, SCIP_Real *inValues) | |
virtual | ~ScipParaSolution () |
double | getObjectiveFunctionValue () |
void | setObjectiveFuntionValue (SCIP_Real val) |
int | getNVars () |
int | indexAmongSolvers (int index) |
SCIP_Real * | getValues () |
void | setValue (int i, SCIP_Real val) |
void | write (gzstream::ogzstream &out) |
bool | read (UG::ParaComm *comm, gzstream::igzstream &in) |
const std::string | toString () |
Public Member Functions inherited from BbParaSolution | |
BbParaSolution () | |
DO NOT HAVE DATA MEMBER!! More... | |
virtual | ~BbParaSolution () |
destructor More... | |
virtual double | getObjectiveFunctionValue ()=0 |
get objective function value More... | |
virtual double | getCutOffValue () |
get cutoff value More... | |
Public Member Functions inherited from ParaSolution | |
ParaSolution () | |
DO NOT HAVE DATA MEMBER!! More... | |
virtual | ~ParaSolution () |
destructor More... | |
virtual double | getObjectiveFunctionValue ()=0 |
get objective function value More... | |
virtual ParaSolution * | clone (ParaComm *comm)=0 |
create clone of this object More... | |
virtual void | bcast (ParaComm *comm, int root)=0 |
broadcast solution data More... | |
virtual void | send (ParaComm *comm, int destination)=0 |
send solution data More... | |
virtual void | receive (ParaComm *comm, int source)=0 |
receive solution data More... | |
virtual void | write (gzstream::ogzstream &out)=0 |
function to write ParaSolution object to checkpoint file More... | |
virtual bool | read (ParaComm *comm, gzstream::igzstream &in)=0 |
function to read ParaSolution object from checkpoint file More... | |
virtual const std::string | toString () |
stringfy ParaSolution object More... | |
Protected Attributes | |
double | objectiveFunctionValue |
int | nVars |
int * | indicesAmongSolvers |
SCIP_Real * | values |
ScipParaSolution class
Definition at line 49 of file scipParaSolution.h.
ScipParaSolution | ( | ) |
constructor
Definition at line 58 of file scipParaSolution.h.
ScipParaSolution | ( | ScipParaSolver * | solver, |
SCIP_Real | objval, | ||
int | inNvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals | ||
) |
Definition at line 64 of file scipParaSolution.h.
References ScipParaSolver::getOriginalIndex(), ScipParaSolution::indicesAmongSolvers, ScipParaSolver::isOriginalIndeciesMap(), ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, and ScipParaSolution::values.
ScipParaSolution | ( | double | inObjectiveFunctionValue, |
int | inNVars, | ||
int * | inIndicesAmongSolvers, | ||
SCIP_Real * | inValues | ||
) |
inObjectiveFunctionValue | objective function value |
inNVars | number of variables |
inIndicesAmongSolvers | array of variable indices ( probindex ) |
inValues | array of bounds which the branchings |
Definition at line 106 of file scipParaSolution.h.
References ScipParaSolution::indicesAmongSolvers, ScipParaSolution::nVars, and ScipParaSolution::values.
|
virtual |
destructor
Definition at line 126 of file scipParaSolution.h.
References ScipParaSolution::indicesAmongSolvers, and ScipParaSolution::values.
int getNVars | ( | ) |
get number of variables
Definition at line 140 of file scipParaSolution.h.
References ScipParaSolution::nVars.
Referenced by ScipParaInstance::getSolValuesForOriginalProblem(), ScipParaInitiator::outputFinalSolverStatistics(), ScipParaSolver::tryNewSolution(), and ScipParaInitiator::tryToSetIncumbentSolution().
|
virtual |
get objective function value
Implements BbParaSolution.
Definition at line 134 of file scipParaSolution.h.
References ScipParaSolution::objectiveFunctionValue.
Referenced by ScipParaInitiator::getAbsgap(), ScipParaInitiator::getGap(), ScipParaInitiator::outputFinalSolverStatistics(), ScipParaInitiator::readSolutionFromCheckpointFile(), ScipParaInitiator::sendSolverInitializationMessage(), and ScipParaInitiator::tryToSetIncumbentSolution().
SCIP_Real * getValues | ( | ) |
Definition at line 144 of file scipParaSolution.h.
References ScipParaSolution::values.
Referenced by ScipParaInstance::getSolValuesForOriginalProblem(), ScipParaSolver::tryNewSolution(), and ScipParaInitiator::tryToSetIncumbentSolution().
int indexAmongSolvers | ( | int | index | ) |
Definition at line 142 of file scipParaSolution.h.
References ScipParaSolution::indicesAmongSolvers.
Referenced by ScipParaInstance::getSolValuesForOriginalProblem(), ScipParaSolver::tryNewSolution(), and ScipParaInitiator::tryToSetIncumbentSolution().
|
virtual |
user should implement read method
Implements ParaSolution.
Definition at line 58 of file scipParaSolution.cpp.
References ScipParaSolution::indicesAmongSolvers, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, and ScipParaSolution::values.
Referenced by ScipParaInitiator::readSolutionFromCheckpointFile().
void setObjectiveFuntionValue | ( | SCIP_Real | val | ) |
set objective function value
Definition at line 137 of file scipParaSolution.h.
References ScipParaSolution::objectiveFunctionValue.
Referenced by ScipParaInitiator::tryToSetIncumbentSolution().
void setValue | ( | int | i, |
SCIP_Real | val | ||
) |
Definition at line 145 of file scipParaSolution.h.
References ScipParaSolution::values.
Referenced by ScipParaInitiator::tryToSetIncumbentSolution().
|
virtual |
stringfy solution
Reimplemented from ParaSolution.
Definition at line 156 of file scipParaSolution.h.
References ScipParaSolution::indicesAmongSolvers, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, and ScipParaSolution::values.
|
virtual |
user should implement write method
Implements ParaSolution.
Definition at line 44 of file scipParaSolution.cpp.
References ScipParaSolution::indicesAmongSolvers, ScipParaSolution::nVars, ScipParaSolution::objectiveFunctionValue, and ScipParaSolution::values.
Referenced by ScipParaInitiator::writeCheckpointSolution().
|
protected |
array of variable indices, mapping SCIPvarGetProbindex to SCIPvarGetIndex
Definition at line 54 of file scipParaSolution.h.
Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionTh::bcast(), ScipParaSolutionMpi::clone(), ScipParaSolutionTh::clone(), ScipParaSolutionMpi::createDatatype(), ScipParaSolution::indexAmongSolvers(), ScipParaSolution::read(), ScipParaSolutionMpi::receive(), ScipParaSolutionTh::receive(), ScipParaSolution::ScipParaSolution(), ScipParaSolutionMpi::send(), ScipParaSolution::toString(), ScipParaSolution::write(), and ScipParaSolution::~ScipParaSolution().
|
protected |
number of variables
Definition at line 53 of file scipParaSolution.h.
Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionTh::bcast(), ScipParaSolutionMpi::clone(), ScipParaSolutionTh::clone(), ScipParaSolutionMpi::createDatatype(), ScipParaSolutionMpi::createPreDatatype(), ScipParaSolution::getNVars(), ScipParaSolution::read(), ScipParaSolutionMpi::receive(), ScipParaSolutionTh::receive(), ScipParaSolution::ScipParaSolution(), ScipParaSolutionMpi::send(), ScipParaSolution::toString(), and ScipParaSolution::write().
|
protected |
Definition at line 52 of file scipParaSolution.h.
Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionTh::bcast(), ScipParaSolutionMpi::clone(), ScipParaSolutionTh::clone(), ScipParaSolutionMpi::createPreDatatype(), ScipParaSolution::getObjectiveFunctionValue(), ScipParaSolution::read(), ScipParaSolutionMpi::receive(), ScipParaSolutionTh::receive(), ScipParaSolution::ScipParaSolution(), ScipParaSolutionMpi::send(), ScipParaSolution::setObjectiveFuntionValue(), ScipParaSolution::toString(), and ScipParaSolution::write().
|
protected |
array of bounds which the branchings
Definition at line 55 of file scipParaSolution.h.
Referenced by ScipParaSolutionTh::bcast(), ScipParaSolutionMpi::clone(), ScipParaSolutionTh::clone(), ScipParaSolutionMpi::createDatatype(), ScipParaSolution::getValues(), ScipParaSolution::read(), ScipParaSolutionTh::receive(), ScipParaSolution::ScipParaSolution(), ScipParaSolution::setValue(), ScipParaSolution::toString(), ScipParaSolution::write(), and ScipParaSolution::~ScipParaSolution().