|
methods for collecting primal CIP solutions and primal informations
- Author
- Tobias Achterberg
Definition in file primal.c.
#include <assert.h>
#include "scip/def.h"
#include "scip/set.h"
#include "scip/stat.h"
#include "scip/visual.h"
#include "scip/event.h"
#include "scip/lp.h"
#include "scip/var.h"
#include "scip/prob.h"
#include "scip/sol.h"
#include "scip/primal.h"
#include "scip/tree.h"
#include "scip/reopt.h"
#include "scip/disp.h"
#include "scip/pub_message.h"
Go to the source code of this file.
|
static SCIP_RETCODE | ensureSolsSize (SCIP_PRIMAL *primal, SCIP_SET *set, int num) |
|
static SCIP_RETCODE | ensureExistingsolsSize (SCIP_PRIMAL *primal, SCIP_SET *set, int num) |
|
SCIP_RETCODE | SCIPprimalCreate (SCIP_PRIMAL **primal) |
|
SCIP_RETCODE | SCIPprimalFree (SCIP_PRIMAL **primal, BMS_BLKMEM *blkmem) |
|
static SCIP_RETCODE | primalSetCutoffbound (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_EVENTQUEUE *eventqueue, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_Real cutoffbound) |
|
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) |
|
static SCIP_RETCODE | primalSetUpperbound (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 | 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) |
|
static SCIP_RETCODE | primalAddSol (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 **solptr, int insertpos, SCIP_Bool replace) |
|
static SCIP_RETCODE | primalAddOrigSol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_SOL *sol, int insertpos) |
|
static int | primalSearchSolPos (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SOL *sol) |
|
static int | primalSearchOrigSolPos (SCIP_PRIMAL *primal, SCIP_SOL *sol) |
|
static SCIP_Bool | primalExistsSol (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_SOL *sol, int *insertpos, SCIP_Bool *replace) |
|
static SCIP_Bool | primalExistsOrigSol (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_SOL *sol, int insertpos) |
|
static SCIP_Bool | solOfInterest (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_SOL *sol, int *insertpos, SCIP_Bool *replace) |
|
static SCIP_Bool | origsolOfInterest (SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_SOL *sol, int *insertpos) |
|
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) |
|
static SCIP_RETCODE | primalLinkCurrentSol (SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur) |
|
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) |
|
sets the cutoff bound in primal data and in LP solver
- Parameters
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
prob | problem data |
eventqueue | event queue |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
cutoffbound | new cutoff bound |
Definition at line 156 of file primal.c.
References SCIP_Primal::cutoffbound, MIN, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPdebugMessage, SCIPlpSetCutoffbound(), SCIPsetInfinity(), SCIPsetIsLE(), SCIPtreeCutoff(), SCIPtreeInRepropagation(), and SCIP_Primal::upperbound.
Referenced by primalSetUpperbound(), SCIPprimalSetCutoffbound(), SCIPprimalUpdateObjlimit(), and SCIPprimalUpdateObjoffset().
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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
eventqueue | event queue |
transprob | transformed problem data |
origprob | original problem data |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
cutoffbound | new cutoff bound |
useforobjlimit | should 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().
sets upper bound in primal data and in LP solver
- Parameters
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
eventqueue | event queue |
prob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
upperbound | new upper bound |
Definition at line 241 of file primal.c.
References MIN, SCIP_Stat::nnodes, NULL, primalSetCutoffbound(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPprobIsObjIntegral(), SCIPsetCutoffbounddelta(), SCIPsetFeasCeil(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPtreeGetCurrentDepth(), SCIPvisualUpperbound(), SCIP_Primal::upperbound, and SCIP_Stat::visual.
Referenced by SCIPprimalSetUpperbound(), SCIPprimalUpdateObjlimit(), and SCIPprimalUpdateObjoffset().
updates upper bound and cutoff bound in primal data after a tightening of the problem's objective limit
- Parameters
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
eventqueue | event queue |
transprob | transformed problem data |
origprob | original problem data |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current 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().
recalculates upper bound and cutoff bound in primal data after a change of the problem's objective offset
- Parameters
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
eventqueue | event queue |
transprob | tranformed problem data |
origprob | original problem data |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current 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().
adds additional objective offset in original space to all existing solution (in original space)
- Parameters
-
primal | primal data |
set | global SCIP settings |
addval | additional 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().
static SCIP_RETCODE primalAddSol |
( |
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 ** |
solptr, |
|
|
int |
insertpos, |
|
|
SCIP_Bool |
replace |
|
) |
| |
|
static |
adds primal solution to solution storage at given position
- Parameters
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
solptr | pointer to primal CIP solution |
insertpos | position in solution storage to add solution to |
replace | should the solution at insertpos be replaced by the new solution? |
Definition at line 479 of file primal.c.
References SCIP_Stat::bestsolnode, ensureSolsSize(), FALSE, SCIP_Stat::firstprimalbound, SCIP_Stat::firstprimaldepth, SCIP_Stat::firstprimalheur, SCIP_Stat::firstprimaltime, MIN, SCIP_Primal::nbestsolsfound, SCIP_Primal::nlimsolsfound, SCIP_Stat::nnodes, SCIP_Stat::nnodesbeforefirst, SCIP_Stat::nrunsbeforefirst, SCIP_Primal::nsols, SCIP_Primal::nsolsfound, NULL, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EVENTTYPE_POORSOLFOUND, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIPdebug, SCIPdebugMessage, SCIPdispPrintLine(), SCIPerrorMessage, SCIPeventChgSol(), SCIPeventChgType(), SCIPeventProcess(), SCIPprimalSetUpperbound(), SCIPprimalTransformSol(), SCIPprobExternObjval(), SCIPprobGetObjlim(), SCIPprobInternObjval(), SCIPsetGetStage(), SCIPsetIsFeasLE(), SCIPsolCheck(), SCIPsolFree(), SCIPsolGetDepth(), SCIPsolGetHeur(), SCIPsolGetNodenum(), SCIPsolGetObj(), SCIPsolGetRunnum(), SCIPsolGetTime(), SCIPsolIsOriginal(), SCIPsolPrint(), SCIPsolTransform(), SCIPsolUnlink(), SCIPsolUpdateVarsum(), SCIPtreeGetCurrentNode(), SCIPtreeInRepropagation(), SCIPvisualFoundSolution(), SCIP_Primal::sols, TRUE, and SCIP_Stat::visual.
Referenced by SCIPprimalAddSol(), SCIPprimalAddSolFree(), SCIPprimalTrySol(), and SCIPprimalTrySolFree().
adds primal solution to solution storage at given position
- Parameters
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
prob | original problem data |
sol | primal CIP solution |
insertpos | position in solution storage to add solution to |
Definition at line 666 of file primal.c.
References ensureSolsSize(), MIN, SCIP_Primal::nlimsolsfound, SCIP_Primal::nsols, SCIP_Primal::nsolsfound, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPprobGetObjlim(), SCIPsetIsFeasLE(), SCIPsolFree(), SCIPsolGetOrigObj(), and SCIP_Primal::sols.
Referenced by SCIPprimalAddOrigSol(), and SCIPprimalAddOrigSolFree().
returns whether the given primal solution is already existent in the solution storage
- Parameters
-
primal | primal data |
set | global SCIP settings |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
sol | primal solution to search position for |
insertpos | pointer to insertion position returned by primalSearchSolPos(); the position might be changed if an existing solution should be replaced |
replace | pointer to store whether the solution at insertpos should be replaced |
Definition at line 803 of file primal.c.
References FALSE, SCIP_Primal::nsols, NULL, REALABS, SCIP_Real, SCIPsetEpsilon(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsolGetObj(), SCIPsolIsOriginal(), SCIPsolsAreEqual(), SCIP_Primal::sols, and TRUE.
Referenced by solOfInterest().
returns whether the given primal solution is already existent in the original solution candidate storage
- Parameters
-
primal | primal data |
set | global SCIP settings |
stat | problem statistics data |
prob | original problem |
sol | primal solution to search position for |
insertpos | insertion position returned by primalSearchOrigSolPos() |
Definition at line 885 of file primal.c.
References FALSE, SCIP_Primal::nsols, NULL, SCIP_Real, SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsolGetOrigObj(), SCIPsolsAreEqual(), SCIP_Primal::sols, and TRUE.
Referenced by origsolOfInterest().
check if we are willing to check the solution for feasibility
- Parameters
-
primal | primal data |
set | global SCIP settings |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
sol | primal CIP solution |
insertpos | pointer to store the insert position of that solution |
replace | pointer to store whether the solution at insertpos should be replaced (e.g., because it lives in the original space) |
Definition at line 937 of file primal.c.
References FALSE, primalExistsSol(), primalSearchSolPos(), SCIP_Real, SCIPsetIsInfinity(), SCIPsolGetObj(), and TRUE.
Referenced by SCIPprimalAddSol(), SCIPprimalAddSolFree(), SCIPprimalTrySol(), and SCIPprimalTrySolFree().
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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
sol | primal CIP solution |
stored | stores 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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
sol | pointer to primal CIP solution; is cleared in function call |
stored | stores 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 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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
heur | heuristic that found the solution (or NULL if it's from the tree) |
stored | stores 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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
sol | primal CIP solution |
printreason | Should all reasons of violations be printed? |
checkbounds | Should the bounds of the variables be checked? |
checkintegrality | Has integrality to be checked? |
checklprows | Do constraints represented by rows in the current LP have to be checked? |
stored | stores 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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
sol | pointer to primal CIP solution; is cleared in function call |
printreason | Should all the reasons of violations be printed? |
checkbounds | Should the bounds of the variables be checked? |
checkintegrality | Has integrality to be checked? |
checklprows | Do constraints represented by rows in the current LP have to be checked? |
stored | stores 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
-
primal | primal data |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
heur | heuristic that found the solution (or NULL if it's from the tree) |
printreason | Should all reasons of violations be printed? |
checkintegrality | Has integrality to be checked? |
checklprows | Do constraints represented by rows in the current LP have to be checked? |
stored | stores 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().
inserts solution into the global array of all existing primal solutions
- Parameters
-
primal | primal data |
set | global SCIP settings |
sol | primal 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().
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
-
primal | primal data |
sol | primal solution |
blkmem | block memory |
set | global SCIP settings |
messagehdlr | message handler |
stat | problem statistics data |
origprob | original problem |
transprob | transformed problem after presolve |
tree | branch and bound tree |
reopt | reoptimization data structure |
lp | current LP data |
eventqueue | event queue |
eventfilter | event filter for global (not variable dependent) events |
solvals | array 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 |
solvalset | array 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 |
solvalssize | size of solvals and solvalset arrays, should be >= number of active variables |
added | pointer 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().
|