Scippy

SCIP

Solving Constraint Integer Programs

primal.h File Reference

Detailed Description

internal methods for collecting primal CIP solutions and primal informations

Author
Tobias Achterberg

Definition in file primal.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_set.h"
#include "scip/type_event.h"
#include "scip/type_lp.h"
#include "scip/type_var.h"
#include "scip/type_prob.h"
#include "scip/type_sol.h"
#include "scip/type_primal.h"
#include "scip/type_tree.h"
#include "scip/type_reopt.h"
#include "scip/type_heur.h"
#include "scip/struct_primal.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPprimalCreate (SCIP_PRIMAL **primal)
 
SCIP_RETCODE SCIPprimalFree (SCIP_PRIMAL **primal, BMS_BLKMEM *blkmem)
 
SCIP_RETCODE SCIPprimalSetCutoffbound (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_Real cutoffbound, SCIP_Bool useforobjlimit)
 
SCIP_RETCODE SCIPprimalSetUpperbound (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_Real upperbound)
 
SCIP_RETCODE SCIPprimalUpdateObjlimit (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp)
 
SCIP_RETCODE SCIPprimalUpdateObjoffset (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp)
 
void SCIPprimalAddOrigObjoffset (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_Real addval)
 
SCIP_Bool SCIPprimalUpperboundIsSol (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
 
SCIP_RETCODE SCIPprimalAddSol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_SOL *sol, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalAddSolFree (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_SOL **sol, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalAddOrigSol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_SOL *sol, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalAddOrigSolFree (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_SOL **sol, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalAddCurrentSol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_HEUR *heur, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalTrySol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalTrySolFree (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalTryCurrentSol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_HEUR *heur, SCIP_Bool printreason, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
 
SCIP_RETCODE SCIPprimalSolCreated (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_SOL *sol)
 
void SCIPprimalSolFreed (SCIP_PRIMAL *primal, SCIP_SOL *sol)
 
void SCIPprimalUpdateVarObj (SCIP_PRIMAL *primal, SCIP_VAR *var, SCIP_Real oldobj, SCIP_Real newobj)
 
SCIP_RETCODE SCIPprimalRetransformSolutions (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob)
 
SCIP_RETCODE SCIPprimalTransformSol (SCIP_PRIMAL *primal, SCIP_SOL *sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Real *solvals, SCIP_Bool *solvalset, int solvalssize, SCIP_Bool *added)
 

Function Documentation

SCIP_RETCODE SCIPprimalCreate ( SCIP_PRIMAL **  primal)

creates primal data

Parameters
primalpointer to primal data

Definition at line 92 of file primal.c.

References BMSallocMemory, NULL, SCIP_ALLOC, SCIP_INVALID, and SCIP_OKAY.

Referenced by copyProb(), SCIPcreateProb(), and SCIPtransformProb().

SCIP_RETCODE SCIPprimalFree ( SCIP_PRIMAL **  primal,
BMS_BLKMEM blkmem 
)

frees primal data

Parameters
primalpointer to primal data
blkmemblock memory

Definition at line 118 of file primal.c.

References BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, and SCIPsolFree().

Referenced by freeTransform(), and SCIPfreeProb().

SCIP_RETCODE SCIPprimalSetCutoffbound ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_PROB transprob,
SCIP_PROB origprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_Real  cutoffbound,
SCIP_Bool  useforobjlimit 
)

sets the cutoff bound in primal data and in LP solver

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
transprobtransformed problem data
origproboriginal problem data
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
cutoffboundnew cutoff bound
useforobjlimitshould the cutoff bound be used to update the objective limit, if better?

Definition at line 188 of file primal.c.

References SCIP_Primal::cutoffbound, NULL, primalSetCutoffbound(), SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPprobExternObjval(), SCIPprobGetObjlim(), SCIPprobSetObjlim(), and SCIPsetInfinity().

Referenced by initSolve(), and SCIPupdateCutoffbound().

SCIP_RETCODE SCIPprimalSetUpperbound ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_PROB prob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_Real  upperbound 
)

sets upper bound in primal data and in LP solver

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
probtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
upperboundnew upper bound

Definition at line 295 of file primal.c.

References NULL, primalSetUpperbound(), SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPsetInfinity(), and SCIP_Primal::upperbound.

Referenced by primalAddSol().

SCIP_RETCODE SCIPprimalUpdateObjlimit ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_PROB transprob,
SCIP_PROB origprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp 
)

updates upper bound and cutoff bound in primal data after a tightening of the problem's objective limit

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
transprobtransformed problem data
origproboriginal problem data
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data

Definition at line 326 of file primal.c.

References MIN, NULL, primalSetCutoffbound(), primalSetUpperbound(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPprobGetObjlim(), SCIPprobInternObjval(), and SCIPsetInfinity().

Referenced by initSolve(), presolve(), SCIPsetObjlimit(), and SCIPtransformProb().

SCIP_RETCODE SCIPprimalUpdateObjoffset ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_PROB transprob,
SCIP_PROB origprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp 
)

recalculates upper bound and cutoff bound in primal data after a change of the problem's objective offset

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
transprobtranformed problem data
origproboriginal problem data
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data

Definition at line 365 of file primal.c.

References MIN, SCIP_Primal::nsols, NULL, primalSetCutoffbound(), primalSetUpperbound(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIPprobGetObjlim(), SCIPprobInternObjval(), SCIPsetGetStage(), SCIPsetInfinity(), SCIPsolGetObj(), SCIPsolIsOriginal(), and SCIP_Primal::sols.

Referenced by SCIPaddObjoffset(), SCIPprobCheckObjIntegral(), SCIPprobScaleObj(), and SCIPvarAddObj().

void SCIPprimalAddOrigObjoffset ( SCIP_PRIMAL primal,
SCIP_SET set,
SCIP_Real  addval 
)

adds additional objective offset in origanal space to all existing solution (in original space)

adds additional objective offset in original space to all existing solution (in original space)

Parameters
primalprimal data
setglobal SCIP settings
addvaladditional objective offset in original space

Definition at line 431 of file primal.c.

References SCIP_Primal::existingsols, SCIP_Primal::nexistingsols, SCIP_Primal::nsols, NULL, SCIP_SOLORIGIN_ORIGINAL, SCIP_STAGE_PROBLEM, SCIPsetGetStage(), SCIPsetIsLE(), SCIPsolGetOrigin(), SCIPsolGetOrigObj(), SCIPsolOrigAddObjval(), and SCIP_Primal::sols.

Referenced by SCIPaddOrigObjoffset().

SCIP_Bool SCIPprimalUpperboundIsSol ( SCIP_PRIMAL primal,
SCIP_SET set,
SCIP_PROB transprob,
SCIP_PROB origprob 
)

returns whether the current primal bound is justified with a feasible primal solution; if not, the primal bound was set from the user as objective limit

Parameters
primalprimal data
setglobal SCIP settings
transprobtranformed problem data
origproboriginal problem data

Definition at line 465 of file primal.c.

References SCIP_Primal::nsols, NULL, SCIPsetIsEQ(), SCIPsolGetObj(), SCIP_Primal::sols, and SCIP_Primal::upperbound.

Referenced by SCIPisPrimalboundSol().

SCIP_RETCODE SCIPprimalAddSol ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_SOL sol,
SCIP_Bool stored 
)

adds primal solution to solution storage by copying it

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
solprimal CIP solution
storedstores whether given solution was good enough to keep

Definition at line 996 of file primal.c.

References FALSE, SCIP_Primal::nsols, NULL, primalAddSol(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPsetIsLE(), SCIPsolCopy(), SCIPsolGetObj(), solOfInterest(), SCIP_Primal::sols, and TRUE.

Referenced by SCIPaddSol(), SCIPprimalAddCurrentSol(), SCIPtransformProb(), and SCIPtrySol().

SCIP_RETCODE SCIPprimalAddSolFree ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_SOL **  sol,
SCIP_Bool stored 
)

adds primal solution to solution storage, frees the solution afterwards

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
solpointer to primal CIP solution; is cleared in function call
storedstores whether given solution was good enough to keep

Definition at line 1054 of file primal.c.

References FALSE, NULL, primalAddSol(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPsolFree(), solOfInterest(), and TRUE.

Referenced by addCurrentSolution(), SCIPaddSolFree(), and SCIPtrySolFree().

SCIP_RETCODE SCIPprimalAddOrigSol ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_SOL sol,
SCIP_Bool stored 
)

adds primal solution to solution candidate storage of original problem space

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
proboriginal problem data
solprimal CIP solution; is cleared in function call
storedstores whether given solution was good enough to keep

Definition at line 1109 of file primal.c.

References FALSE, NULL, origsolOfInterest(), primalAddOrigSol(), SCIP_CALL, SCIP_OKAY, SCIPsolCopy(), SCIPsolIsOriginal(), and TRUE.

Referenced by freeTransform(), and SCIPaddSol().

SCIP_RETCODE SCIPprimalAddOrigSolFree ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB prob,
SCIP_SOL **  sol,
SCIP_Bool stored 
)

adds primal solution to solution candidate storage of original problem space, frees the solution afterwards

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
proboriginal problem data
solpointer to primal CIP solution; is cleared in function call
storedstores whether given solution was good enough to keep

Definition at line 1150 of file primal.c.

References FALSE, NULL, origsolOfInterest(), primalAddOrigSol(), SCIP_CALL, SCIP_OKAY, SCIPsolFree(), SCIPsolIsOriginal(), and TRUE.

Referenced by SCIPaddSolFree().

SCIP_RETCODE SCIPprimalAddCurrentSol ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_HEUR heur,
SCIP_Bool stored 
)

adds current LP/pseudo solution to solution storage

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
heurheuristic that found the solution (or NULL if it's from the tree)
storedstores whether given solution was good enough to keep

Definition at line 1224 of file primal.c.

References SCIP_Primal::currentsol, NULL, primalLinkCurrentSol(), SCIP_CALL, SCIP_OKAY, and SCIPprimalAddSol().

Referenced by SCIPaddCurrentSol().

SCIP_RETCODE SCIPprimalTrySol ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_SOL sol,
SCIP_Bool  printreason,
SCIP_Bool  checkbounds,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool stored 
)

checks primal solution; if feasible, adds it to storage by copying it

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
solprimal CIP solution
printreasonShould all reasons of violations be printed?
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?
storedstores whether given solution was feasible and good enough to keep

Definition at line 1254 of file primal.c.

References FALSE, NULL, primalAddSol(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPsolCheck(), SCIPsolCopy(), solOfInterest(), and TRUE.

Referenced by SCIPprimalTryCurrentSol(), SCIPtrySol(), and solveNodeLP().

SCIP_RETCODE SCIPprimalTrySolFree ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_SOL **  sol,
SCIP_Bool  printreason,
SCIP_Bool  checkbounds,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool stored 
)

checks primal solution; if feasible, adds it to storage; solution is freed afterwards

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
solpointer to primal CIP solution; is cleared in function call
printreasonShould all the reasons of violations be printed?
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?
storedstores whether solution was feasible and good enough to keep

Definition at line 1322 of file primal.c.

References FALSE, NULL, primalAddSol(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPsolCheck(), SCIPsolFree(), solOfInterest(), and TRUE.

Referenced by addCurrentSolution(), SCIPprimalTransformSol(), SCIPtrySolFree(), solveNode(), and solveNodeLP().

SCIP_RETCODE SCIPprimalTryCurrentSol ( SCIP_PRIMAL primal,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_HEUR heur,
SCIP_Bool  printreason,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool stored 
)

checks current LP/pseudo solution; if feasible, adds it to storage

Parameters
primalprimal data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
heurheuristic that found the solution (or NULL if it's from the tree)
printreasonShould all reasons of violations be printed?
checkintegralityHas integrality to be checked?
checklprowsDo constraints represented by rows in the current LP have to be checked?
storedstores whether given solution was good enough to keep

Definition at line 1394 of file primal.c.

References SCIP_Primal::currentsol, FALSE, NULL, primalLinkCurrentSol(), SCIP_CALL, SCIP_OKAY, and SCIPprimalTrySol().

Referenced by SCIPtryCurrentSol().

SCIP_RETCODE SCIPprimalSolCreated ( SCIP_PRIMAL primal,
SCIP_SET set,
SCIP_SOL sol 
)

inserts solution into the global array of all existing primal solutions

Parameters
primalprimal data
setglobal SCIP settings
solprimal CIP solution

Definition at line 1428 of file primal.c.

References ensureExistingsolsSize(), SCIP_Primal::existingsols, SCIP_Primal::nexistingsols, NULL, SCIP_CALL, SCIP_OKAY, SCIPsolGetPrimalIndex(), and SCIPsolSetPrimalIndex().

Referenced by SCIPsolCopy(), SCIPsolCreate(), SCIPsolCreateOriginal(), and SCIPsolCreateUnknown().

void SCIPprimalSolFreed ( SCIP_PRIMAL primal,
SCIP_SOL sol 
)

removes solution from the global array of all existing primal solutions

Parameters
primalprimal data
solprimal CIP solution

Definition at line 1450 of file primal.c.

References SCIP_Primal::existingsols, SCIP_Primal::nexistingsols, NULL, SCIPsolGetPrimalIndex(), and SCIPsolSetPrimalIndex().

Referenced by SCIPsolFree().

void SCIPprimalUpdateVarObj ( SCIP_PRIMAL primal,
SCIP_VAR var,
SCIP_Real  oldobj,
SCIP_Real  newobj 
)

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

Parameters
primalprimal data
varproblem variable
oldobjold objective value
newobjnew objective value

Definition at line 1480 of file primal.c.

References SCIP_Primal::existingsols, SCIP_Primal::nexistingsols, NULL, SCIPsolIsOriginal(), and SCIPsolUpdateVarObj().

Referenced by SCIPeventProcess().

SCIP_RETCODE SCIPprimalRetransformSolutions ( SCIP_PRIMAL primal,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob 
)

retransforms all existing solutions to original problem space

Parameters
primalprimal data
setglobal SCIP settings
statproblem statistics data
origproboriginal problem
transprobtransformed problem

Definition at line 1499 of file primal.c.

References SCIP_Primal::nsols, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_SOLORIGIN_ZERO, SCIPsolGetOrigin(), SCIPsolRetransform(), and SCIP_Primal::sols.

Referenced by initPresolve().

SCIP_RETCODE SCIPprimalTransformSol ( SCIP_PRIMAL primal,
SCIP_SOL sol,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_STAT stat,
SCIP_PROB origprob,
SCIP_PROB transprob,
SCIP_TREE tree,
SCIP_REOPT reopt,
SCIP_LP lp,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_Real solvals,
SCIP_Bool solvalset,
int  solvalssize,
SCIP_Bool added 
)

tries to transform original solution to the transformed problem space

Parameters
primalprimal data
solprimal solution
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler
statproblem statistics data
origproboriginal problem
transprobtransformed problem after presolve
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
eventqueueevent queue
eventfilterevent filter for global (not variable dependent) events
solvalsarray for internal use to store solution values, or NULL; if the method is called multiple times in a row, an array with size >= number of active variables should be given for performance reasons
solvalsetarray for internal use to store which solution values were set, or NULL; if the method is called multiple times in a row, an array with size >= number of active variables should be given for performance reasons
solvalssizesize of solvals and solvalset arrays, should be >= number of active variables
addedpointer to store whether the solution was added

Definition at line 1524 of file primal.c.

References BMSclearMemoryArray, FALSE, NULL, SCIP_Prob::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIPdebugMessage, SCIPprimalTrySolFree(), SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsolCreate(), SCIPsolGetHeur(), SCIPsolGetOrigObj(), SCIPsolGetVal(), SCIPsolIsOriginal(), SCIPsolSetVal(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, and SCIP_Prob::vars.

Referenced by primalAddSol(), and transformSols().