37#ifndef __SCIP_PARA_INSTANCE_TH_H__
38#define __SCIP_PARA_INSTANCE_TH_H__
46#include "scip/cons_linear.h"
110 return SCIPretransformObj(
orgScip, SCIPretransformObj(
scip, internalValue) );
114 return SCIPretransformObj(
scip, internalValue);
123 return SCIPtransformObj(
scip, SCIPtransformObj(
orgScip, externalValue));
127 return SCIPtransformObj(
scip, externalValue);
137 SCIP_CALL_ABORT( SCIPcreateSol(
scip, &newsol, 0) );
138 SCIP_VAR **vars = SCIPgetVars(
scip);
166 SCIP_CALL_ABORT(SCIPgetSolVals(
scip, newsol, SCIPgetNVars(
scip), SCIPgetVars(
scip), vals) );
169#if (SCIP_VERSION < 321 || ( SCIP_VERSION == 321 && SCIP_SUBVERSION < 2) )
170 SCIP_CALL_ABORT( SCIPtrySolFree(
scip, &newsol, FALSE, TRUE, TRUE, TRUE, &success) );
172 SCIP_CALL_ABORT( SCIPtrySolFree(
scip, &newsol, FALSE, TRUE, TRUE, TRUE, TRUE, &success) );
192 bool noPreprocessingInLC,
193 bool usetRootNodeCuts,
196 char *settingsNameLC,
204 return std::string(
"Should be written from scip environment.");
212 return SCIPgetProbName(
orgScip);
216 return SCIPgetProbName(
scip);
224 SCIP_VAR **vars = SCIPgetVars(
scip);
225 return SCIPvarGetLbGlobal(vars[i]);
229 SCIP_VAR **vars = SCIPgetVars(
scip);
230 return SCIPvarGetUbGlobal(vars[i]);
234 SCIP_VAR **vars = SCIPgetVars(
scip);
235 return SCIPvarGetType(vars[i]);
239 SCIP_VAR **vars = SCIPgetVars(
scip);
240 return SCIPvarGetObj(vars[i]);
245 SCIP_VAR **vars = SCIPgetVars(
scip);
246 return SCIPvarGetName(vars[i]);
251 return SCIPgetNConss(
scip);
256 SCIP_CONS **conss = SCIPgetConss(
scip);
257 SCIP_CONSHDLR* conshdlr = SCIPconsGetHdlr(conss[i]);
258 assert( conshdlr != NULL );
259 if( strcmp(SCIPconshdlrGetName(conshdlr),
"linear") != 0 )
261 THROW_LOGICAL_ERROR2(
"invalid constraint type exists; consname = ", SCIPconshdlrGetName(conshdlr));
263 return SCIPgetLhsLinear(
scip, conss[i]);
268 SCIP_CONS **conss = SCIPgetConss(
scip);
269 SCIP_CONSHDLR* conshdlr = SCIPconsGetHdlr(conss[i]);
270 assert( conshdlr != NULL );
271 if( strcmp(SCIPconshdlrGetName(conshdlr),
"linear") != 0 )
273 THROW_LOGICAL_ERROR2(
"invalid constraint type exists; consname = ", SCIPconshdlrGetName(conshdlr));
275 return SCIPgetRhsLinear(
scip, conss[i]);
280 SCIP_CONS **conss = SCIPgetConss(
scip);
281 SCIP_CONSHDLR* conshdlr = SCIPconsGetHdlr(conss[i]);
282 assert( conshdlr != NULL );
283 if( strcmp(SCIPconshdlrGetName(conshdlr),
"linear") != 0 )
285 THROW_LOGICAL_ERROR2(
"invalid constraint type exists; consname = ", SCIPconshdlrGetName(conshdlr));
287 return SCIPgetNVarsLinear(
scip, conss[i]);
292 SCIP_CONS **conss = SCIPgetConss(
scip);
293 SCIP_VAR **vars = SCIPgetVarsLinear(
scip, conss[i]);
294 return SCIPvarGetProbindex(vars[j]);
299 SCIP_CONS **conss = SCIPgetConss(
scip);
300 return SCIPgetValsLinear(
scip, conss[i]);
305 SCIP_CONS **conss = SCIPgetConss(
scip);
306 return SCIPconsGetName(conss[i]);
361 return SCIPgetObjsense(
scip);;
386 std::cout <<
"This function should name be used for FiberSCIP!" << std::endl;
413 std::cout <<
"This function should name be used for FiberSCIP!" << std::endl;
Base class of communicator for UG Framework.
Base class for instance data.
void setFileName(const char *file)
const char * getFileName()
int bcast(UG::ParaComm *comm, int rank, int method)
double convertToInternalValue(double externalValue)
bool isCopyIncreasedVariables()
bool isSolverLocalIndeciesMap()
const std::string toString()
SCIP * getParaInstanceScip()
const char * getVarName(int i)
SCIP_Real * getLinearCoefs(int i)
int * extractOrigProbIndexMap()
const char * getConsName(int i)
int * mapToSolverLocalIndecies
SCIP_Real getVarLb(int i)
void getSolValuesForOriginalProblem(ScipParaSolution *sol, SCIP_Real *vals)
virtual const char * getFileName()=0
void copyIncrasedVariables()
int getOrigProbIndex(int index)
int * extractSolverLocalIndexMap()
double convertToExternalValue(double internalValue)
virtual ~ScipParaInstance()
int getNVarsLinear(int i)
bool copyIncreasedVariables
const char * getProbName()
void setUserPlugins(ScipUserPlugins *inUi)
SCIP_Real getObjCoef(int i)
virtual void setFileName(const char *file)=0
SCIP_Real getRhsLinear(int i)
ScipParaInstance(SCIP *inScip)
SCIP_Real getVarUb(int i)
SCIP_Real getLhsLinear(int i)
int * mapToOriginalIndecies
void createProblem(SCIP *scip, int method, bool noPreprocessingInLC, bool usetRootNodeCuts, ScipDiffParamSet *scipDiffParamSetRoot, ScipDiffParamSet *scipDiffParamSet, char *settingsNameLC, char *isolname)
bool isOriginalIndeciesMap()
void copyScipEnvironment(SCIP **scip)
int getIdxLinearCoefVar(int i, int j)
void includeUserPlugins(SCIP *inScip)
int indexAmongSolvers(int index)
Base class of communicator object.
static ScipParaCommTh * comm
ScipParaInstanceTh * ScipParaInstanceThPtr
#define THROW_LOGICAL_ERROR2(msg1, msg2)
SCIP parameter set to be transferred ( Only keep difference between default settings ).
ParaSolution extension for SCIP solver.