Scippy

UG

Ubiquity Generator framework

ScipParaSolutionTh Class Reference

#include <scipParaSolutionTh.h>

Inheritance diagram for ScipParaSolutionTh:
ScipParaSolution BbParaSolution ParaSolution

Public Member Functions

 ScipParaSolutionTh ()
 
 ScipParaSolutionTh (ScipParaSolver *solver, SCIP_Real objval, int inNvars, SCIP_VAR **vars, SCIP_Real *vals)
 
 ScipParaSolutionTh (double inObjectiveFunctionValue, int inNVars, int *inIndicesAmongSolvers, SCIP_Real *inValues)
 
 ~ScipParaSolutionTh ()
 
ScipParaSolutionThclone (UG::ParaComm *comm)
 
void bcast (UG::ParaComm *comm, int root)
 
void send (UG::ParaComm *comm, int destination)
 
void receive (UG::ParaComm *comm, int source)
 
- Public Member Functions inherited from ScipParaSolution
 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 ParaSolutionclone (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...
 

Private Member Functions

ScipParaSolutionThcreateDatatype (UG::ParaComm *comm)
 

Additional Inherited Members

- Protected Attributes inherited from ScipParaSolution
double objectiveFunctionValue
 
int nVars
 
int * indicesAmongSolvers
 
SCIP_Real * values
 

Detailed Description

ScipSolution class

Definition at line 50 of file scipParaSolutionTh.h.

Constructor & Destructor Documentation

◆ ScipParaSolutionTh() [1/3]

default constructor

Definition at line 58 of file scipParaSolutionTh.h.

Referenced by ScipParaSolutionTh::clone().

◆ ScipParaSolutionTh() [2/3]

ScipParaSolutionTh ( ScipParaSolver solver,
SCIP_Real  objval,
int  inNvars,
SCIP_VAR **  vars,
SCIP_Real *  vals 
)

constructor

Definition at line 64 of file scipParaSolutionTh.h.

◆ ScipParaSolutionTh() [3/3]

ScipParaSolutionTh ( double  inObjectiveFunctionValue,
int  inNVars,
int *  inIndicesAmongSolvers,
SCIP_Real *  inValues 
)

constructor

Parameters
inObjectiveFunctionValueobjective function value
inNVarsnumber of variables
inIndicesAmongSolversarray of variable indices ( probindex )
inValuesarray of bounds which the branchings

Definition at line 74 of file scipParaSolutionTh.h.

◆ ~ScipParaSolutionTh()

destructor

Definition at line 82 of file scipParaSolutionTh.h.

Member Function Documentation

◆ bcast()

void bcast ( UG::ParaComm comm,
int  root 
)
virtual

◆ clone()

◆ createDatatype()

ScipParaSolutionTh * createDatatype ( UG::ParaComm comm)
private

create scipSolutionDatatype

create ScipDiffSubproblemPreDatatype

Definition at line 51 of file scipParaSolutionTh.cpp.

References ScipParaSolutionTh::clone(), and comm.

Referenced by ScipParaSolutionTh::bcast(), and ScipParaSolutionTh::send().

◆ receive()

void receive ( UG::ParaComm comm,
int  source 
)
virtual

◆ send()

void send ( UG::ParaComm comm,
int  destination 
)
virtual

send solution data to the rank

Implements ParaSolution.

Definition at line 98 of file scipParaSolutionTh.cpp.

References comm, ScipParaSolutionTh::createDatatype(), DEF_PARA_COMM, PARA_COMM_CALL, UG::ParaSolutionType, and UG::TagSolution.