Scippy

UG

Ubiquity Generator framework

ScipParaSolutionMpi Class Reference

#include <scipParaSolutionMpi.h>

Inheritance diagram for ScipParaSolutionMpi:
ScipParaSolution BbParaSolution ParaSolution

Public Member Functions

 ScipParaSolutionMpi ()
 
 ScipParaSolutionMpi (ScipParaSolver *solver, SCIP_Real objval, int inNvars, SCIP_VAR **vars, SCIP_Real *vals)
 
 ScipParaSolutionMpi (double inObjectiveFunctionValue, int inNVars, int *inIndicesAmongSolvers, SCIP_Real *inValues)
 
 ~ScipParaSolutionMpi ()
 
ScipParaSolutionMpiclone (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

MPI_Datatype createPreDatatype ()
 
MPI_Datatype createDatatype (bool memAllocNecessary)
 

Additional Inherited Members

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

Detailed Description

ScipSolution class

Definition at line 49 of file scipParaSolutionMpi.h.

Constructor & Destructor Documentation

◆ ScipParaSolutionMpi() [1/3]

default constructor

Definition at line 59 of file scipParaSolutionMpi.h.

Referenced by ScipParaSolutionMpi::clone().

◆ ScipParaSolutionMpi() [2/3]

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

constructor

Definition at line 65 of file scipParaSolutionMpi.h.

◆ ScipParaSolutionMpi() [3/3]

ScipParaSolutionMpi ( 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 75 of file scipParaSolutionMpi.h.

◆ ~ScipParaSolutionMpi()

destructor

Definition at line 83 of file scipParaSolutionMpi.h.

Member Function Documentation

◆ bcast()

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

◆ clone()

◆ createDatatype()

MPI_Datatype createDatatype ( bool  memAllocNecessary)
private

create scipSolutionDatatype

create ScipDiffSubproblemDatatype

Definition at line 91 of file scipParaSolutionMpi.cpp.

References ScipParaSolution::indicesAmongSolvers, MPI_CALL, ScipParaSolution::nVars, and ScipParaSolution::values.

Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionMpi::receive(), and ScipParaSolutionMpi::send().

◆ createPreDatatype()

MPI_Datatype createPreDatatype ( )
private

create scipSolutionPreDatatype

create ScipDiffSubproblemPreDatatype

Definition at line 53 of file scipParaSolutionMpi.cpp.

References MPI_CALL, ScipParaSolution::nVars, and ScipParaSolution::objectiveFunctionValue.

Referenced by ScipParaSolutionMpi::bcast(), ScipParaSolutionMpi::receive(), and ScipParaSolutionMpi::send().

◆ receive()

◆ send()