Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for storing primal CIP solutions

Author
Tobias Achterberg

Definition in file sol.c.

#include "scip/clock.h"
#include "scip/cons.h"
#include "scip/lp.h"
#include "scip/lpexact.h"
#include "scip/misc.h"
#include "scip/nlp.h"
#include "scip/primal.h"
#include "scip/prob.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/relax.h"
#include "scip/set.h"
#include "scip/sol.h"
#include "scip/stat.h"
#include "scip/struct_lp.h"
#include "scip/struct_lpexact.h"
#include "scip/struct_prob.h"
#include "scip/struct_set.h"
#include "scip/struct_sol.h"
#include "scip/struct_stat.h"
#include "scip/struct_var.h"
#include "scip/tree.h"
#include "scip/var.h"

Go to the source code of this file.

Functions

static SCIP_RETCODE solClearArrays (SCIP_SOL *sol)
 
static SCIP_RETCODE solSetArrayVal (SCIP_SOL *sol, SCIP_SET *set, SCIP_VAR *var, SCIP_Real val)
 
static SCIP_RETCODE solSetArrayValExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_VAR *var, SCIP_RATIONAL *val)
 
static SCIP_RETCODE solIncArrayVal (SCIP_SOL *sol, SCIP_SET *set, SCIP_VAR *var, SCIP_Real incval)
 
static SCIP_Real solGetArrayVal (SCIP_SOL *sol, SCIP_VAR *var)
 
static void solGetArrayValExact (SCIP_RATIONAL *res, SCIP_SOL *sol, SCIP_VAR *var)
 
static SCIP_RETCODE solUnlinkVar (SCIP_SOL *sol, SCIP_SET *set, SCIP_VAR *var)
 
static SCIP_RETCODE solUnlinkVarExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_VAR *var)
 
static void solStamp (SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_Bool checktime)
 
SCIP_RETCODE SCIPsolCreate (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateExact (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPvalsExactCopy (SCIP_VALSEXACT **valsexact, BMS_BLKMEM *blkmem, SCIP_VALSEXACT *sourcevals)
 
SCIP_RETCODE SCIPsolCreateOriginal (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateOriginalExact (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCopy (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_SOL *sourcesol)
 
SCIP_RETCODE SCIPsolTransform (SCIP_SOL *sol, SCIP_SOL **transsol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal)
 
SCIP_RETCODE SCIPsolAdjustImplicitSolVals (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool uselprows)
 
SCIP_RETCODE SCIPsolCreateLPSol (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateLPSolExact (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LPEXACT *lp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateNLPSol (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_NLP *nlp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateRelaxSol (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_RELAXATION *relaxation, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreatePseudoSol (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreatePseudoSolExact (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LPEXACT *lp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateCurrentSol (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateCurrentSolExact (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LPEXACT *lp, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreatePartial (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_HEUR *heur)
 
SCIP_RETCODE SCIPsolCreateUnknown (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
 
static SCIP_RETCODE valsExactFree (SCIP_VALSEXACT **valsexact, BMS_BLKMEM *blkmem)
 
SCIP_RETCODE SCIPsolFree (SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_PRIMAL *primal)
 
SCIP_RETCODE SCIPsolLinkLPSol (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
 
SCIP_RETCODE SCIPsolLinkLPSolExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_LPEXACT *lp)
 
SCIP_RETCODE SCIPsolLinkNLPSol (SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_NLP *nlp)
 
SCIP_RETCODE SCIPsolLinkRelaxSol (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_RELAXATION *relaxation)
 
SCIP_RETCODE SCIPsolLinkPseudoSol (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
 
SCIP_RETCODE SCIPsolLinkPseudoSolExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_LPEXACT *lp)
 
SCIP_RETCODE SCIPsolLinkCurrentSol (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
 
SCIP_RETCODE SCIPsolClear (SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree)
 
SCIP_RETCODE SCIPsolSetUnknown (SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree)
 
SCIP_RETCODE SCIPsolUnlink (SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *prob)
 
SCIP_RETCODE SCIPsolUnlinkExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *prob)
 
SCIP_RETCODE SCIPsolSetVal (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real val)
 
SCIP_RETCODE SCIPsolSetValExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_VAR *var, SCIP_RATIONAL *val)
 
SCIP_RETCODE SCIPsolIncVal (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real incval)
 
SCIP_Real SCIPsolGetVal (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var)
 
void SCIPsolGetValExact (SCIP_RATIONAL *res, SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var)
 
SCIP_Real SCIPsolGetRayVal (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var)
 
SCIP_Real SCIPsolGetObj (SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
 
void SCIPsolGetObjExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_RATIONAL *objval)
 
void SCIPsolUpdateVarObj (SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real oldobj, SCIP_Real newobj)
 
SCIP_RETCODE SCIPsolMarkPartial (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **vars, int nvars)
 
static SCIP_RETCODE solCheckExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checklprows, SCIP_Bool *feasible)
 
SCIP_RETCODE SCIPsolCheckOrig (SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool checkmodifiable, SCIP_Bool *feasible)
 
SCIP_RETCODE SCIPsolCheck (SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)
 
SCIP_RETCODE SCIPsolRound (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool *success)
 
SCIP_RETCODE SCIPsolMakeExact (SCIP_SOL *sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob)
 
SCIP_RETCODE SCIPsolMakeReal (SCIP_SOL *sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob)
 
void SCIPsolUpdateVarsum (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Real weight)
 
SCIP_RETCODE SCIPsolRetransform (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_Bool *hasinfval)
 
SCIP_RETCODE SCIPsolRetransformExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_Bool *hasinfval)
 
void SCIPsolRecomputeObj (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob)
 
void SCIPsolRecomputeInternObjExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob)
 
static SCIP_Bool solsAreEqualExact (SCIP_SOL *sol1, SCIP_SOL *sol2, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob)
 
SCIP_Bool SCIPsolsAreEqual (SCIP_SOL *sol1, SCIP_SOL *sol2, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob)
 
SCIP_RETCODE SCIPsolPrint (SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PROB *transprob, FILE *file, SCIP_Bool mipstart, SCIP_Bool printzeros)
 
SCIP_RETCODE SCIPsolPrintExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PROB *transprob, FILE *file, SCIP_Bool mipstart, SCIP_Bool printzeros)
 
SCIP_RETCODE SCIPsolPrintRay (SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PROB *transprob, FILE *file, SCIP_Bool printzeros)
 
void SCIPsolSetOrigin (SCIP_SOL *sol, SCIP_SOLORIGIN origin)
 
void SCIPsolResetViolations (SCIP_SOL *sol)
 
void SCIPsolUpdateIntegralityViolation (SCIP_SOL *sol, SCIP_Real absviolintegrality)
 
void SCIPsolUpdateBoundViolation (SCIP_SOL *sol, SCIP_Real absviolbounds, SCIP_Real relviolbounds)
 
void SCIPsolUpdateLPRowViolation (SCIP_SOL *sol, SCIP_Real absviollprows, SCIP_Real relviollprows)
 
void SCIPsolUpdateConsViolation (SCIP_SOL *sol, SCIP_Real absviolcons, SCIP_Real relviolcons)
 
void SCIPsolUpdateLPConsViolation (SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
 
SCIP_Real SCIPsolGetAbsBoundViolation (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetRelBoundViolation (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetAbsIntegralityViolation (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetAbsLPRowViolation (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetRelLPRowViolation (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetAbsConsViolation (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetRelConsViolation (SCIP_SOL *sol)
 
SCIP_RETCODE SCIPsolOverwriteFPSolWithExact (SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree)
 
 SCIP_DECL_SORTPTRCOMP (SCIPsolComp)
 
SCIP_SOLORIGIN SCIPsolGetOrigin (SCIP_SOL *sol)
 
SCIP_Bool SCIPsolIsOriginal (SCIP_SOL *sol)
 
SCIP_Bool SCIPsolIsExact (SCIP_SOL *sol)
 
SCIP_Bool SCIPsolIsPartial (SCIP_SOL *sol)
 
SCIP_Real SCIPsolGetOrigObj (SCIP_SOL *sol)
 
SCIP_RATIONALSCIPsolGetOrigObjExact (SCIP_SOL *sol)
 
void SCIPsolOrigAddObjval (SCIP_SOL *sol, SCIP_Real addval)
 
void SCIPsolOrigAddObjvalExact (SCIP_SOL *sol, SCIP_RATIONAL *addval)
 
SCIP_Real SCIPsolGetTime (SCIP_SOL *sol)
 
int SCIPsolGetRunnum (SCIP_SOL *sol)
 
SCIP_Longint SCIPsolGetNodenum (SCIP_SOL *sol)
 
int SCIPsolGetDepth (SCIP_SOL *sol)
 
SCIP_HEURSCIPsolGetHeur (SCIP_SOL *sol)
 
int SCIPsolGetPrimalIndex (SCIP_SOL *sol)
 
void SCIPsolSetPrimalIndex (SCIP_SOL *sol, int primalindex)
 
int SCIPsolGetIndex (SCIP_SOL *sol)
 
void SCIPsolSetHeur (SCIP_SOL *sol, SCIP_HEUR *heur)
 
SCIP_SOLTYPE SCIPsolGetType (SCIP_SOL *sol)
 
SCIP_RELAXSCIPsolGetRelax (SCIP_SOL *sol)
 
void SCIPsolSetRelax (SCIP_SOL *sol, SCIP_RELAX *relax)
 
void SCIPsolSetLPRelaxation (SCIP_SOL *sol)
 
void SCIPsolSetStrongbranching (SCIP_SOL *sol)
 
void SCIPsolSetPseudo (SCIP_SOL *sol)
 

Function Documentation

◆ solClearArrays()

◆ solSetArrayVal()

static SCIP_RETCODE solSetArrayVal ( SCIP_SOL sol,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  val 
)
static

sets value of variable in the solution's array

Parameters
solprimal CIP solution
setglobal SCIP settings
varproblem variable
valvalue to set variable to

Definition at line 80 of file sol.c.

References SCIP_Sol::hasinfval, NULL, SCIP_CALL, SCIP_OKAY, SCIP_UNKNOWN, SCIPboolarraySetVal(), SCIPrealarraySetVal(), SCIPsetIsInfinity(), SCIPvarGetIndex(), SCIPvarMarkNotDeletable(), TRUE, SCIP_Sol::valid, and SCIP_Sol::vals.

Referenced by SCIPsolMakeReal(), SCIPsolRetransform(), SCIPsolSetVal(), and solUnlinkVar().

◆ solSetArrayValExact()

static SCIP_RETCODE solSetArrayValExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_VAR var,
SCIP_RATIONAL val 
)
static

sets value of variable in the exact solution's array

Parameters
solprimal CIP solution
setglobal SCIP settings
varproblem variable
valvalue to set variable to

Definition at line 111 of file sol.c.

References SCIP_Sol::hasinfval, NULL, SCIP_CALL, SCIP_OKAY, SCIPboolarraySetVal(), SCIPrationalarraySetVal(), SCIPrationalIsAbsInfinity(), SCIPsolIsExact(), SCIPvarGetIndex(), SCIPvarMarkNotDeletable(), TRUE, SCIP_ValsExact::valid, SCIP_ValsExact::vals, and SCIP_Sol::valsexact.

Referenced by SCIPsolMakeExact(), SCIPsolRetransformExact(), SCIPsolSetValExact(), and solUnlinkVarExact().

◆ solIncArrayVal()

static SCIP_RETCODE solIncArrayVal ( SCIP_SOL sol,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  incval 
)
static

increases value of variable in the solution's array

Parameters
solprimal CIP solution
setglobal SCIP settings
varproblem variable
incvalincrease of variable's solution value

Definition at line 143 of file sol.c.

References SCIP_Sol::hasinfval, NULL, SCIP_CALL, SCIP_OKAY, SCIP_UNKNOWN, SCIPboolarrayGetVal(), SCIPboolarraySetVal(), SCIPrealarrayGetVal(), SCIPrealarrayIncVal(), SCIPrealarraySetVal(), SCIPsetIsInfinity(), SCIPvarGetIndex(), SCIPvarMarkNotDeletable(), TRUE, SCIP_Sol::valid, and SCIP_Sol::vals.

Referenced by SCIPsolIncVal().

◆ solGetArrayVal()

◆ solGetArrayValExact()

◆ solUnlinkVar()

◆ solUnlinkVarExact()

◆ solStamp()

static void solStamp ( SCIP_SOL sol,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_Bool  checktime 
)
static

sets the solution time, nodenum, runnum, and depth stamp to the current values

Parameters
solprimal CIP solution
statproblem statistics data
treebranch and bound tree, or NULL
checktimeshould the time be updated?

Definition at line 400 of file sol.c.

References SCIP_Sol::depth, SCIP_Sol::lpcount, SCIP_Stat::lpcount, SCIP_Stat::nnodes, SCIP_Sol::nodenum, SCIP_Stat::nruns, NULL, SCIP_Sol::runnum, SCIPclockGetLastTime(), SCIPclockGetTime(), SCIPtreeGetCurrentDepth(), SCIP_Stat::solvingtime, and SCIP_Sol::time.

Referenced by SCIPsolClear(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreatePartial(), SCIPsolCreateUnknown(), SCIPsolIncVal(), SCIPsolLinkLPSol(), SCIPsolLinkNLPSol(), SCIPsolLinkPseudoSol(), SCIPsolLinkRelaxSol(), SCIPsolSetUnknown(), and SCIPsolSetVal().

◆ SCIPsolCreate()

SCIP_RETCODE SCIPsolCreate ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to zero

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 428 of file sol.c.

References BMSallocBlockMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_ZERO, SCIPboolarrayCreate(), SCIPprimalSolCreated(), SCIPrealarrayCreate(), SCIPsolResetViolations(), SCIPsolSetHeur(), SCIP_Stat::solindex, solStamp(), and TRUE.

Referenced by SCIPcreateSol(), SCIPprimalTransformSol(), SCIPsolCreateExact(), SCIPsolCreateLPSol(), SCIPsolCreateNLPSol(), SCIPsolCreatePseudoSol(), SCIPsolCreateRelaxSol(), and updatePrimalRay().

◆ SCIPsolCreateExact()

SCIP_RETCODE SCIPsolCreateExact ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_HEUR heur 
)

creates primal CIP solution with exact rational values, initialized to zero

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 470 of file sol.c.

References BMSallocBlockMemory, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPboolarrayCreate(), SCIPrationalarrayCreate(), SCIPrationalCreateBlock(), SCIPsolCreate(), and SCIPsolIsExact().

Referenced by SCIPcreateSolExact(), SCIPsolCreateLPSolExact(), and SCIPsolCreatePseudoSolExact().

◆ SCIPvalsExactCopy()

SCIP_RETCODE SCIPvalsExactCopy ( SCIP_VALSEXACT **  valsexact,
BMS_BLKMEM blkmem,
SCIP_VALSEXACT sourcevals 
)

creates a copy of exact solution data

Parameters
valsexactpointer to store the copy of the primal CIP solution
blkmemblock memory
sourcevalsprimal CIP solution to copy

Definition at line 497 of file sol.c.

References BMSallocBlockMemory, NULL, SCIP_ValsExact::obj, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPboolarrayCopy(), SCIPrationalarrayCopy(), SCIPrationalCopyBlock(), SCIP_ValsExact::valid, and SCIP_ValsExact::vals.

Referenced by SCIPsolCopy().

◆ SCIPsolCreateOriginal()

SCIP_RETCODE SCIPsolCreateOriginal ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_HEUR heur 
)

creates primal CIP solution in original problem space, initialized to the offset in the original problem

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
origproboriginal problem data
primalprimal data
treebranch and bound tree
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 514 of file sol.c.

References BMSallocBlockMemory, FALSE, NULL, SCIP_Prob::objoffset, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_ORIGINAL, SCIPboolarrayCreate(), SCIPprimalSolCreated(), SCIPrealarrayCreate(), SCIPsolResetViolations(), SCIPsolSetHeur(), SCIP_Stat::solindex, solStamp(), and TRUE.

Referenced by SCIPcreateOrigSol(), SCIPcreateSol(), and SCIPsolCreateOriginalExact().

◆ SCIPsolCreateOriginalExact()

SCIP_RETCODE SCIPsolCreateOriginalExact ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_HEUR heur 
)

creates exact primal CIP solution in original problem space, initialized to the offset in the original problem

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
origproboriginal problem data
primalprimal data
treebranch and bound tree
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 555 of file sol.c.

References BMSallocBlockMemory, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPboolarrayCreate(), SCIPrationalarrayCreate(), SCIPrationalCreateBlock(), SCIPsolCreateOriginal(), and SCIPsolIsExact().

Referenced by SCIPcreateSolExact().

◆ SCIPsolCopy()

◆ SCIPsolTransform()

SCIP_RETCODE SCIPsolTransform ( SCIP_SOL sol,
SCIP_SOL **  transsol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_PRIMAL primal 
)

transformes given original solution to the transformed space; a corresponding transformed solution has to be given which is copied into the existing solution and freed afterwards

Parameters
solprimal CIP solution to change, living in original space
transsolpointer to corresponding transformed primal CIP solution
blkmemblock memory
setglobal SCIP settings
primalprimal data

Definition at line 658 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_Sol::primalindex, SCIP_CALL, SCIP_OKAY, SCIPsolFree(), SCIPsolIsExact(), SCIPsolIsOriginal(), SCIP_Sol::solorigin, SCIP_Sol::valid, SCIP_Sol::vals, and SCIP_Sol::valsexact.

Referenced by primalAddSol().

◆ SCIPsolAdjustImplicitSolVals()

SCIP_RETCODE SCIPsolAdjustImplicitSolVals ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_TREE tree,
SCIP_Bool  uselprows 
)

adjusts solution values of implied integral variables in handed solution, solution objective value is not deteriorated by this method

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
probeither original or transformed problem, depending on sol origin
treebranch and bound tree
uselprowsshould LP row information be considered for none-objective variables

Definition at line 712 of file sol.c.

References FALSE, NULL, r, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPprobGetNBinVars(), SCIPprobGetNImplVars(), SCIPprobGetNIntVars(), SCIPprobGetVars(), SCIProwGetLhs(), SCIProwGetRhs(), SCIProwGetSolActivity(), SCIProwIsInLP(), SCIProwIsLocal(), SCIPsetCeil(), SCIPsetFloor(), SCIPsetIsFeasGE(), SCIPsetIsFeasGT(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLE(), SCIPsetIsFeasLT(), SCIPsetIsFeasNegative(), SCIPsetIsFeasPositive(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPsolGetVal(), SCIPsolSetVal(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarGetUnchangedObj(), SCIPvarIsImpliedIntegral(), and TRUE.

Referenced by SCIPadjustImplicitSolVals().

◆ SCIPsolCreateLPSol()

SCIP_RETCODE SCIPsolCreateLPSol ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_LP lp,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to the current LP solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
primalprimal data
treebranch and bound tree
lpcurrent LP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 846 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPlpIsSolved(), SCIPsolCreate(), and SCIPsolLinkLPSol().

Referenced by addCurrentSolution(), SCIPcreateLPSol(), SCIPsolCreateCurrentSol(), SCIPsolveCIP(), and solveNodeLP().

◆ SCIPsolCreateLPSolExact()

SCIP_RETCODE SCIPsolCreateLPSolExact ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_LPEXACT lp,
SCIP_HEUR heur 
)

creates primal CIP solution with exact rational values, initialized to the current exact LP solution (will use exact safe dual solution if lp was not solved exactly)

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
lpcurrent LP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 871 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsolCreateExact(), SCIPsolLinkLPSolExact(), and SCIP_LpExact::solved.

Referenced by addCurrentSolution(), SCIPcreateLPSolExact(), SCIPsolCreateCurrentSolExact(), and solveNodeLP().

◆ SCIPsolCreateNLPSol()

SCIP_RETCODE SCIPsolCreateNLPSol ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_NLP nlp,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to the current NLP solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
nlpcurrent NLP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 893 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsolCreate(), and SCIPsolLinkNLPSol().

Referenced by SCIPcreateNLPSol(), and SCIPnlrowRecalcNLPActivity().

◆ SCIPsolCreateRelaxSol()

SCIP_RETCODE SCIPsolCreateRelaxSol ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_RELAXATION relaxation,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to the current relaxation solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
relaxationglobal relaxation data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 914 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPrelaxationGetSolRelax(), SCIPrelaxationIsSolValid(), SCIPsolCreate(), SCIPsolLinkRelaxSol(), and SCIPsolSetRelax().

Referenced by addCurrentSolution(), enforceConstraints(), SCIPcreateRelaxSol(), SCIPsolveCIP(), and solveNode().

◆ SCIPsolCreatePseudoSol()

SCIP_RETCODE SCIPsolCreatePseudoSol ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_LP lp,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to the current pseudo solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
primalprimal data
treebranch and bound tree, or NULL
lpcurrent LP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 940 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsolCreate(), SCIPsolLinkPseudoSol(), and SCIPsolSetPseudo().

Referenced by addCurrentSolution(), SCIPcreatePseudoSol(), SCIPnlrowRecalcPseudoActivity(), SCIPsolCreateCurrentSol(), and SCIPsolveCIP().

◆ SCIPsolCreatePseudoSolExact()

SCIP_RETCODE SCIPsolCreatePseudoSolExact ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_LPEXACT lp,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to the current exact pseudo solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree, or NULL
lpcurrent LP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 965 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsolCreateExact(), and SCIPsolLinkPseudoSolExact().

Referenced by SCIPsolCreateCurrentSolExact().

◆ SCIPsolCreateCurrentSol()

SCIP_RETCODE SCIPsolCreateCurrentSol ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_LP lp,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to the current solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
primalprimal data
treebranch and bound tree
lpcurrent LP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 985 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsolCreateLPSol(), SCIPsolCreatePseudoSol(), and SCIPtreeHasCurrentNodeLP().

Referenced by primalLinkCurrentSol(), SCIPcreateCurrentSol(), SCIPprintSol(), SCIPprintTransSol(), and solveNode().

◆ SCIPsolCreateCurrentSolExact()

SCIP_RETCODE SCIPsolCreateCurrentSolExact ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_LPEXACT lp,
SCIP_HEUR heur 
)

creates primal CIP solution with exact rational values, initialized to the current solution

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
lpcurrent LP data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 1012 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPsolCreateLPSolExact(), SCIPsolCreatePseudoSolExact(), SCIPtreeHasCurrentNodeLP(), and SCIP_LpExact::solved.

Referenced by SCIPprintSolExact().

◆ SCIPsolCreatePartial()

SCIP_RETCODE SCIPsolCreatePartial ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_HEUR heur 
)

creates partial primal CIP solution, initialized to unknown values

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 1039 of file sol.c.

References BMSallocBlockMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_PARTIAL, SCIP_UNKNOWN, SCIPboolarrayCreate(), SCIPprimalSolCreated(), SCIPrealarrayCreate(), SCIPsolResetViolations(), SCIPsolSetHeur(), SCIP_Stat::solindex, solStamp(), and TRUE.

Referenced by SCIPcreatePartialSol().

◆ SCIPsolCreateUnknown()

SCIP_RETCODE SCIPsolCreateUnknown ( SCIP_SOL **  sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PRIMAL primal,
SCIP_TREE tree,
SCIP_HEUR heur 
)

creates primal CIP solution, initialized to unknown values

Parameters
solpointer to primal CIP solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
primalprimal data
treebranch and bound tree
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 1079 of file sol.c.

References BMSallocBlockMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_UNKNOWN, SCIPboolarrayCreate(), SCIPprimalSolCreated(), SCIPrealarrayCreate(), SCIPsolResetViolations(), SCIPsolSetHeur(), SCIP_Stat::solindex, solStamp(), and TRUE.

Referenced by SCIPcreateUnknownSol().

◆ valsExactFree()

static SCIP_RETCODE valsExactFree ( SCIP_VALSEXACT **  valsexact,
BMS_BLKMEM blkmem 
)
static

frees exact solution values

Parameters
valsexactpointer to primal CIP solution
blkmemblock memory

Definition at line 1116 of file sol.c.

References BMSfreeBlockMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPboolarrayFree(), SCIPrationalarrayFree(), and SCIPrationalFreeBlock().

Referenced by SCIPsolFree().

◆ SCIPsolFree()

◆ SCIPsolLinkLPSol()

SCIP_RETCODE SCIPsolLinkLPSol ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_TREE tree,
SCIP_LP lp 
)

copies current LP solution into CIP solution by linking

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
treebranch and bound tree
lpcurrent LP data

Definition at line 1156 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_Col::primsol, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_LPSOL, SCIPcolGetVar(), SCIPlpDiving(), SCIPlpDivingObjChanged(), SCIPlpGetCols(), SCIPlpGetLooseObjval(), SCIPlpGetNCols(), SCIPlpGetObjval(), SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPtreeProbing(), SCIPvarGetUnchangedObj(), solClearArrays(), SCIP_Sol::solorigin, solStamp(), SCIP_Lp::solved, and TRUE.

Referenced by SCIPlinkLPSol(), SCIPsolCreateLPSol(), and SCIPsolLinkCurrentSol().

◆ SCIPsolLinkLPSolExact()

SCIP_RETCODE SCIPsolLinkLPSolExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_LPEXACT lp 
)

copies current exact LP solution into exact CIP solution by linking

Parameters
solprimal CIP solution
setglobal SCIP settings
lpcurrent LP data

Definition at line 1214 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_ValsExact::obj, SCIP_CALL, SCIP_OKAY, SCIP_R_ROUND_UPWARDS, SCIP_SOLORIGIN_LPSOL, SCIPlpExactGetObjval(), SCIPrationalRoundReal(), SCIPsolIsExact(), solClearArrays(), SCIP_Sol::solorigin, SCIP_LpExact::solved, and SCIP_Sol::valsexact.

Referenced by SCIPlinkLPSolExact(), and SCIPsolCreateLPSolExact().

◆ SCIPsolLinkNLPSol()

SCIP_RETCODE SCIPsolLinkNLPSol ( SCIP_SOL sol,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_NLP nlp 
)

copies current NLP solution into CIP solution by linking

Parameters
solprimal CIP solution
statproblem statistics data
treebranch and bound tree
nlpcurrent NLP data

Definition at line 1237 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_NLPSOL, SCIPnlpGetNVars(), SCIPnlpGetObjval(), SCIPnlpGetVars(), SCIPnlpHasSolution(), SCIPnlpIsDivingObjChanged(), SCIPstatDebugMsg, SCIPvarGetNLPSol(), SCIPvarGetUnchangedObj(), SCIPvarIsActive(), solClearArrays(), SCIP_Sol::solorigin, solStamp(), and TRUE.

Referenced by SCIPlinkNLPSol(), and SCIPsolCreateNLPSol().

◆ SCIPsolLinkRelaxSol()

SCIP_RETCODE SCIPsolLinkRelaxSol ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_RELAXATION relaxation 
)

copies current relaxation solution into CIP solution by linking

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
treebranch and bound tree
relaxationglobal relaxation data

Definition at line 1288 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_RELAXSOL, SCIPrelaxationGetSolObj(), SCIPrelaxationIsSolValid(), SCIPsetDebugMsg, solClearArrays(), SCIP_Sol::solorigin, solStamp(), and TRUE.

Referenced by SCIPlinkRelaxSol(), and SCIPsolCreateRelaxSol().

◆ SCIPsolLinkPseudoSol()

SCIP_RETCODE SCIPsolLinkPseudoSol ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_TREE tree,
SCIP_LP lp 
)

copies current pseudo solution into CIP solution by linking

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
treebranch and bound tree, or NULL
lpcurrent LP data

Definition at line 1318 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_PSEUDOSOL, SCIPlpGetPseudoObjval(), SCIPsetDebugMsg, solClearArrays(), SCIP_Sol::solorigin, solStamp(), and TRUE.

Referenced by SCIPlinkPseudoSol(), SCIPsolCreatePseudoSol(), and SCIPsolLinkCurrentSol().

◆ SCIPsolLinkPseudoSolExact()

SCIP_RETCODE SCIPsolLinkPseudoSolExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_LPEXACT lp 
)

copies current exact pseudo solution into exact CIP solution by linking

Parameters
solprimal CIP solution
setglobal SCIP settings
lpcurrent LP data

Definition at line 1347 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_ValsExact::obj, SCIP_CALL, SCIP_OKAY, SCIPlpExactGetPseudoObjval(), SCIPsetDebugMsg, SCIPsolIsExact(), solClearArrays(), and SCIP_Sol::valsexact.

Referenced by SCIPsolCreatePseudoSolExact().

◆ SCIPsolLinkCurrentSol()

SCIP_RETCODE SCIPsolLinkCurrentSol ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_TREE tree,
SCIP_LP lp 
)

copies current solution (LP or pseudo solution) into CIP solution by linking

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
treebranch and bound tree
lpcurrent LP data

Definition at line 1368 of file sol.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPlpIsSolved(), SCIPsetDebugMsg, SCIPsolLinkLPSol(), SCIPsolLinkPseudoSol(), and SCIPtreeHasCurrentNodeLP().

Referenced by primalLinkCurrentSol(), and SCIPlinkCurrentSol().

◆ SCIPsolClear()

SCIP_RETCODE SCIPsolClear ( SCIP_SOL sol,
SCIP_STAT stat,
SCIP_TREE tree 
)

clears primal CIP solution

Parameters
solprimal CIP solution
statproblem statistics data
treebranch and bound tree

Definition at line 1394 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_ValsExact::obj, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_ZERO, SCIPrationalSetReal(), SCIPsolIsExact(), solClearArrays(), SCIP_Sol::solorigin, solStamp(), TRUE, and SCIP_Sol::valsexact.

Referenced by SCIPclearSol().

◆ SCIPsolSetUnknown()

SCIP_RETCODE SCIPsolSetUnknown ( SCIP_SOL sol,
SCIP_STAT stat,
SCIP_TREE tree 
)

declares all entries in the primal CIP solution to be unknown

Parameters
solprimal CIP solution
statproblem statistics data
treebranch and bound tree

Definition at line 1414 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_UNKNOWN, solClearArrays(), SCIP_Sol::solorigin, solStamp(), and TRUE.

◆ SCIPsolUnlink()

SCIP_RETCODE SCIPsolUnlink ( SCIP_SOL sol,
SCIP_SET set,
SCIP_PROB prob 
)

stores solution values of variables in solution's own array

Parameters
solprimal CIP solution
setglobal SCIP settings
probtransformed problem data

Definition at line 1431 of file sol.c.

References NULL, SCIP_Prob::nvars, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_UNKNOWN, SCIP_SOLORIGIN_ZERO, SCIPsetDebugMsg, SCIPsolIsOriginal(), SCIP_Sol::solorigin, solUnlinkVar(), and SCIP_Prob::vars.

Referenced by primalAddSol(), SCIPsolMakeExact(), SCIPsolUnlinkExact(), SCIPtrySolFreeExact(), and SCIPunlinkSol().

◆ SCIPsolUnlinkExact()

SCIP_RETCODE SCIPsolUnlinkExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_PROB prob 
)

stores solution values of variables in exact solution's own array

Parameters
solprimal CIP solution
setglobal SCIP settings
probtransformed problem data

Definition at line 1460 of file sol.c.

References NULL, SCIP_Prob::nvars, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_UNKNOWN, SCIP_SOLORIGIN_ZERO, SCIPsetDebugMsg, SCIPsolIsExact(), SCIPsolUnlink(), SCIP_Sol::solorigin, solUnlinkVarExact(), and SCIP_Prob::vars.

Referenced by primalAddSolExact(), SCIPsolMakeReal(), and SCIPunlinkSolExact().

◆ SCIPsolSetVal()

SCIP_RETCODE SCIPsolSetVal ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_VAR var,
SCIP_Real  val 
)

sets value of variable in primal CIP solution

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
treebranch and bound tree, or NULL
varvariable to add to solution
valsolution value of variable

Definition at line 1490 of file sol.c.

References ABS, FALSE, SCIP_Sol::lpcount, SCIP_Stat::lpcount, MAX, SCIP_Stat::nnodes, SCIP_Sol::nodenum, SCIP_Stat::nruns, NULL, SCIP_Sol::obj, SCIP_Sol::runnum, SCIP_Sol::scip, SCIP_Var::scip, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_SOLORIGIN_LPSOL, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_PARTIAL, SCIP_SOLORIGIN_UNKNOWN, SCIP_SOLORIGIN_ZERO, SCIP_UNKNOWN, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPboolarrayGetVal(), SCIPerrorMessage, SCIPisFinite, SCIPsetDebugMsg, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPsolSetVal(), SCIPvarGetAggrConstant(), SCIPvarGetAggrScalar(), SCIPvarGetAggrVar(), SCIPvarGetIndex(), SCIPvarGetLbGlobal(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetName(), SCIPvarGetNegationConstant(), SCIPvarGetNegationVar(), SCIPvarGetStatus(), SCIPvarGetTransVar(), SCIPvarGetUnchangedObj(), solGetArrayVal(), SCIP_Sol::solorigin, solSetArrayVal(), solStamp(), and SCIP_Sol::valid.

Referenced by SCIPprimalTransformSol(), SCIPsetSolVal(), SCIPsetSolVals(), SCIPsolAdjustImplicitSolVals(), SCIPsolOverwriteFPSolWithExact(), SCIPsolRound(), SCIPsolSetVal(), separateAlternativeProofs(), and updatePrimalRay().

◆ SCIPsolSetValExact()

SCIP_RETCODE SCIPsolSetValExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_VAR var,
SCIP_RATIONAL val 
)

◆ SCIPsolIncVal()

◆ SCIPsolGetVal()

SCIP_Real SCIPsolGetVal ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var 
)

returns value of variable in primal CIP solution

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
varvariable to get value for

Definition at line 1908 of file sol.c.

References SCIP_Sol::lpcount, SCIP_Stat::lpcount, SCIP_Stat::nnodes, SCIP_Sol::nodenum, SCIP_Stat::nruns, NULL, SCIP_Sol::runnum, scalars, SCIP_Sol::scip, SCIP_Var::scip, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_SOLORIGIN_LPSOL, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_PARTIAL, SCIP_SOLORIGIN_UNKNOWN, SCIP_SOLORIGIN_ZERO, SCIP_UNKNOWN, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPboolarrayGetVal(), SCIPerrorMessage, SCIPrationalIsEQ(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsolGetVal(), SCIPsolIsOriginal(), SCIPvarGetAggrConstant(), SCIPvarGetAggrScalar(), SCIPvarGetAggrVar(), SCIPvarGetIndex(), SCIPvarGetLbGlobal(), SCIPvarGetLbGlobalExact(), SCIPvarGetLbLocal(), SCIPvarGetLbLocalExact(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetNegationConstant(), SCIPvarGetNegationVar(), SCIPvarGetOrigvarSum(), SCIPvarGetStatus(), SCIPvarGetTransVar(), SCIPvarGetUbGlobal(), SCIPvarGetUbGlobalExact(), SCIPvarGetUbLocal(), SCIPvarGetUbLocalExact(), SCIPvarIsTransformed(), solGetArrayVal(), SCIP_Sol::solorigin, and SCIP_Sol::valid.

Referenced by checkSolOrig(), checkSolOrigExact(), SCIPgetSolVal(), SCIPgetSolVals(), SCIPnlrowGetSolActivity(), SCIPprimalTransformSol(), SCIProwExactGetSolActivity(), SCIProwExactGetSolActivityWithErrorbound(), SCIProwGetLPSolCutoffDistance(), SCIProwGetSolActivity(), SCIPsolAdjustImplicitSolVals(), SCIPsolCheck(), SCIPsolCheckOrig(), SCIPsolGetVal(), SCIPsolMarkPartial(), SCIPsolOverwriteFPSolWithExact(), SCIPsolPrint(), SCIPsolRecomputeObj(), SCIPsolRetransform(), SCIPsolsAreEqual(), SCIPsolUpdateVarsum(), SCIPvarGetClosestVlb(), SCIPvarGetClosestVub(), separateSolution(), solCheckExact(), solsAreEqualExact(), and soltreeAddSol().

◆ SCIPsolGetValExact()

void SCIPsolGetValExact ( SCIP_RATIONAL res,
SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR var 
)

returns value of variable in exact primal CIP solution

Parameters
resresulting rational
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
varvariable to get value for

Definition at line 2039 of file sol.c.

References SCIP_Sol::lpcount, SCIP_Stat::lpcount, NULL, scalars, SCIP_OKAY, SCIP_SOLORIGIN_LPSOL, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_PARTIAL, SCIP_SOLORIGIN_UNKNOWN, SCIP_SOLORIGIN_ZERO, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPboolarrayGetVal(), SCIPerrorMessage, SCIPrationalAdd(), SCIPrationalAddProd(), SCIPrationalCreateBuffer(), SCIPrationalDiffReal(), SCIPrationalFreeBuffer(), SCIPrationalGetSign(), SCIPrationalIsAbsInfinity(), SCIPrationalIsEQ(), SCIPrationalIsZero(), SCIPrationalMult(), SCIPrationalNegate(), SCIPrationalSetFraction(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), SCIPrationalSetRational(), SCIPrationalSetReal(), SCIPsolGetValExact(), SCIPsolIsExact(), SCIPvarGetAggrConstantExact(), SCIPvarGetAggrScalarExact(), SCIPvarGetAggrVar(), SCIPvarGetIndex(), SCIPvarGetLbGlobalExact(), SCIPvarGetLbLocalExact(), SCIPvarGetMultaggrConstantExact(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalarsExact(), SCIPvarGetMultaggrVars(), SCIPvarGetNegationConstant(), SCIPvarGetNegationVar(), SCIPvarGetOrigvarSumExact(), SCIPvarGetStatusExact(), SCIPvarGetTransVar(), SCIPvarGetUbGlobalExact(), SCIPvarGetUbLocalExact(), SCIPvarIsTransformed(), solGetArrayValExact(), SCIP_Sol::solorigin, and SCIP_Sol::valid.

Referenced by certificatePrintSol(), checkSolOrigExact(), SCIPgetSolValExact(), SCIProwExactGetSolActivity(), SCIPsolGetValExact(), SCIPsolOverwriteFPSolWithExact(), SCIPsolPrintExact(), SCIPsolRecomputeInternObjExact(), SCIPsolRetransformExact(), solCheckExact(), and solsAreEqualExact().

◆ SCIPsolGetRayVal()

◆ SCIPsolGetObj()

SCIP_Real SCIPsolGetObj ( SCIP_SOL sol,
SCIP_SET set,
SCIP_PROB transprob,
SCIP_PROB origprob 
)

◆ SCIPsolGetObjExact()

void SCIPsolGetObjExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_PROB transprob,
SCIP_PROB origprob,
SCIP_RATIONAL objval 
)

gets objective value of exact primal CIP solution in transformed problem

Parameters
solprimal CIP solution
setglobal SCIP settings
transprobtranformed problem data
origproboriginal problem data
objvalstore the result here

Definition at line 2274 of file sol.c.

References NULL, SCIP_ValsExact::obj, SCIPprobInternObjvalExact(), SCIPrationalSetRational(), SCIPsolIsExact(), SCIPsolIsOriginal(), and SCIP_Sol::valsexact.

Referenced by primalAddSol(), primalAddSolExact(), SCIPgetSolOrigObjExact(), SCIPgetSolTransObjExact(), SCIPprimalUpdateObjoffsetExact(), SCIPprintSolExact(), SCIPsolOverwriteFPSolWithExact(), solOfInterest(), and solsAreEqualExact().

◆ SCIPsolUpdateVarObj()

void SCIPsolUpdateVarObj ( SCIP_SOL sol,
SCIP_VAR var,
SCIP_Real  oldobj,
SCIP_Real  newobj 
)

updates primal solutions after a change in a variable's objective value

Parameters
solprimal CIP solution
varproblem variable
oldobjold objective value
newobjnew objective value

Definition at line 2293 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_Real, SCIP_UNKNOWN, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPsolIsOriginal(), SCIPvarGetStatus(), and solGetArrayVal().

Referenced by SCIPprimalUpdateVarObj().

◆ SCIPsolMarkPartial()

SCIP_RETCODE SCIPsolMarkPartial ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_VAR **  vars,
int  nvars 
)
Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics
varsproblem variables
nvarsnumber of problem variables

Definition at line 2312 of file sol.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_PARTIAL, SCIP_UNKNOWN, SCIPboolarraySetVal(), SCIPrealarraySetVal(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsolGetVal(), SCIPvarGetIndex(), SCIPvarIsTransformed(), SCIPvarMarkNotDeletable(), SCIP_Sol::solorigin, TRUE, SCIP_Sol::valid, and SCIP_Sol::vals.

Referenced by readSolFile(), and readXmlSolFile().

◆ solCheckExact()

static SCIP_RETCODE solCheckExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_Bool  printreason,
SCIP_Bool  completely,
SCIP_Bool  checklprows,
SCIP_Bool feasible 
)
static

checks primal CIP solution for exact feasibility (either checks fp values exactly or rational values if it is a rational solution)

Parameters
solprimal CIP solution
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory
statproblem statistics
probtransformed problem data
printreasonShould all reasons of violations be printed?
completelyShould all violations be checked?
checklprowsDo constraints represented by rows in the current LP have to be checked?
feasiblestores whether solution is feasible

Definition at line 2375 of file sol.c.

References FALSE, h, SCIP_Sol::hasinfval, SCIP_Sol::nodenum, NULL, SCIP_Prob::nvars, SCIP_Sol::obj, SCIP_CALL, SCIP_FEASIBLE, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPconshdlrCheck(), SCIPconshdlrGetName(), SCIPdebugPrintf, SCIPmessagePrintInfo(), SCIPrationalCreateBuffer(), SCIPrationalDebugMessage, SCIPrationalFreeBuffer(), SCIPrationalGetReal(), SCIPrationalIsAbsInfinity(), SCIPrationalIsGT(), SCIPrationalIsInfinity(), SCIPrationalIsLT(), SCIPrationalIsNegative(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), SCIPrationalSetReal(), SCIPsetDebugMsg, SCIPsolGetVal(), SCIPsolGetValExact(), SCIPsolIsExact(), SCIPsolIsOriginal(), SCIPvarGetLbGlobal(), SCIPvarGetLbGlobalExact(), SCIPvarGetName(), SCIPvarGetObjExact(), SCIPvarGetUbGlobal(), SCIPvarGetUbGlobalExact(), SCIPvarGetUnchangedObj(), SCIP_Sol::solorigin, TRUE, and SCIP_Prob::vars.

Referenced by SCIPsolCheck().

◆ SCIPsolCheckOrig()

SCIP_RETCODE SCIPsolCheckOrig ( SCIP_SOL sol,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PRIMAL primal,
SCIP_Bool  printreason,
SCIP_Bool  completely,
SCIP_Bool  checkbounds,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool  checkmodifiable,
SCIP_Bool feasible 
)

checks solution for feasibility in original problem without adding it to the solution store

We first check the variable bounds. Then we loop over all constraint handlers and constraints, checking each in the order of their check priority.

Parameters
solprimal CIP solution
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory
statproblem statistics
probtransformed problem data
primalprimal data
printreasonShould the reason for the violation be printed?
completelyShould all violations be checked if printreason is true?
checkboundsShould the bounds of the variables be checked?
checkintegralityHas integrality to be checked?
checklprowsDo constraints represented by rows in the current LP have to be checked?
checkmodifiablehave modifiable constraint to be checked?
feasiblestores whether given solution is feasible

Definition at line 2502 of file sol.c.

References FALSE, h, SCIP_Prob::nconss, NULL, SCIP_Prob::nvars, SCIP_Prob::origcheckconss, SCIP_CALL, SCIP_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIPconsCheck(), SCIPconsGetHdlr(), SCIPconshdlrCheck(), SCIPconshdlrGetCheckPriority(), SCIPconshdlrNeedsCons(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPmessagePrintInfo(), SCIPprimalUpdateViolations(), SCIPprobSortConssCheck(), SCIPrelDiff(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsolGetVal(), SCIPsolResetViolations(), SCIPsolUpdateBoundViolation(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetUbOriginal(), SCIP_Prob::transformed, TRUE, and SCIP_Prob::vars.

Referenced by SCIPcheckSol(), SCIPcheckSolOrig(), SCIPtransformProb(), SCIPtryCurrentSol(), SCIPtrySol(), and SCIPtrySolFree().

◆ SCIPsolCheck()

SCIP_RETCODE SCIPsolCheck ( SCIP_SOL sol,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_Bool  printreason,
SCIP_Bool  completely,
SCIP_Bool  checkbounds,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool feasible 
)

checks primal CIP solution for feasibility

Note
The difference between SCIPsolCheck() and SCIPcheckSolOrig() is that modifiable constraints are handled differently. There might be some variables which do not have an original counter part (e.g. in branch-and-price). Therefore, modifiable constraints can not be double-checked in the original space.
Parameters
solprimal CIP solution
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory
statproblem statistics
probtransformed problem data
printreasonShould all reasons of violations be printed?
completelyShould all violations be checked?
checkboundsShould the bounds of the variables be checked?
checkintegralityHas integrality to be checked?
checklprowsDo constraints represented by rows in the current LP have to be checked?
feasiblestores whether solution is feasible

Definition at line 2669 of file sol.c.

References FALSE, h, SCIP_Sol::hasinfval, MAX, SCIP_Sol::nodenum, NULL, SCIP_Prob::nvars, SCIP_Sol::obj, SCIP_CALL, SCIP_FEASIBLE, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_Real, SCIP_UNKNOWN, SCIPconshdlrCheck(), SCIPconshdlrGetName(), SCIPdebugPrintf, SCIPmessagePrintInfo(), SCIPsetDebugMsg, SCIPsetDebugMsgPrint, SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsolGetVal(), SCIPsolIsOriginal(), SCIPsolResetViolations(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUnchangedObj(), solCheckExact(), SCIP_Sol::solorigin, TRUE, and SCIP_Prob::vars.

Referenced by primalAddSol(), SCIPcheckSol(), SCIPprimalTrySol(), SCIPprimalTrySolFree(), SCIPprimalTrySolFreeExact(), and solveNodeLP().

◆ SCIPsolRound()

SCIP_RETCODE SCIPsolRound ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_TREE tree,
SCIP_Bool success 
)

◆ SCIPsolMakeExact()

SCIP_RETCODE SCIPsolMakeExact ( SCIP_SOL sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob 
)

◆ SCIPsolMakeReal()

SCIP_RETCODE SCIPsolMakeReal ( SCIP_SOL sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob 
)

approximates and copies the exact values to the real arrays of the solution and frees the exact data

Parameters
solprimal solution
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
probtransformed problem data

Definition at line 2906 of file sol.c.

References BMSfreeBlockMemory, SCIP_Prob::nvars, SCIP_ValsExact::obj, SCIP_CALL, SCIP_OKAY, SCIPboolarrayFree(), SCIPrationalarrayFree(), SCIPrationalCreateBuffer(), SCIPrationalFreeBlock(), SCIPrationalFreeBuffer(), SCIPrationalGetReal(), SCIPsolIsExact(), SCIPsolRecomputeObj(), SCIPsolUnlinkExact(), solGetArrayValExact(), solSetArrayVal(), SCIP_ValsExact::valid, SCIP_ValsExact::vals, SCIP_Sol::valsexact, and SCIP_Prob::vars.

Referenced by readSolFile(), and readXmlSolFile().

◆ SCIPsolUpdateVarsum()

void SCIPsolUpdateVarsum ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_Real  weight 
)

updates the solution value sums in variables by adding the value in the given solution

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
probtransformed problem data
weightweight of solution in weighted average

Definition at line 2942 of file sol.c.

References NULL, SCIP_Prob::nvars, SCIP_Var::primsolavg, SCIP_Real, SCIP_UNKNOWN, SCIPsolGetVal(), SCIPsolIsOriginal(), and SCIP_Prob::vars.

Referenced by primalAddSol().

◆ SCIPsolRetransform()

SCIP_RETCODE SCIPsolRetransform ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_Bool hasinfval 
)

◆ SCIPsolRetransformExact()

◆ SCIPsolRecomputeObj()

void SCIPsolRecomputeObj ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob 
)

recomputes the objective value of an original solution, e.g., when transferring solutions from the solution pool (objective coefficients might have changed in the meantime)

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
origproboriginal problem

Definition at line 3221 of file sol.c.

References NULL, SCIP_Prob::nvars, SCIP_Sol::obj, SCIP_Real, SCIP_UNKNOWN, SCIPprobGetObjoffset(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPsolGetVal(), SCIPsolIsOriginal(), SCIPvarGetUnchangedObj(), and SCIP_Prob::vars.

Referenced by SCIPrecomputeSolObj(), SCIPsolMakeReal(), and SCIPtransformProb().

◆ SCIPsolRecomputeInternObjExact()

void SCIPsolRecomputeInternObjExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob 
)

recomputes the objective value of an exact solution, e.g., when initialized from a real solution

Parameters
solprimal CIP solution
setglobal SCIP settings
statproblem statistics data
probscip problem

Definition at line 3256 of file sol.c.

References NULL, SCIP_Prob::nvars, SCIP_ValsExact::obj, SCIPrationalAddProd(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsZero(), SCIPrationalSetFraction(), SCIPsolGetValExact(), SCIPsolIsExact(), SCIPvarGetObjExact(), SCIP_Sol::valsexact, and SCIP_Prob::vars.

Referenced by SCIPsolMakeExact().

◆ solsAreEqualExact()

static SCIP_Bool solsAreEqualExact ( SCIP_SOL sol1,
SCIP_SOL sol2,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob 
)
static

returns whether the given solutions (exact or floating point) are exactly equal

Parameters
sol1first primal CIP solution
sol2second primal CIP solution
setglobal SCIP settings
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve, or NULL if both solution are defined in the original problem space

Definition at line 3293 of file sol.c.

References FALSE, NULL, SCIP_Prob::nvars, SCIP_Sol::obj, SCIP_ValsExact::obj, SCIP_Bool, SCIP_SOLORIGIN_ORIGINAL, SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsEQ(), SCIPrationalSetRational(), SCIPrationalSetReal(), SCIPsolGetObj(), SCIPsolGetObjExact(), SCIPsolGetOrigin(), SCIPsolGetVal(), SCIPsolGetValExact(), SCIPsolIsExact(), SCIP_Sol::solorigin, TRUE, SCIP_Sol::valsexact, and SCIP_Prob::vars.

Referenced by SCIPsolsAreEqual().

◆ SCIPsolsAreEqual()

SCIP_Bool SCIPsolsAreEqual ( SCIP_SOL sol1,
SCIP_SOL sol2,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob 
)

returns whether the given solutions are equal

Parameters
sol1first primal CIP solution
sol2second primal CIP solution
setglobal SCIP settings
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve, or NULL if both solution are defined in the original problem space

Definition at line 3370 of file sol.c.

References FALSE, NULL, SCIP_Prob::nvars, SCIP_Sol::obj, SCIP_Bool, SCIP_Real, SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsolGetObj(), SCIPsolGetVal(), SCIPsolIsOriginal(), solsAreEqualExact(), TRUE, and SCIP_Prob::vars.

Referenced by primalExistsOrigSol(), primalExistsSol(), and SCIPareSolsEqual().

◆ SCIPsolPrint()

SCIP_RETCODE SCIPsolPrint ( SCIP_SOL sol,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PROB transprob,
FILE *  file,
SCIP_Bool  mipstart,
SCIP_Bool  printzeros 
)

outputs non-zero elements of solution to file stream

Parameters
solprimal CIP solution
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
probproblem data (original or transformed)
transprobtransformed problem data or NULL (to display priced variables)
fileoutput file (or NULL for standard output)
mipstartshould only discrete variables be printed?
printzerosshould variables set to zero be printed?

Definition at line 3441 of file sol.c.

References SCIP_Prob::fixedvars, SCIP_Prob::nfixedvars, NULL, SCIP_Prob::nvars, SCIP_OKAY, SCIP_Real, SCIP_SOLORIGIN_PARTIAL, SCIP_UNKNOWN, SCIPmessageFPrintInfo(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPsolGetVal(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPvarGetName(), SCIPvarGetUnchangedObj(), SCIPvarIsIntegral(), SCIPvarIsTransformedOrigvar(), SCIP_Sol::solorigin, SCIP_Prob::transformed, and SCIP_Prob::vars.

Referenced by primalAddSol(), SCIPprintMIPStart(), SCIPprintSol(), SCIPprintTransSol(), and SCIPsolve().

◆ SCIPsolPrintExact()

SCIP_RETCODE SCIPsolPrintExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PROB transprob,
FILE *  file,
SCIP_Bool  mipstart,
SCIP_Bool  printzeros 
)

outputs non-zero elements of exact solution to file stream

Parameters
solprimal CIP solution
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
probproblem data (original or transformed)
transprobtransformed problem data or NULL (to display priced variables)
fileoutput file (or NULL for standard output)
mipstartshould only discrete variables be printed?
printzerosshould variables set to zero be printed?

Definition at line 3577 of file sol.c.

References SCIP_Prob::fixedvars, SCIP_Prob::nfixedvars, NULL, SCIP_Prob::nvars, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_PARTIAL, SCIPmessageFPrintInfo(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsZero(), SCIPrationalStrLen(), SCIPrationalToString(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetReallocBufferArray, SCIPsolGetValExact(), SCIPsolIsExact(), SCIPvarGetName(), SCIPvarGetObjExact(), SCIPvarIsIntegral(), SCIPvarIsTransformedOrigvar(), SCIP_Sol::solorigin, SCIP_Prob::transformed, and SCIP_Prob::vars.

Referenced by primalAddSolExact(), and SCIPprintSolExact().

◆ SCIPsolPrintRay()

SCIP_RETCODE SCIPsolPrintRay ( SCIP_SOL sol,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_PROB transprob,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs non-zero elements of solution representing a ray to file stream

Parameters
solprimal CIP solution
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
probproblem data (original or transformed)
transprobtransformed problem data or NULL (to display priced variables)
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 3766 of file sol.c.

References SCIP_Prob::fixedvars, SCIP_Prob::nfixedvars, NULL, SCIP_Prob::nvars, SCIP_OKAY, SCIP_Real, SCIP_UNKNOWN, SCIPmessageFPrintInfo(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPsolGetRayVal(), SCIPsolIsOriginal(), SCIPvarGetName(), SCIPvarGetUnchangedObj(), SCIPvarIsTransformedOrigvar(), SCIP_Prob::transformed, and SCIP_Prob::vars.

Referenced by SCIPprintRay().

◆ SCIPsolSetOrigin()

void SCIPsolSetOrigin ( SCIP_SOL sol,
SCIP_SOLORIGIN  origin 
)

set new origin type for a solution

Parameters
solprimal CIP solution
originnew origin type of the solution

Definition at line 3874 of file sol.c.

References NULL, and SCIP_Sol::solorigin.

Referenced by SCIPcreateSolCopyOrig().

◆ SCIPsolResetViolations()

◆ SCIPsolUpdateIntegralityViolation()

void SCIPsolUpdateIntegralityViolation ( SCIP_SOL sol,
SCIP_Real  absviolintegrality 
)

update integrality violation of a solution

Parameters
solprimal CIP solution
absviolintegralityabsolute violation of integrality

Definition at line 3904 of file sol.c.

References SCIP_Viol::absviolintegrality, MAX, NULL, and SCIP_Sol::viol.

Referenced by SCIPupdateSolIntegralityViolation().

◆ SCIPsolUpdateBoundViolation()

void SCIPsolUpdateBoundViolation ( SCIP_SOL sol,
SCIP_Real  absviolbounds,
SCIP_Real  relviolbounds 
)

update bound violation of a solution

Parameters
solprimal CIP solution
absviolboundsabsolute violation of bounds
relviolboundsrelative violation of bounds

Definition at line 3915 of file sol.c.

References SCIP_Viol::absviolbounds, MAX, NULL, SCIP_Viol::relviolbounds, and SCIP_Sol::viol.

Referenced by SCIPsolCheckOrig(), and SCIPupdateSolBoundViolation().

◆ SCIPsolUpdateLPRowViolation()

void SCIPsolUpdateLPRowViolation ( SCIP_SOL sol,
SCIP_Real  absviollprows,
SCIP_Real  relviollprows 
)

update LP row violation of a solution

Parameters
solprimal CIP solution
absviollprowsabsolute violation of LP rows
relviollprowsrelative violation of LP rows

Definition at line 3928 of file sol.c.

References SCIP_Viol::absviollprows, MAX, NULL, SCIP_Viol::relviollprows, and SCIP_Sol::viol.

Referenced by SCIPsolUpdateLPConsViolation(), and SCIPupdateSolLPRowViolation().

◆ SCIPsolUpdateConsViolation()

void SCIPsolUpdateConsViolation ( SCIP_SOL sol,
SCIP_Real  absviolcons,
SCIP_Real  relviolcons 
)

update constraint violation of a solution

Parameters
solprimal CIP solution
absviolconsabsolute violation of constraint
relviolconsrelative violation of constraint

Definition at line 3941 of file sol.c.

References SCIP_Viol::absviolcons, MAX, NULL, SCIP_Viol::relviolcons, and SCIP_Sol::viol.

Referenced by SCIPsolUpdateLPConsViolation(), and SCIPupdateSolConsViolation().

◆ SCIPsolUpdateLPConsViolation()

void SCIPsolUpdateLPConsViolation ( SCIP_SOL sol,
SCIP_Real  absviol,
SCIP_Real  relviol 
)

update violation of a constraint that is represented in the LP

Parameters
solprimal CIP solution
absviolabsolute violation of constraint
relviolrelative violation of constraint

Definition at line 3954 of file sol.c.

References NULL, SCIPsolUpdateConsViolation(), and SCIPsolUpdateLPRowViolation().

Referenced by SCIPupdateSolLPConsViolation().

◆ SCIPsolOverwriteFPSolWithExact()

SCIP_RETCODE SCIPsolOverwriteFPSolWithExact ( SCIP_SOL sol,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree 
)

overwrite FP solution with exact values

Parameters
solexact primal CIP solution
setglobal SCIP settings
statproblem statistics data
origprobproblem data
transprobproblem data
treebranch and bound tree, or NULL

Definition at line 4037 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_Var::obj, SCIP_CALL, SCIP_OKAY, SCIP_R_ROUND_DOWNWARDS, SCIP_R_ROUND_UPWARDS, SCIPprobGetNVars(), SCIPprobGetVars(), SCIPrationalCreateBuffer(), SCIPrationalDebugMessage, SCIPrationalFreeBuffer(), SCIPrationalRoundReal(), SCIPrationalSetRational(), SCIPsolGetObjExact(), SCIPsolGetOrigObjExact(), SCIPsolGetVal(), SCIPsolGetValExact(), SCIPsolIsExact(), SCIPsolIsOriginal(), and SCIPsolSetVal().

Referenced by primalAddSolExact(), SCIPoverwriteFPsol(), and SCIPsolRetransform().

◆ SCIPsolGetOrigObjExact()

SCIP_RATIONAL * SCIPsolGetOrigObjExact ( SCIP_SOL sol)

gets objective value of primal CIP solution which lives in the original problem space

Parameters
solprimal CIP solution

Definition at line 4181 of file sol.c.

References NULL, SCIP_ValsExact::obj, SCIPsolIsExact(), SCIPsolIsOriginal(), and SCIP_Sol::valsexact.

Referenced by SCIPgetSolOrigObjExact(), SCIPprintSolExact(), and SCIPsolOverwriteFPSolWithExact().

◆ SCIPsolOrigAddObjval()

void SCIPsolOrigAddObjval ( SCIP_SOL sol,
SCIP_Real  addval 
)

adds value to the objective value of a given original primal CIP solution

Parameters
solprimal CIP solution
addvaloffset value to add

Definition at line 4193 of file sol.c.

References NULL, SCIP_Sol::obj, SCIP_SOLORIGIN_ORIGINAL, and SCIP_Sol::solorigin.

Referenced by SCIPprimalAddOrigObjoffset().

◆ SCIPsolGetPrimalIndex()

int SCIPsolGetPrimalIndex ( SCIP_SOL sol)

gets current position of solution in array of existing solutions of primal data

Parameters
solprimal CIP solution

Definition at line 4269 of file sol.c.

References NULL, and SCIP_Sol::primalindex.

Referenced by SCIPprimalSolCreated(), and SCIPprimalSolFreed().

◆ SCIPsolSetPrimalIndex()

void SCIPsolSetPrimalIndex ( SCIP_SOL sol,
int  primalindex 
)

sets current position of solution in array of existing solutions of primal data

Parameters
solprimal CIP solution
primalindexnew primal index of solution

Definition at line 4279 of file sol.c.

References NULL, and SCIP_Sol::primalindex.

Referenced by SCIPprimalSolCreated(), and SCIPprimalSolFreed().