Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods to create and change primal solutions of SCIP

Functions

SCIP_EXPORT SCIP_SOLORIGIN SCIPsolGetOrigin (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Bool SCIPsolIsOriginal (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Bool SCIPsolIsPartial (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetOrigObj (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetTime (SCIP_SOL *sol)
 
SCIP_EXPORT int SCIPsolGetRunnum (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Longint SCIPsolGetNodenum (SCIP_SOL *sol)
 
SCIP_EXPORT int SCIPsolGetDepth (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_SOLTYPE SCIPsolGetType (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_HEURSCIPsolGetHeur (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RELAXSCIPsolGetRelax (SCIP_SOL *sol)
 
SCIP_EXPORT void SCIPsolSetHeur (SCIP_SOL *sol, SCIP_HEUR *heur)
 
SCIP_EXPORT void SCIPsolSetRelax (SCIP_SOL *sol, SCIP_RELAX *relax)
 
SCIP_EXPORT void SCIPsolSetLPRelaxation (SCIP_SOL *sol)
 
SCIP_EXPORT void SCIPsolSetStrongbranching (SCIP_SOL *sol)
 
SCIP_EXPORT void SCIPsolSetPseudo (SCIP_SOL *sol)
 
SCIP_EXPORT int SCIPsolGetIndex (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetAbsBoundViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetRelBoundViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetAbsIntegralityViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetAbsLPRowViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetRelLPRowViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetAbsConsViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPsolGetRelConsViolation (SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateLPSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateNLPSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateRelaxSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreatePseudoSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateCurrentSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreatePartialSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateUnknownSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateOrigSol (SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateSolCopy (SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateSolCopyOrig (SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateFiniteSolCopy (SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol, SCIP_Bool *success)
 
SCIP_EXPORT SCIP_RETCODE SCIPfreeSol (SCIP *scip, SCIP_SOL **sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPlinkLPSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPlinkNLPSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPlinkRelaxSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPlinkPseudoSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPlinkCurrentSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPclearSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPunlinkSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetSolVal (SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
 
SCIP_EXPORT SCIP_RETCODE SCIPsetSolVals (SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
 
SCIP_EXPORT SCIP_RETCODE SCIPincSolVal (SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real incval)
 
SCIP_EXPORT SCIP_Real SCIPgetSolVal (SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetSolVals (SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
 
SCIP_EXPORT SCIP_Real SCIPgetSolOrigObj (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPgetSolTransObj (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPrecomputeSolObj (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Real SCIPtransformObj (SCIP *scip, SCIP_Real obj)
 
SCIP_EXPORT SCIP_Real SCIPretransformObj (SCIP *scip, SCIP_Real obj)
 
SCIP_EXPORT SCIP_Real SCIPgetSolTime (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT int SCIPgetSolRunnum (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Longint SCIPgetSolNodenum (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_HEURSCIPgetSolHeur (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_Bool SCIPareSolsEqual (SCIP *scip, SCIP_SOL *sol1, SCIP_SOL *sol2)
 
SCIP_EXPORT SCIP_RETCODE SCIPadjustImplicitSolVals (SCIP *scip, SCIP_SOL *sol, SCIP_Bool uselprows)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintSol (SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintTransSol (SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintMIPStart (SCIP *scip, SCIP_SOL *sol, FILE *file)
 
SCIP_EXPORT SCIP_RETCODE SCIPgetDualSolVal (SCIP *scip, SCIP_CONS *cons, SCIP_Real *dualsolval, SCIP_Bool *boundconstraint)
 
SCIP_EXPORT SCIP_Bool SCIPisDualSolAvailable (SCIP *scip, SCIP_Bool printreason)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintDualSol (SCIP *scip, FILE *file, SCIP_Bool printzeros)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintRay (SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
 
SCIP_EXPORT int SCIPgetNSols (SCIP *scip)
 
SCIP_EXPORT SCIP_SOL ** SCIPgetSols (SCIP *scip)
 
SCIP_EXPORT SCIP_SOLSCIPgetBestSol (SCIP *scip)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintBestSol (SCIP *scip, FILE *file, SCIP_Bool printzeros)
 
SCIP_EXPORT SCIP_RETCODE SCIPprintBestTransSol (SCIP *scip, FILE *file, SCIP_Bool printzeros)
 
SCIP_EXPORT SCIP_RETCODE SCIProundSol (SCIP *scip, SCIP_SOL *sol, SCIP_Bool *success)
 
SCIP_EXPORT SCIP_RETCODE SCIPretransformSol (SCIP *scip, SCIP_SOL *sol)
 
SCIP_EXPORT SCIP_RETCODE SCIPreadSol (SCIP *scip, const char *filename)
 
SCIP_EXPORT SCIP_RETCODE SCIPreadSolFile (SCIP *scip, const char *filename, SCIP_SOL *sol, SCIP_Bool xml, SCIP_Bool *partial, SCIP_Bool *error)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddSol (SCIP *scip, SCIP_SOL *sol, SCIP_Bool *stored)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddSolFree (SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddCurrentSol (SCIP *scip, SCIP_HEUR *heur, SCIP_Bool *stored)
 
SCIP_EXPORT SCIP_RETCODE SCIPtrySol (SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
 
SCIP_EXPORT SCIP_RETCODE SCIPtrySolFree (SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
 
SCIP_EXPORT SCIP_RETCODE SCIPtryCurrentSol (SCIP *scip, SCIP_HEUR *heur, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
 
SCIP_EXPORT SCIP_SOL ** SCIPgetPartialSols (SCIP *scip)
 
int SCIPgetNPartialSols (SCIP *scip)
 
SCIP_EXPORT SCIP_RETCODE SCIPcheckSol (SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)
 
SCIP_EXPORT SCIP_RETCODE SCIPcheckSolOrig (SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
 
SCIP_EXPORT void SCIPupdateSolIntegralityViolation (SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol)
 
SCIP_EXPORT void SCIPupdateSolBoundViolation (SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
 
SCIP_EXPORT void SCIPupdateSolLPRowViolation (SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
 
SCIP_EXPORT void SCIPupdateSolConsViolation (SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
 
SCIP_EXPORT void SCIPupdateSolLPConsViolation (SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
 
SCIP_EXPORT void SCIPactivateSolViolationUpdates (SCIP *scip)
 
SCIP_EXPORT void SCIPdeactivateSolViolationUpdates (SCIP *scip)
 
SCIP_EXPORT SCIP_Bool SCIPhasPrimalRay (SCIP *scip)
 
SCIP_EXPORT SCIP_Real SCIPgetPrimalRayVal (SCIP *scip, SCIP_VAR *var)
 
SCIP_EXPORT SCIP_RETCODE SCIPupdatePrimalRay (SCIP *scip, SCIP_SOL *primalray)
 

Function Documentation

◆ SCIPsolGetOrigin()

SCIP_EXPORT SCIP_SOLORIGIN SCIPsolGetOrigin ( SCIP_SOL sol)

gets origin of solution

Parameters
solprimal CIP solution

Definition at line 2511 of file sol.c.

References NULL, and SCIP_Sol::solorigin.

Referenced by DECL_VARFIXINGS(), SCIPprimalAddOrigObjoffset(), SCIPprimalRetransformSolutions(), SCIPretransformSol(), and tightenVariables().

◆ SCIPsolIsOriginal()

◆ SCIPsolIsPartial()

SCIP_EXPORT SCIP_Bool SCIPsolIsPartial ( SCIP_SOL sol)

returns whether the given solution is partial

returns whether the given solution is defined on original variables and containes unknown solution values

Parameters
solprimal CIP solution

Definition at line 2531 of file sol.c.

References NULL, SCIP_SOLORIGIN_PARTIAL, and SCIP_Sol::solorigin.

Referenced by readSol(), readSolFile(), readXmlSolFile(), SCIPcheckSol(), SCIPcheckSolOrig(), SCIPprimalAddOrigSol(), SCIPprimalAddOrigSolFree(), SCIPprimalAddSol(), SCIPprintMIPStart(), SCIPprintSol(), SCIPsolPrint(), SCIPsolSetVal(), SCIPtrySol(), and SCIPtrySolFree().

◆ SCIPsolGetOrigObj()

SCIP_EXPORT SCIP_Real SCIPsolGetOrigObj ( SCIP_SOL sol)

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

Parameters
solprimal CIP solution

Definition at line 2541 of file sol.c.

References NULL, SCIP_Sol::obj, and SCIPsolIsOriginal().

Referenced by primalAddOrigSol(), primalExistsOrigSol(), primalSearchOrigSolPos(), SCIPgetSolOrigObj(), SCIPprimalAddOrigObjoffset(), SCIPprimalTransformSol(), SCIPprintMIPStart(), SCIPprintSol(), solveAndEvalSubscip(), and storeSolution().

◆ SCIPsolGetTime()

SCIP_EXPORT SCIP_Real SCIPsolGetTime ( SCIP_SOL sol)

gets clock time, when this solution was found

Parameters
solprimal CIP solution

Definition at line 2564 of file sol.c.

References NULL, and SCIP_Sol::time.

Referenced by primalAddSol(), SCIPgetSolTime(), and SCIPprintSolutionStatistics().

◆ SCIPsolGetRunnum()

SCIP_EXPORT int SCIPsolGetRunnum ( SCIP_SOL sol)

gets branch and bound run number, where this solution was found

Parameters
solprimal CIP solution

Definition at line 2574 of file sol.c.

References NULL, and SCIP_Sol::runnum.

Referenced by primalAddSol(), SCIPgetSolRunnum(), and SCIPprintSolutionStatistics().

◆ SCIPsolGetNodenum()

SCIP_EXPORT SCIP_Longint SCIPsolGetNodenum ( SCIP_SOL sol)

gets node number of the specific branch and bound run, where this solution was found

gets node number, where this solution was found

Parameters
solprimal CIP solution

Definition at line 2584 of file sol.c.

References SCIP_Sol::nodenum, and NULL.

Referenced by determineVariableFixings(), primalAddSol(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPgetSolNodenum(), SCIPprintSolutionStatistics(), SCIPsolve(), setupAndSolve(), setupAndSolveSubscip(), and solHasNewSource().

◆ SCIPsolGetDepth()

SCIP_EXPORT int SCIPsolGetDepth ( SCIP_SOL sol)

gets node's depth, where this solution was found

Parameters
solprimal CIP solution

Definition at line 2594 of file sol.c.

References SCIP_Sol::depth, and NULL.

Referenced by primalAddSol(), and SCIPprintSolutionStatistics().

◆ SCIPsolGetType()

SCIP_EXPORT SCIP_SOLTYPE SCIPsolGetType ( SCIP_SOL sol)

gets information if solution was found by the LP, a primal heuristic, or a custom relaxator

Parameters
solprimal CIP solution

Definition at line 2666 of file sol.c.

References NULL, and SCIP_Sol::type.

Referenced by SCIP_DECL_DISPOUTPUT().

◆ SCIPsolGetHeur()

SCIP_EXPORT SCIP_HEUR* SCIPsolGetHeur ( SCIP_SOL sol)

◆ SCIPsolGetRelax()

SCIP_EXPORT SCIP_RELAX* SCIPsolGetRelax ( SCIP_SOL sol)

gets relaxation handler that found this solution, or NULL if solution has different type than SCIP_SOLTYPE_RELAX

Parameters
solprimal CIP solution

Definition at line 2676 of file sol.c.

References SCIP_Sol::creator, NULL, SCIP_Sol::relax, SCIP_SOLTYPE_RELAX, and SCIP_Sol::type.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIPsolCopy().

◆ SCIPsolSetHeur()

SCIP_EXPORT void SCIPsolSetHeur ( SCIP_SOL sol,
SCIP_HEUR heur 
)

informs the solution that it now belongs to the given primal heuristic. For convenience and backwards compatibility, the method accepts NULL as input for heur, in which case the solution type is set to SCIP_SOLTYPE_LPRELAX.

Note
Relaxation handlers should use SCIPsolSetRelax() instead.
Parameters
solprimal CIP solution
heurprimal heuristic that found the solution, or NULL for LP solutions

Definition at line 2649 of file sol.c.

References SCIP_Sol::creator, SCIP_Sol::heur, NULL, SCIP_SOLTYPE_HEUR, SCIPsolSetLPRelaxation(), and SCIP_Sol::type.

Referenced by createSolFromNLP(), createSolFromSubScipSol(), primalLinkCurrentSol(), SCIP_DECL_HEUREXEC(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPheurSyncPassSol(), SCIPsolCopy(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreatePartial(), SCIPsolCreateUnknown(), SCIPupdateStartpointHeurSubNlp(), and solveComponent().

◆ SCIPsolSetRelax()

SCIP_EXPORT void SCIPsolSetRelax ( SCIP_SOL sol,
SCIP_RELAX relax 
)

informs the solution that it now belongs to the given relaxation handler

Parameters
solprimal CIP solution
relaxrelaxator that found the solution

Definition at line 2686 of file sol.c.

References SCIP_Sol::creator, NULL, SCIP_Sol::relax, SCIP_SOLTYPE_RELAX, and SCIP_Sol::type.

Referenced by SCIPsolCopy(), and SCIPsolCreateRelaxSol().

◆ SCIPsolSetLPRelaxation()

SCIP_EXPORT void SCIPsolSetLPRelaxation ( SCIP_SOL sol)

informs the solution that it is an LP relaxation solution

Parameters
solprimal CIP solution

Definition at line 2699 of file sol.c.

References NULL, SCIP_SOLTYPE_LPRELAX, and SCIP_Sol::type.

Referenced by SCIPsolSetHeur().

◆ SCIPsolSetStrongbranching()

SCIP_EXPORT void SCIPsolSetStrongbranching ( SCIP_SOL sol)

informs the solution that it is a solution found during strong branching

Parameters
solprimal CIP solution

Definition at line 2709 of file sol.c.

References NULL, SCIP_SOLTYPE_STRONGBRANCH, and SCIP_Sol::type.

Referenced by SCIPtryStrongbranchLPSol().

◆ SCIPsolSetPseudo()

SCIP_EXPORT void SCIPsolSetPseudo ( SCIP_SOL sol)

informs the solution that it originates from a pseudo solution

Parameters
solprimal CIP solution

Definition at line 2719 of file sol.c.

References NULL, SCIP_SOLTYPE_PSEUDO, and SCIP_Sol::type.

Referenced by SCIPsolCreatePseudoSol().

◆ SCIPsolGetIndex()

◆ SCIPsolGetAbsBoundViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetAbsBoundViolation ( SCIP_SOL sol)

get maximum absolute bound violation of solution

Parameters
solprimal CIP solution

Definition at line 2413 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolGetRelBoundViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetRelBoundViolation ( SCIP_SOL sol)

get maximum relative bound violation of solution

Parameters
solprimal CIP solution

Definition at line 2423 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolGetAbsIntegralityViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetAbsIntegralityViolation ( SCIP_SOL sol)

get maximum absolute integrality violation of solution

Parameters
solprimal CIP solution

Definition at line 2433 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolGetAbsLPRowViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetAbsLPRowViolation ( SCIP_SOL sol)

get maximum absolute LP row violation of solution

Parameters
solprimal CIP solution

Definition at line 2443 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolGetRelLPRowViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetRelLPRowViolation ( SCIP_SOL sol)

get maximum relative LP row violation of solution

Parameters
solprimal CIP solution

Definition at line 2453 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolGetAbsConsViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetAbsConsViolation ( SCIP_SOL sol)

get maximum absolute constraint violation of solution

Parameters
solprimal CIP solution

Definition at line 2463 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolGetRelConsViolation()

SCIP_EXPORT SCIP_Real SCIPsolGetRelConsViolation ( SCIP_SOL sol)

get maximum relative constraint violation of solution

Parameters
solprimal CIP solution

Definition at line 2473 of file sol.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPcreateSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to zero

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 320 of file scip_sol.c.

References FALSE, Scip::mem, NULL, Scip::origprimal, Scip::origprob, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPerrorMessage, SCIPsolCreate(), SCIPsolCreateOriginal(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::tree, and TRUE.

Referenced by applyBoundHeur(), applyRepair(), applyVbounds(), checkSystemGF2(), computeInteriorPoint(), createCGMIPprimalsols(), createNewSol(), createSolFromNLP(), createSolFromSubScipSol(), createSwitchSolution(), DECL_VARFIXINGS(), generateCloseCutPoint(), heurExec(), initConcsolver(), initProblem(), processNlRow(), readSol(), sampleRandomPoints(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINIT(), SCIPcomputeLPRelIntPoint(), SCIPcycAddIncompleteSol(), SCIPprobdataAddNewSol(), SCIPStpHeurTMRunLP(), SCIPtranslateSubSol(), SCIPtranslateSubSols(), separateAlternativeProofs(), separateCuts(), setAndUpdateCorePoint(), setupAndSolve(), solveNLP(), tryOneOpt(), and trySolCandidate().

◆ SCIPcreateLPSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateLPSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to the current LP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 362 of file scip_sol.c.

References FALSE, Scip::lp, Scip::mem, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolCreateLPSol(), SCIPtreeHasCurrentNodeLP(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by constructValidSolution(), performInteriorSolCutStrengthening(), proposeFeasibleSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIPtryStrongbranchLPSol(), and setAndUpdateCorePoint().

◆ SCIPcreateNLPSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateNLPSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to the current NLP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 390 of file scip_sol.c.

References FALSE, Scip::mem, Scip::nlp, NULL, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPisNLPConstructed(), SCIPnlpHasSolution(), SCIPsolCreateNLPSol(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by resolveNLPWithTighterFeastol(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPbendersSolSlackVarsActive(), and SCIPbendersSolveSubproblemLP().

◆ SCIPcreateRelaxSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateRelaxSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to the current relaxation solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 425 of file scip_sol.c.

References FALSE, Scip::mem, Scip::primal, SCIP_Mem::probmem, Scip::relaxation, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPrelaxationIsSolValid(), SCIPsolCreateRelaxSol(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by constructValidSolution().

◆ SCIPcreatePseudoSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreatePseudoSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to the current pseudo solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 452 of file scip_sol.c.

References FALSE, Scip::lp, Scip::mem, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolCreatePseudoSol(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by constructValidSolution(), and SCIP_DECL_CONSENFOPS().

◆ SCIPcreateCurrentSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateCurrentSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to the current LP or pseudo solution, depending on whether the LP was solved at the current node

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 475 of file scip_sol.c.

References FALSE, Scip::lp, Scip::mem, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolCreateCurrentSol(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_SEPAEXECLP(), SCIPbendersSolSlackVarsActive(), SCIPcreateSolCopy(), and SCIPcreateSolCopyOrig().

◆ SCIPcreatePartialSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreatePartialSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a partial primal solution, initialized to unknown values

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 497 of file scip_sol.c.

References FALSE, Scip::mem, Scip::origprimal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolCreatePartial(), Scip::set, Scip::stat, and TRUE.

Referenced by readMst().

◆ SCIPcreateUnknownSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateUnknownSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution, initialized to unknown values

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 525 of file scip_sol.c.

References FALSE, Scip::mem, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolCreateUnknown(), Scip::set, Scip::stat, Scip::tree, and TRUE.

◆ SCIPcreateOrigSol()

SCIP_EXPORT SCIP_RETCODE SCIPcreateOrigSol ( SCIP scip,
SCIP_SOL **  sol,
SCIP_HEUR heur 
)

creates a primal solution living in the original problem space, initialized to zero; a solution in original space allows to set original variables to values that would be invalid in the transformed problem due to preprocessing fixings or aggregations

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

creates a primal solution living in the original problem space, initialized to zero; a solution in original space allows to set original variables to values that would be invalid in the transformed problem due to preprocessing fixings or aggregations

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
heurheuristic that found the solution (or NULL if it's from the tree)

Definition at line 557 of file scip_sol.c.

References FALSE, Scip::mem, NULL, Scip::origprimal, Scip::origprob, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPerrorMessage, SCIPsolCreateOriginal(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::tree, and TRUE.

Referenced by applyOptcumulative(), componentSetupWorkingSol(), createSolFromSubScipSol(), executeHeuristic(), fixDiscreteVars(), reuseSolution(), SCIP_DECL_CONCSOLVERSYNCREAD(), SCIPcreateFiniteSolCopy(), SCIPprobdataAddNewSol(), setupAndSolveSubscipOneopt(), and solveAndEvalSubscip().

◆ SCIPcreateSolCopy()

SCIP_EXPORT SCIP_RETCODE SCIPcreateSolCopy ( SCIP scip,
SCIP_SOL **  sol,
SCIP_SOL sourcesol 
)

creates a copy of a primal solution; note that a copy of a linked solution is also linked and needs to be unlinked if it should stay unaffected from changes in the LP or pseudo solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

creates a copy of a primal solution; note that a copy of a linked solution is also linked and needs to be unlinked if it should stay unaffected from changes in the LP or pseudo solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
sourcesolprimal CIP solution to copy

Definition at line 610 of file scip_sol.c.

References FALSE, Scip::mem, NULL, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPcreateCurrentSol(), SCIPsolCopy(), Scip::set, Scip::stat, and TRUE.

Referenced by constructValidSolution(), enforceCardinality(), fromCommandLine(), proposeFeasibleSolution(), sampleRandomPoints(), SCIP_DECL_CONSCHECK(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), SCIPaddSol(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPsetBasePointClosecuts(), SCIPupdateStartpointHeurSubNlp(), and setAndUpdateCorePoint().

◆ SCIPcreateSolCopyOrig()

SCIP_EXPORT SCIP_RETCODE SCIPcreateSolCopyOrig ( SCIP scip,
SCIP_SOL **  sol,
SCIP_SOL sourcesol 
)

creates a copy of a solution in the original primal solution space

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
sourcesolprimal CIP solution to copy

Definition at line 650 of file scip_sol.c.

References FALSE, Scip::mem, NULL, Scip::origprimal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPcreateCurrentSol(), SCIPsolCopy(), Scip::set, SCIP_Set::stage, Scip::stat, and TRUE.

◆ SCIPcreateFiniteSolCopy()

SCIP_EXPORT SCIP_RETCODE SCIPcreateFiniteSolCopy ( SCIP scip,
SCIP_SOL **  sol,
SCIP_SOL sourcesol,
SCIP_Bool success 
)

creates a copy of a primal solution, thereby replacing infinite fixings of variables by finite values; the copy is always defined in the original variable space; success indicates whether the objective value of the solution was changed by removing infinite values

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to store the solution
sourcesolprimal CIP solution to copy
successdoes the finite solution have the same objective value?

Definition at line 841 of file scip_sol.c.

References FALSE, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPcheckStage(), SCIPcreate(), SCIPcreateOrigSol(), SCIPdebugMsg, SCIPepsilon(), SCIPfree(), SCIPfreeBufferArray, SCIPgetFixedVars(), SCIPgetNFixedVars(), SCIPgetOrigVarsData(), SCIPgetSolOrigObj(), SCIPgetSolVals(), SCIPisEQ(), SCIPisInfinity(), SCIPprintSol(), SCIPsetSolVal(), SCIPvarGetLbGlobal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarGetUbOriginal(), setupAndSolveFiniteSolSubscip(), and TRUE.

Referenced by freeTransform(), polyscip::Polyscip::numberofUnboundedResults(), and SCIP_DECL_DIALOGEXEC().

◆ SCIPfreeSol()

SCIP_EXPORT SCIP_RETCODE SCIPfreeSol ( SCIP scip,
SCIP_SOL **  sol 
)

frees primal CIP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solpointer to the solution

Definition at line 977 of file scip_sol.c.

References FALSE, Scip::mem, Scip::origprimal, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPerrorMessage, SCIPsolFree(), Scip::set, SCIP_Set::stage, and TRUE.

Referenced by applyBoundHeur(), applyHeur(), applyOptcumulative(), applyRepair(), applyVbounds(), checkSystemGF2(), constructValidSolution(), createCoveringProblem(), createNewSol(), createSolFromSubScipSol(), DECL_VARFIXINGS(), enforceCardinality(), freeComponent(), freeMemory(), freeProblem(), fromCommandLine(), heurExec(), polyscip::Polyscip::numberofUnboundedResults(), performInteriorSolCutStrengthening(), proposeFeasibleSolution(), readMst(), readSol(), resolveNLPWithTighterFeastol(), sampleRandomPoints(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXITSOL(), SCIPapplyHeurDualval(), SCIPapplyUndercover(), SCIPbendersExit(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblemLP(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPheurSyncPassSol(), SCIPprobdataAddNewSol(), SCIPsetBasePointClosecuts(), SCIPStpHeurTMRunLP(), SCIPtranslateSubSols(), SCIPtryStrongbranchLPSol(), SCIPupdateStartpointHeurSubNlp(), separateAlternativeProofs(), separateCuts(), setAndUpdateCorePoint(), setupAndSolve(), solveAndEvalSubscip(), solveComponent(), solveNLP(), solveSubNLP(), solveSubproblem(), storeSolution(), and transferSolution().

◆ SCIPlinkLPSol()

SCIP_EXPORT SCIP_RETCODE SCIPlinkLPSol ( SCIP scip,
SCIP_SOL sol 
)

links a primal solution to the current LP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1018 of file scip_sol.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPlpIsSolved(), SCIPsolLinkLPSol(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyBoundHeur(), applyVbounds(), getSolFromFacet(), performLPRandRounding(), performLPSimpleRounding(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIPperformGenericDivingAlgorithm(), SCIPStpHeurTMRunLP(), solveLp(), tryOneOpt(), and trySolCandidate().

◆ SCIPlinkNLPSol()

SCIP_EXPORT SCIP_RETCODE SCIPlinkNLPSol ( SCIP scip,
SCIP_SOL sol 
)

links a primal solution to the current NLP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1044 of file scip_sol.c.

References FALSE, Scip::nlp, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPnlpGetSolstat(), SCIPsolLinkNLPSol(), Scip::stat, Scip::tree, and TRUE.

◆ SCIPlinkRelaxSol()

SCIP_EXPORT SCIP_RETCODE SCIPlinkRelaxSol ( SCIP scip,
SCIP_SOL sol 
)

links a primal solution to the current relaxation solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1076 of file scip_sol.c.

References FALSE, Scip::relaxation, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPrelaxationIsSolValid(), SCIPsolLinkRelaxSol(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by performRelaxSimpleRounding().

◆ SCIPlinkPseudoSol()

SCIP_EXPORT SCIP_RETCODE SCIPlinkPseudoSol ( SCIP scip,
SCIP_SOL sol 
)

links a primal solution to the current pseudo solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1103 of file scip_sol.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolLinkPseudoSol(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

◆ SCIPlinkCurrentSol()

SCIP_EXPORT SCIP_RETCODE SCIPlinkCurrentSol ( SCIP scip,
SCIP_SOL sol 
)

links a primal solution to the current LP or pseudo solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1123 of file scip_sol.c.

References FALSE, Scip::lp, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolLinkCurrentSol(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by processNlRow().

◆ SCIPclearSol()

SCIP_EXPORT SCIP_RETCODE SCIPclearSol ( SCIP scip,
SCIP_SOL sol 
)

clears a primal solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1154 of file scip_sol.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolClear(), Scip::stat, Scip::tree, and TRUE.

◆ SCIPunlinkSol()

SCIP_EXPORT SCIP_RETCODE SCIPunlinkSol ( SCIP scip,
SCIP_SOL sol 
)

stores solution values of variables in solution's own array

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1182 of file scip_sol.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolUnlink(), Scip::set, Scip::transprob, and TRUE.

Referenced by constructValidSolution(), performInteriorSolCutStrengthening(), proposeFeasibleSolution(), SCIP_DECL_CONSCHECK(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPperformGenericDivingAlgorithm(), SCIPretransformSol(), SCIPupdateStartpointHeurSubNlp(), and setAndUpdateCorePoint().

◆ SCIPsetSolVal()

SCIP_EXPORT SCIP_RETCODE SCIPsetSolVal ( SCIP scip,
SCIP_SOL sol,
SCIP_VAR var,
SCIP_Real  val 
)

sets value of variable in primal CIP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution
varvariable to add to solution
valsolution value of variable

Definition at line 1213 of file scip_sol.c.

References FALSE, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolIsOriginal(), SCIPsolSetVal(), SCIPvarGetName(), SCIPvarIsTransformed(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by applyOptcumulative(), applyRepair(), assignVars(), buildConvexCombination(), checkCands(), checkSystemGF2(), componentSetupWorkingSol(), computeInteriorPoint(), constructSolution(), constructValidSolution(), createCGMIPprimalsols(), createNewSol(), createSolFromNLP(), createSolFromSubScipSol(), DECL_VARFIXINGS(), enfopsCons(), fixDiscreteVars(), generateCloseCutPoint(), getNLPFracVars(), getSolFromFacet(), heurExec(), improvePoint(), initializeSol(), initProblem(), makeSOS1conflictgraphFeasible(), makeSOS1constraintsFeasible(), optimize(), performInteriorSolCutStrengthening(), performRandRounding(), performSimpleRounding(), polishPrimalSolution(), polishSolution(), proposeFeasibleSolution(), readSolFile(), readXmlSolFile(), reuseSolution(), sampleRandomPoints(), SCIP_DECL_HEUREXEC(), SCIPapplyHeurDualval(), SCIPcomputeLPRelIntPoint(), SCIPcreateFiniteSolCopy(), SCIPmakeIndicatorFeasible(), SCIPprobdataAddNewSol(), separateCuts(), setAndUpdateCorePoint(), setupAndSolve(), setupAndSolveSubscipOneopt(), solveAndEvalSubscip(), solveComponent(), solveNLP(), updateSlacks(), and updateVariableRounding().

◆ SCIPsetSolVals()

SCIP_EXPORT SCIP_RETCODE SCIPsetSolVals ( SCIP scip,
SCIP_SOL sol,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real vals 
)

sets values of multiple variables in primal CIP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution
nvarsnumber of variables to set solution value for
varsarray with variables to add to solution
valsarray with solution values of variables

Definition at line 1255 of file scip_sol.c.

References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolIsOriginal(), SCIPsolSetVal(), SCIPvarGetName(), SCIPvarIsTransformed(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by createNewSol(), initConcsolver(), reuseSolution(), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(), SCIP_DECL_CONCSOLVERSYNCREAD(), SCIPprobdataAddNewSol(), SCIPtranslateSubSol(), and SCIPtranslateSubSols().

◆ SCIPincSolVal()

SCIP_EXPORT SCIP_RETCODE SCIPincSolVal ( SCIP scip,
SCIP_SOL sol,
SCIP_VAR var,
SCIP_Real  incval 
)

increases value of variable in primal CIP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution
varvariable to increase solution value for
incvalincrement for solution value of variable

Definition at line 1310 of file scip_sol.c.

References FALSE, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolIncVal(), SCIPsolIsOriginal(), SCIPvarGetName(), SCIPvarIsTransformed(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by proposeFeasibleSolution().

◆ SCIPgetSolVal()

SCIP_EXPORT SCIP_Real SCIPgetSolVal ( SCIP scip,
SCIP_SOL sol,
SCIP_VAR var 
)

returns value of variable in primal CIP solution, or in current LP/pseudo solution

Returns
value of variable in primal CIP solution, or in current LP/pseudo solution
Precondition
In case the solution pointer sol is NULL, that means it is asked for the LP or pseudo solution, this method can only be called if scip is in the solving stage SCIP_STAGE_SOLVING. In any other case, this method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
varvariable to get value for

Definition at line 1353 of file scip_sol.c.

References FALSE, NULL, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolGetVal(), SCIPtreeHasCurrentNodeLP(), SCIPvarGetSol(), Scip::set, Scip::stat, Scip::tree, and TRUE.

Referenced by addBilinearTermToCut(), addBranchingComplementaritiesSOS1(), addFacetToCut(), addLinearTermToCut(), addLocalBranchingConstraint(), addLocalbranchingConstraintAndObjcutoff(), applyRepair(), branchBalancedCardinality(), branchUnbalancedCardinality(), buildConvexCombination(), buildMod2Matrix(), buildsolgraph(), calcEfficacy(), calcEfficacyDenseStorageQuad(), checkAndConss(), checkCands(), checkCons(), checkCumulativeCondition(), checkOrigPbCons(), checkSetupTolerances(), checkSymresackSolution(), checkSystemGF2(), chooseGuidedVar(), collectBranchingCands(), collectEstLst(), collectSolActivities(), collectSolution(), computeCut(), computeGradient(), computeIntegerVariableBounds(), computeIntegerVariableBoundsDins(), computeNogoodCut(), computeReferencePointGauge(), computeReferencePointProjection(), computeStandardIntegerOptCut(), computeViolation(), consdataCheckSuperindicator(), consdataGetActivity(), constructSNFRelaxation(), constructValidSolution(), copyValues(), createCGCutCMIR(), createCGCutDirect(), createCGCutStrongCG(), createNAryBranch(), createNewSol(), createSelectedSortedEventpointsSol(), createSolFromSubScipSol(), createSortedEventpointsSol(), createSubproblem(), createSubscip(), CUTOFF_CONSTRAINT(), cutsTransformMIR(), DECL_CHANGESUBSCIP(), DECL_VARFIXINGS(), determineBestBounds(), determineBound(), determineBoundForSNF(), determineFixings(), determineVariableFixings(), scipexamples::QueensSolver::disp(), doSeachEcAggr(), enforceCardinality(), enforceConflictgraph(), enforceConssSOS1(), enforceConstraint(), enforceCuts(), enforceIndicators(), enforceSol(), enforceSOS2(), evalLhs(), evaluateGauge(), executeHeuristic(), extendToCover(), extractVariablesMINLP(), findSubtour(), fixDiscreteVars(), fixMatchingSolutionValues(), fixVariables(), generateCloseCutPoint(), generateClusterCuts(), generateCut(), generateCutLTI(), generateCutProjectedPoint(), generateCutSol(), generateSecantCut(), generateSparseCut(), generateZerohalfCut(), getBoundConsFromVertices(), getBranchingPrioritiesSOS1(), getBranchingVerticesSOS1(), getClosestVlb(), getClosestVub(), getDiveBdChgsSOS1conflictgraph(), getDiveBdChgsSOS1constraints(), getFixingValue(), getFixVal(), getNLPFracVars(), getPotential(), getPotentialContributed(), getRelDistance(), getSolutionValues(), getVectorOfWeights(), handle1Cycle(), handleCycle(), heurExec(), improvePoint(), isConsViolated(), isConvexLocal(), isPossibleToComputeCut(), isSolFeasible(), isViolatedSOS1(), LOPseparate(), makeSOS1conflictgraphFeasible(), makeSOS1constraintsFeasible(), maximalslack(), nodeGetSolvalBinaryBigMSOS1(), nodeGetSolvalVarboundLbSOS1(), nodeGetSolvalVarboundUbSOS1(), polyscip::Polyscip::numberofUnboundedResults(), optimize(), performInteriorSolCutStrengthening(), performRandRounding(), polishPrimalSolution(), polishSolution(), proposeBranchingPoint(), proposeFeasibleSolution(), registerBranchingCandidates(), registerBranchingCandidatesCentrality(), registerBranchingCandidatesGap(), registerBranchingCandidatesViolation(), registerLargeRelaxValueVariableForBranching(), reuseSolution(), rowprepCleanupImproveCoefrange(), runBenders(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSENFORELAX(), SCIP_DECL_CONSEXIT(), SCIP_DECL_CONSGETDIVEBDCHGS(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRICERREDCOST(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SOLVECUMULATIVE(), SCIPaddTrustregionNeighborhoodConstraint(), SCIPapplyHeurDualval(), SCIPapplyHeurSubNlp(), SCIPapplyProximity(), SCIPbendersGetAuxiliaryVarVal(), SCIPbendersSetupSubproblem(), SCIPbendersSolSlackVarsActive(), SCIPcheckSolutionOrbisack(), SCIPcomputeConvexEnvelopeFacet(), SCIPcutGenerationHeuristicCMIR(), SCIPcycAddIncompleteSol(), SCIPcycPrintSolutionValues(), SCIPgenerateAndApplyBendersOptCut(), SCIPgetRowprepViolation(), SCIPgetViolationAbspower(), SCIPisViolatedIndicator(), SCIPmakeIndicatorFeasible(), SCIPperformGenericDivingAlgorithm(), SCIPprintSolReaderFzn(), SCIPprobdataAddNewSol(), SCIPprobdataPrintGraph(), SCIPprobdataWriteSolution(), SCIPresolveSolHeurSubNlp(), SCIPseparateRelaxedKnapsack(), SCIPStpHeurRecRun(), SCIPverifyCircularPatternNLP(), SCIPwriteCliqueGraph(), selectdiffsols(), selectEssentialRounding(), selectNextDiving(), selectRounding(), selectShifting(), sepaImplBoundCutsSOS1(), separateCons(), separateCoversOrbisack(), separateCuts(), separateGLS(), separateHeur(), separateIndicators(), separateOddCycles(), separatePerspective(), sepaSubtour(), setAltLPObj(), setRedcosts(), setupAggregationData(), setupAndSolve(), setupAndSolveCumulativeSubscip(), setupAndSolveFiniteSolSubscip(), setupAndSolveSubscipOneopt(), solCutIsViolated(), solveAndEvalSubscip(), solveComponent(), solveLp(), solveNLP(), solveSubNLP(), storeAggrFromMIP(), tightenVariables(), transformNonIntegralRow(), translateSubSol(), tryFixVar(), updateBestCandidate(), updateSlacks(), updateWeightsTCliquegraph(), visualizeSolutionAscii(), visualizeSolutionGnuplot(), and visualizeSolutionMatplotlib().

◆ SCIPgetSolVals()

SCIP_EXPORT SCIP_RETCODE SCIPgetSolVals ( SCIP scip,
SCIP_SOL sol,
int  nvars,
SCIP_VAR **  vars,
SCIP_Real vals 
)

gets values of multiple variables in primal CIP solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
nvarsnumber of variables to get solution value for
varsarray with variables to get value for
valsarray to store solution values of variables

Definition at line 1390 of file scip_sol.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPgetVarSols(), SCIPsolGetVal(), Scip::set, Scip::stat, and TRUE.

Referenced by alnsFixMoreVariables(), computeViolations(), createNewSol(), generateCut(), generateSparseCut(), initConcsolver(), processNlRow(), reuseSolution(), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(), SCIP_DECL_CONCSOLVERSYNCWRITE(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFORELAX(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_CONSSEPASOL(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECSOL(), SCIPcreateFiniteSolCopy(), SCIPevalExprtreeSol(), SCIPprobdataGetXval(), SCIPseparateKnapsackCuts(), SCIPsetNLPInitialGuessSol(), SCIPsetRelaxSolValsSol(), separateCuts(), and solveCoveringProblem().

◆ SCIPgetSolOrigObj()

SCIP_EXPORT SCIP_Real SCIPgetSolOrigObj ( SCIP scip,
SCIP_SOL sol 
)

returns objective value of primal CIP solution w.r.t. original problem, or current LP/pseudo objective value

Returns
objective value of primal CIP solution w.r.t. original problem, or current LP/pseudo objective value
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo objective value

Definition at line 1436 of file scip_sol.c.

References FALSE, Scip::lp, NULL, Scip::origprob, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetObjval(), SCIPlpGetPseudoObjval(), SCIPprobExternObjval(), SCIPsolGetObj(), SCIPsolGetOrigObj(), SCIPsolIsOriginal(), SCIPtreeHasCurrentNodeLP(), Scip::set, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyBoundHeur(), applyOptcumulative(), applyRepair(), applyVbounds(), computeStandardIntegerOptCut(), createNewSol(), createSwitchSolution(), displayRelevantStats(), extractVariablesMINLP(), generateAndApplyBendersIntegerCuts(), infinityCountUpdate(), polyscip::Polyscip::numberofUnboundedResults(), presolve(), presolveRound(), reuseSolution(), runBenders(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONCSOLVERSYNCWRITE(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRICERREDCOST(), SCIPapplyHeurDualval(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersExec(), SCIPbendersExecSubproblemSolve(), SCIPbendersSolveSubproblem(), SCIPbendersSolveSubproblemLP(), SCIPcreateFiniteSolCopy(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPmakeSOS1sFeasible(), SCIPperformGenericDivingAlgorithm(), SCIPresolveSolHeurSubNlp(), SCIPtransformProb(), SCIPtranslateSubSols(), SCIPvisualFoundSolution(), setupAndSolveSubscipRapidlearning(), solveAndEvalSubscip(), solveComponent(), solveCoveringProblem(), visualizeSolutionAscii(), visualizeSolutionGnuplot(), and visualizeSolutionMatplotlib().

◆ SCIPgetSolTransObj()

SCIP_EXPORT SCIP_Real SCIPgetSolTransObj ( SCIP scip,
SCIP_SOL sol 
)

returns transformed objective value of primal CIP solution, or transformed current LP/pseudo objective value

Returns
transformed objective value of primal CIP solution, or transformed current LP/pseudo objective value
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo objective value

Definition at line 1483 of file scip_sol.c.

References FALSE, Scip::lp, NULL, Scip::origprob, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPlpGetObjval(), SCIPlpGetPseudoObjval(), SCIPsolGetObj(), SCIPtreeHasCurrentNodeLP(), Scip::set, Scip::transprob, Scip::tree, and TRUE.

Referenced by addTrustRegionConstraints(), applyHeur(), getGenVBoundsBound(), isDisplaySol(), pricing(), proposeFeasibleSolution(), sampleRandomPoints(), SCIP_DECL_HEUREXEC(), SCIPapplyProximity(), SCIPheurSyncPassSol(), SCIPupdateStartpointHeurSubNlp(), SCIPvisualFoundSolution(), separateCuts(), solveComponent(), transferSolution(), tryOneOpt(), trySolCandidate(), and updateSubproblemLowerbound().

◆ SCIPrecomputeSolObj()

SCIP_EXPORT SCIP_RETCODE SCIPrecomputeSolObj ( SCIP scip,
SCIP_SOL sol 
)

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)

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

Definition at line 1514 of file scip_sol.c.

References FALSE, NULL, Scip::origprob, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolRecomputeObj(), Scip::set, Scip::stat, and TRUE.

Referenced by SCIP_DECL_HEUREXEC().

◆ SCIPtransformObj()

SCIP_EXPORT SCIP_Real SCIPtransformObj ( SCIP scip,
SCIP_Real  obj 
)

maps original space objective value into transformed objective value

Returns
transformed objective value
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
objoriginal space objective value to transform

Definition at line 1543 of file scip_sol.c.

References FALSE, Scip::origprob, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPprobInternObjval(), Scip::set, Scip::transprob, and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPresolveSolHeurSubNlp(), and SCIPsetObjlimit().

◆ SCIPretransformObj()

◆ SCIPgetSolTime()

SCIP_EXPORT SCIP_Real SCIPgetSolTime ( SCIP scip,
SCIP_SOL sol 
)

gets clock time, when this solution was found

Returns
clock time, when this solution was found
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1595 of file scip_sol.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolGetTime(), and TRUE.

◆ SCIPgetSolRunnum()

SCIP_EXPORT int SCIPgetSolRunnum ( SCIP scip,
SCIP_SOL sol 
)

gets branch and bound run number, where this solution was found

Returns
branch and bound run number, where this solution was found
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1622 of file scip_sol.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolGetRunnum(), and TRUE.

◆ SCIPgetSolNodenum()

SCIP_EXPORT SCIP_Longint SCIPgetSolNodenum ( SCIP scip,
SCIP_SOL sol 
)

gets node number of the specific branch and bound run, where this solution was found

Returns
node number of the specific branch and bound run, where this solution was found
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1649 of file scip_sol.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolGetNodenum(), and TRUE.

Referenced by SCIP_DECL_HEUREXEC().

◆ SCIPgetSolHeur()

SCIP_EXPORT SCIP_HEUR* SCIPgetSolHeur ( SCIP scip,
SCIP_SOL sol 
)

gets heuristic, that found this solution (or NULL if it's from the tree)

Returns
heuristic, that found this solution (or NULL if it's from the tree)
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution

Definition at line 1676 of file scip_sol.c.

References FALSE, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolGetHeur(), and TRUE.

Referenced by determineVariableFixings(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_EVENTEXEC(), and SCIPupdateStartpointHeurSubNlp().

◆ SCIPareSolsEqual()

SCIP_EXPORT SCIP_Bool SCIPareSolsEqual ( SCIP scip,
SCIP_SOL sol1,
SCIP_SOL sol2 
)

returns whether two given solutions are exactly equal

Returns
returns whether two given solutions are exactly equal
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
sol1first primal CIP solution
sol2second primal CIP solution

Definition at line 1704 of file scip_sol.c.

References FALSE, Scip::origprob, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolsAreEqual(), Scip::set, Scip::stat, Scip::transprob, and TRUE.

◆ SCIPadjustImplicitSolVals()

SCIP_EXPORT SCIP_RETCODE SCIPadjustImplicitSolVals ( SCIP scip,
SCIP_SOL sol,
SCIP_Bool  uselprows 
)

adjusts solution values of implicit integer variables in handed solution. Solution objective value is not deteriorated by this method.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal CIP solution
uselprowsshould LP row information be considered for none-objective variables

Definition at line 1724 of file scip_sol.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolAdjustImplicitSolVals(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by performSimpleRounding().

◆ SCIPprintSol()

SCIP_EXPORT SCIP_RETCODE SCIPprintSol ( SCIP scip,
SCIP_SOL sol,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs non-zero variables of solution in original problem space to the given file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
In case the solution pointer sol is NULL (askinking for the current LP/pseudo solution), this method can be called if scip is in one of the following stages:
In case the solution pointer sol is not NULL, this method can be called if scip is in one of the following stages:

outputs non-zero variables of solution in original problem space to the given file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
In case the solution pointer sol is NULL (asking for the current LP/pseudo solution), this method can be called if scip is in one of the following stages:
In case the solution pointer sol is not NULL, this method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 1767 of file scip_sol.c.

References FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, NULL, Scip::origprob, Scip::primal, SCIP_Mem::probmem, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), SCIPisTransformed(), SCIPmessageFPrintInfo(), SCIPmessagehdlrIsQuiet(), SCIPmessagehdlrSetQuiet(), SCIPprintReal(), SCIPprobExternObjval(), SCIPsolCreateCurrentSol(), SCIPsolFree(), SCIPsolGetObj(), SCIPsolGetOrigObj(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPsolPrint(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by checkSystemGF2(), createCGCutDirect(), enforceConstraint(), enforceSol(), fromCommandLine(), performRandRounding(), performSimpleRounding(), pricing(), resolveNLPWithTighterFeastol(), runBrachistochrone(), runCircle(), runPacking(), runString(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRICERREDCOST(), SCIPbendersExec(), SCIPbendersSolveSubproblemLP(), SCIPcreateFiniteSolCopy(), SCIPprintBestSol(), searchEcAggrWithMIP(), separateCuts(), solveCoveringProblem(), and trySolCandidate().

◆ SCIPprintTransSol()

SCIP_EXPORT SCIP_RETCODE SCIPprintTransSol ( SCIP scip,
SCIP_SOL sol,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs non-zero variables of solution in transformed problem space to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 1849 of file scip_sol.c.

References FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, NULL, Scip::origprob, Scip::primal, SCIP_Mem::probmem, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPmessageFPrintInfo(), SCIPprintReal(), SCIPsolCreateCurrentSol(), SCIPsolFree(), SCIPsolGetObj(), SCIPsolIsOriginal(), SCIPsolPrint(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by SCIPprintBestTransSol().

◆ SCIPprintMIPStart()

SCIP_EXPORT SCIP_RETCODE SCIPprintMIPStart ( SCIP scip,
SCIP_SOL sol,
FILE *  file 
)

outputs discrete variables of solution in original problem space to the given file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution
fileoutput file (or NULL for standard output)

Definition at line 1906 of file scip_sol.c.

References FALSE, Scip::messagehdlr, NULL, Scip::origprob, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), SCIPmessageFPrintInfo(), SCIPmessagehdlrIsQuiet(), SCIPmessagehdlrSetQuiet(), SCIPprintReal(), SCIPprobExternObjval(), SCIPsolGetObj(), SCIPsolGetOrigObj(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPsolPrint(), Scip::set, Scip::stat, Scip::transprob, and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPgetDualSolVal()

SCIP_EXPORT SCIP_RETCODE SCIPgetDualSolVal ( SCIP scip,
SCIP_CONS cons,
SCIP_Real dualsolval,
SCIP_Bool boundconstraint 
)

returns dual solution value of a constraint

Parameters
scipSCIP data structure
consconstraint for which the dual solution should be returned
dualsolvalpointer to store the dual solution value
boundconstraintpointer to store whether the constraint is a bound constraint (or NULL)

Definition at line 1948 of file scip_sol.c.

References NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OBJSENSE_MAXIMIZE, SCIP_OKAY, SCIP_Real, SCIPconsGetHdlr(), SCIPconsGetNVars(), SCIPconsGetTransformed(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPgetDualsolLinear(), SCIPgetLhsLinear(), SCIPgetObjsense(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarRedcost(), SCIPgetVarsLinear(), SCIPsetIsEQ(), SCIPvarGetLPSol(), and Scip::set.

Referenced by printDualSol().

◆ SCIPisDualSolAvailable()

SCIP_EXPORT SCIP_Bool SCIPisDualSolAvailable ( SCIP scip,
SCIP_Bool  printreason 
)

check whether the dual solution is available

Note
This is used when calling SCIPprintDualSol()
Returns
is dual solution available?
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
printreasonprint warning message if dualsol is not available?

Definition at line 2074 of file scip_sol.c.

References SCIP_Prob::conss, FALSE, Scip::messagehdlr, SCIP_Prob::nconss, SCIP_Prob::ncontvars, NULL, SCIP_Prob::nvars, SCIP_Stat::performpresol, SCIP_CALL_ABORT, SCIP_STAGE_SOLVED, SCIPcheckStage(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPgetStage(), SCIPmessageFPrintInfo(), SCIPwarningMessage(), Scip::stat, Scip::transprob, and TRUE.

Referenced by SCIPprintDualSol().

◆ SCIPprintDualSol()

SCIP_EXPORT SCIP_RETCODE SCIPprintDualSol ( SCIP scip,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs dual solution from LP solver to file stream

Note
This only works if no presolving has been performed, which can be checked by calling method SCIPhasPerformedPresolve().
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

outputs dual solution from LP solver to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called in all stages but only prints dual information when called in SCIP_STAGE_SOLVED
Parameters
scipSCIP data structure
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 2137 of file scip_sol.c.

References printDualSol(), SCIP_CALL, SCIP_OKAY, SCIPisDualSolAvailable(), and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPprintRay()

SCIP_EXPORT SCIP_RETCODE SCIPprintRay ( SCIP scip,
SCIP_SOL sol,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs non-zero variables of solution representing a ray in original problem space to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution representing ray
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 2170 of file scip_sol.c.

References FALSE, Scip::messagehdlr, NULL, Scip::origprob, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPsolPrintRay(), Scip::set, Scip::stat, Scip::transprob, and TRUE.

Referenced by setupAndSolve(), and updatePrimalRay().

◆ SCIPgetNSols()

SCIP_EXPORT int SCIPgetNSols ( SCIP scip)

gets number of feasible primal solutions stored in the solution storage in case the problem is transformed; in case the problem stage is SCIP_STAGE_PROBLEM, the number of solution in the original solution candidate storage is returned

Returns
number of feasible primal solutions stored in the solution storage in case the problem is transformed; or number of solution in the original solution candidate storage if the problem stage is SCIP_STAGE_PROBLEM
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure

Definition at line 2206 of file scip_sol.c.

References FALSE, SCIP_Primal::nsols, Scip::origprimal, Scip::primal, SCIP_CALL_ABORT, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPABORT, SCIPcheckStage(), SCIPerrorMessage, Scip::set, SCIP_Set::stage, and TRUE.

Referenced by applyHeur(), applyRepair(), checkEstimateCriterion(), checkLogCriterion(), checkRankOneTransition(), createCGCuts(), createNLP(), createSubproblem(), DECL_VARFIXINGS(), determineSolvingPhase(), determineVariableFixings(), doSolveSubMIP(), extractVariablesMINLP(), initConcsolver(), presolve(), presolveRound(), reuseSolution(), runBrachistochrone(), runCircle(), runPacking(), runString(), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(), SCIP_DECL_CONCSOLVERSYNCWRITE(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRICERREDCOST(), SCIP_DECL_PROBEXITSOL(), SCIP_DECL_SEPAEXECLP(), SCIPapplyHeurSubNlp(), SCIPapplyProximity(), SCIPapplyRedSize(), SCIPprobdataWriteLogfileEnd(), SCIPStpHeurRecRun(), SCIPtranslateSubSols(), SCIPvalidateSolve(), SCIPverifyCircularPatternNLP(), searchEcAggrWithMIP(), selectdiffsols(), selectsols(), selectSolsRandomized(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipRapidlearning(), solveAndEvalSubscip(), solveCoveringProblem(), solveSubNLP(), solveSubproblem(), solveSubscipLpface(), storeAggrFromMIP(), transformSols(), and wrapperDins().

◆ SCIPgetSols()

SCIP_EXPORT SCIP_SOL** SCIPgetSols ( SCIP scip)

gets array of feasible primal solutions stored in the solution storage in case the problem is transformed; in case if the problem stage is in SCIP_STAGE_PROBLEM, it returns the number array of solution candidate stored

Returns
array of feasible primal solutions
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure

Definition at line 2255 of file scip_sol.c.

References FALSE, NULL, Scip::origprimal, Scip::primal, SCIP_CALL_ABORT, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPerrorMessage, Scip::set, SCIP_Primal::sols, SCIP_Set::stage, and TRUE.

Referenced by buildsolgraph(), createCGCuts(), DECL_VARFIXINGS(), determineVariableFixings(), doSolveSubMIP(), fixVariables(), reuseSolution(), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(), SCIP_DECL_CONCSOLVERSYNCWRITE(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRICERREDCOST(), SCIPapplyRedSize(), SCIPStpHeurRecRun(), SCIPtranslateSubSols(), selectdiffsols(), selectsols(), selectSolsRandomized(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), setupAndSolveSubscipRapidlearning(), solveSubNLP(), solveSubproblem(), and transformSols().

◆ SCIPgetBestSol()

SCIP_EXPORT SCIP_SOL* SCIPgetBestSol ( SCIP scip)

gets best feasible primal solution found so far if the problem is transformed; in case the problem is in SCIP_STAGE_PROBLEM it returns the best solution candidate, or NULL if no solution has been found or the candidate store is empty;

Returns
best feasible primal solution so far
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure

Definition at line 2305 of file scip_sol.c.

References FALSE, SCIP_Primal::nsols, NULL, Scip::origprimal, Scip::primal, SCIP_CALL_ABORT, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INIT, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPerrorMessage, Scip::set, SCIP_Primal::sols, SCIP_Set::stage, and TRUE.

Referenced by addLocalBranchingConstraint(), addLocalbranchingConstraintAndObjcutoff(), addTrustRegionConstraints(), applyHeur(), applyRepair(), computeIntegerVariableBounds(), computeIntegerVariableBoundsDins(), computeStandardIntegerOptCut(), createSubscip(), createSwitchSolution(), DECL_CHANGESUBSCIP(), DECL_NHREFSOL(), DECL_VARFIXINGS(), decompHorizonBlockUsedRecently(), decompHorizonGetFirstPosBestPotential(), decompHorizonNext(), determineFixings(), determineVariableFixings(), determineVariableFixingsDecomp(), scipexamples::QueensSolver::disp(), displayRelevantStats(), execRelpscost(), extractVariablesMINLP(), fixAndPropagate(), fromCommandLine(), getFixingValue(), infinityCountUpdate(), initConcsolver(), maximalslack(), polyscip::Polyscip::numberofUnboundedResults(), performInteriorSolCutStrengthening(), presolve(), presolveRound(), runBenders(), runBrachistochrone(), runCircle(), runPacking(), runString(), SCIP_DECL_CONSEXIT(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DISPINITSOL(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SOLVECUMULATIVE(), SCIPaddCurrentSol(), SCIPaddSol(), SCIPaddSolFree(), SCIPaddTrustregionNeighborhoodConstraint(), SCIPapplyHeurDualval(), SCIPapplyProximity(), SCIPbendersExecSubproblemSolve(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblem(), SCIPprintBestSol(), SCIPprintBestTransSol(), SCIPprobdataWriteSolution(), SCIPselectCuts(), SCIPtransformProb(), SCIPtryCurrentSol(), SCIPtrySol(), SCIPtrySolFree(), SCIPvalidateSolve(), SCIPverifyCircularPatternNLP(), searchEcAggrWithMIP(), selectInitialVariableDecomposition(), selectInitialVariableRandomly(), setAndUpdateCorePoint(), setupAndSolve(), setupAndSolveCumulativeSubscip(), setupAndSolveFiniteSolSubscip(), setupAndSolveSubscip(), setupAndSolveSubscipCrossover(), solveAndEvalSubscip(), solveComponent(), solveCoveringProblem(), solveSubscipLpface(), storeAggrFromMIP(), and transferSolution().

◆ SCIPprintBestSol()

SCIP_EXPORT SCIP_RETCODE SCIPprintBestSol ( SCIP scip,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs best feasible primal solution found so far to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

outputs best feasible primal solution found so far to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 2371 of file scip_sol.c.

References FALSE, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPgetBestSol(), SCIPmessageFPrintInfo(), SCIPprintSol(), and TRUE.

Referenced by execmain(), fromCommandLine(), SCIP_DECL_DIALOGEXEC(), and solveSubscip().

◆ SCIPprintBestTransSol()

SCIP_EXPORT SCIP_RETCODE SCIPprintBestTransSol ( SCIP scip,
FILE *  file,
SCIP_Bool  printzeros 
)

outputs best feasible primal solution found so far in transformed variables to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

outputs best feasible primal solution found so far in transformed variables to file stream

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
fileoutput file (or NULL for standard output)
printzerosshould variables set to zero be printed?

Definition at line 2411 of file scip_sol.c.

References FALSE, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPgetBestSol(), SCIPmessageFPrintInfo(), SCIPprintTransSol(), SCIPsolIsOriginal(), and TRUE.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIProundSol()

SCIP_EXPORT SCIP_RETCODE SCIProundSol ( SCIP scip,
SCIP_SOL sol,
SCIP_Bool success 
)

try to round given solution

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal solution
successpointer to store whether rounding was successful

Definition at line 2447 of file scip_sol.c.

References FALSE, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolIsOriginal(), SCIPsolRound(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyBoundHeur(), applyVbounds(), SCIP_DECL_HEUREXEC(), SCIPperformGenericDivingAlgorithm(), SCIPtryStrongbranchLPSol(), and solveNLP().

◆ SCIPretransformSol()

SCIP_EXPORT SCIP_RETCODE SCIPretransformSol ( SCIP scip,
SCIP_SOL sol 
)

retransforms solution to original problem space

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

retransforms solution to original problem space

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal CIP solution

Definition at line 2483 of file scip_sol.c.

References FALSE, Scip::origprob, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_SOLORIGIN_LPSOL, SCIP_SOLORIGIN_NLPSOL, SCIP_SOLORIGIN_ORIGINAL, SCIP_SOLORIGIN_PARTIAL, SCIP_SOLORIGIN_PSEUDOSOL, SCIP_SOLORIGIN_RELAXSOL, SCIP_SOLORIGIN_UNKNOWN, SCIP_SOLORIGIN_ZERO, SCIPcheckStage(), SCIPerrorMessage, SCIPsolGetOrigin(), SCIPsolRetransform(), SCIPunlinkSol(), Scip::set, Scip::stat, Scip::transprob, and TRUE.

Referenced by fromCommandLine().

◆ SCIPreadSol()

SCIP_EXPORT SCIP_RETCODE SCIPreadSol ( SCIP scip,
const char *  filename 
)

reads a given solution file

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
filenamename of the input file

Definition at line 2541 of file scip_sol.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPreadProb(), and TRUE.

◆ SCIPreadSolFile()

SCIP_EXPORT SCIP_RETCODE SCIPreadSolFile ( SCIP scip,
const char *  filename,
SCIP_SOL sol,
SCIP_Bool  xml,
SCIP_Bool partial,
SCIP_Bool error 
)

reads a given solution file and store the solution values in the given solution pointer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
filenamename of the input file
solsolution pointer
xmltrue, iff the given solution in written in XML
partialpointer to store if the solution is partial
errorpointer store if an error occured

Definition at line 2885 of file scip_sol.c.

References FALSE, readSolFile(), readXmlSolFile(), SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), and TRUE.

Referenced by readMst(), and readSol().

◆ SCIPaddSol()

SCIP_EXPORT SCIP_RETCODE SCIPaddSol ( SCIP scip,
SCIP_SOL sol,
SCIP_Bool stored 
)

adds feasible primal solution to solution storage by copying it

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
Do not call during propagation, use heur_trysol instead.
Parameters
scipSCIP data structure
solprimal CIP solution
storedstores whether given solution was good enough to keep

Definition at line 2925 of file scip_sol.c.

References Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, Scip::origprimal, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPcreateSolCopy(), SCIPerrorMessage, SCIPgetBestSol(), SCIPprimalAddOrigSol(), SCIPprimalAddSol(), SCIPprimalAddSolFree(), SCIPsolIsOriginal(), SCIPsolRetransform(), SCIPsolUnlink(), SCIPstoreSolutionGap(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by initConcsolver(), and solveComponent().

◆ SCIPaddSolFree()

SCIP_EXPORT SCIP_RETCODE SCIPaddSolFree ( SCIP scip,
SCIP_SOL **  sol,
SCIP_Bool stored 
)

adds primal solution to solution storage, frees the solution afterwards

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
Do not call during propagation, use heur_trysol instead.
Parameters
scipSCIP data structure
solpointer to primal CIP solution; is cleared in function call
storedstores whether given solution was good enough to keep

Definition at line 3015 of file scip_sol.c.

References Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, NULL, Scip::origprimal, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_EXITSOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIP_STAGE_TRANSFORMING, SCIPcheckStage(), SCIPerrorMessage, SCIPgetBestSol(), SCIPprimalAddOrigSolFree(), SCIPprimalAddSolFree(), SCIPsolIsOriginal(), SCIPsolRetransform(), SCIPsolUnlink(), SCIPstoreSolutionGap(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyRepair(), readMst(), readSol(), reuseSolution(), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(), SCIP_DECL_HEUREXEC(), SCIPprobdataAddNewSol(), and SCIPtranslateSubSols().

◆ SCIPaddCurrentSol()

SCIP_EXPORT SCIP_RETCODE SCIPaddCurrentSol ( SCIP scip,
SCIP_HEUR heur,
SCIP_Bool stored 
)

adds current LP/pseudo solution to solution storage

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
heurheuristic that found the solution
storedstores whether given solution was good enough to keep

Definition at line 3085 of file scip_sol.c.

References Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPgetBestSol(), SCIPprimalAddCurrentSol(), SCIPstoreSolutionGap(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

◆ SCIPtrySol()

SCIP_EXPORT SCIP_RETCODE SCIPtrySol ( SCIP scip,
SCIP_SOL sol,
SCIP_Bool  printreason,
SCIP_Bool  completely,
SCIP_Bool  checkbounds,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool stored 
)

checks solution for feasibility; if possible, adds it to storage by copying

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
Do not call during propagation, use heur_trysol instead.
Parameters
scipSCIP data structure
solprimal CIP solution
printreasonShould all reasons of 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?
storedstores whether given solution was feasible and good enough to keep

Definition at line 3125 of file scip_sol.c.

References checkSolOrig(), Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, NULL, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIPABORT, SCIPcheckStage(), SCIPerrorMessage, SCIPgetBestSol(), SCIPprimalAddSol(), SCIPprimalTrySol(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPsolRetransform(), SCIPsolUnlink(), SCIPstoreSolutionGap(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyBoundHeur(), applyVbounds(), createNewSol(), enforceCardinality(), performRandRounding(), performSimpleRounding(), SCIP_DECL_HEUREXEC(), SCIPperformGenericDivingAlgorithm(), solveLp(), solveSubNLP(), and solveSubproblem().

◆ SCIPtrySolFree()

SCIP_EXPORT SCIP_RETCODE SCIPtrySolFree ( SCIP scip,
SCIP_SOL **  sol,
SCIP_Bool  printreason,
SCIP_Bool  completely,
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

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
Do not call during propagation, use heur_trysol instead.
Parameters
scipSCIP data structure
solpointer to primal CIP solution; is cleared in function call
printreasonShould all reasons of violations 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?
storedstores whether solution was feasible and good enough to keep

Definition at line 3231 of file scip_sol.c.

References checkSolOrig(), Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, NULL, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIPABORT, SCIPcheckStage(), SCIPerrorMessage, SCIPgetBestSol(), SCIPprimalAddSolFree(), SCIPprimalTrySolFree(), SCIPsolFree(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPsolRetransform(), SCIPsolUnlink(), SCIPstoreSolutionGap(), Scip::set, SCIP_Set::stage, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by applyOptcumulative(), createCGMIPprimalsols(), createNewSol(), createSwitchSolution(), executeHeuristic(), heurExec(), readSol(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIPcycAddIncompleteSol(), SCIPprobdataAddNewSol(), SCIPtryStrongbranchLPSol(), setupAndSolve(), setupAndSolveSubscip(), setupAndSolveSubscipOneopt(), setupAndSolveSubscipRapidlearning(), solveSubNLP(), storeSolution(), transferSolution(), tryOneOpt(), and trySolCandidate().

◆ SCIPtryCurrentSol()

SCIP_EXPORT SCIP_RETCODE SCIPtryCurrentSol ( SCIP scip,
SCIP_HEUR heur,
SCIP_Bool  printreason,
SCIP_Bool  completely,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool stored 
)

checks current LP/pseudo solution for feasibility; if possible, adds it to storage

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
heurheuristic that found the solution
printreasonShould all reasons of violations be printed?
completelyShould all violations be checked if printreason is true?
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 3336 of file scip_sol.c.

References checkSolOrig(), Scip::eventfilter, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::messagehdlr, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPABORT, SCIPcheckStage(), SCIPerrorMessage, SCIPgetBestSol(), SCIPprimalTryCurrentSol(), SCIPstoreSolutionGap(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.

Referenced by SCIP_DECL_HEUREXEC().

◆ SCIPgetPartialSols()

SCIP_EXPORT SCIP_SOL** SCIPgetPartialSols ( SCIP scip)

returns all partial solutions

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure

Definition at line 3391 of file scip_sol.c.

References FALSE, NULL, Scip::origprimal, SCIP_Primal::partialsols, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.

◆ SCIPgetNPartialSols()

int SCIPgetNPartialSols ( SCIP scip)

returns number of partial solutions

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure

Definition at line 3413 of file scip_sol.c.

References FALSE, SCIP_Primal::npartialsols, NULL, Scip::origprimal, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.

◆ SCIPcheckSol()

SCIP_EXPORT SCIP_RETCODE SCIPcheckSol ( SCIP scip,
SCIP_SOL sol,
SCIP_Bool  printreason,
SCIP_Bool  completely,
SCIP_Bool  checkbounds,
SCIP_Bool  checkintegrality,
SCIP_Bool  checklprows,
SCIP_Bool feasible 
)

checks solution for feasibility without adding it to the solution store

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal CIP solution
printreasonShould all reasons of violations 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?
feasiblestores whether given solution is feasible

Definition at line 3440 of file scip_sol.c.

References checkSolOrig(), FALSE, Scip::mem, Scip::messagehdlr, SCIP_Set::misc_exactsolve, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolCheck(), SCIPsolIsOriginal(), SCIPsolIsPartial(), Scip::set, Scip::stat, Scip::transprob, and TRUE.

Referenced by applyVbounds(), checkSystemGF2(), constructValidSolution(), SCIP_DECL_HEUREXEC(), SCIPprobdataAddNewSol(), SCIPtranslateSubSols(), solveAndEvalSubscip(), solveComponent(), solveSubNLP(), and transferSolution().

◆ SCIPcheckSolOrig()

SCIP_EXPORT SCIP_RETCODE SCIPcheckSolOrig ( SCIP scip,
SCIP_SOL sol,
SCIP_Bool feasible,
SCIP_Bool  printreason,
SCIP_Bool  completely 
)

checks solution for feasibility in original problem without adding it to the solution store; this method is used to double check a solution in order to validate the presolving process

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
solprimal CIP solution
feasiblestores whether given solution is feasible
printreasonshould the reason for the violation be printed?
completelyShould all violations be checked if printreason is true?

Definition at line 3497 of file scip_sol.c.

References checkSolOrig(), FALSE, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPsolIsPartial(), and TRUE.

Referenced by checkSolutionOrig(), displayRelevantStats(), infinityCountUpdate(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_PRICERREDCOST(), SCIPprobdataAddNewSol(), SCIPsolveCIP(), SCIPvalidateSolve(), solveAndEvalSubscip(), and solveComponent().

◆ SCIPupdateSolIntegralityViolation()

SCIP_EXPORT void SCIPupdateSolIntegralityViolation ( SCIP scip,
SCIP_SOL sol,
SCIP_Real  absviol 
)

update integrality violation of a solution

Parameters
scipSCIP data structure
solprimal CIP solution
absviolabsolute violation

Definition at line 230 of file scip_sol.c.

References Scip::origprimal, SCIPprimalUpdateViolations(), and SCIPsolUpdateIntegralityViolation().

Referenced by SCIP_DECL_CONSCHECK().

◆ SCIPupdateSolBoundViolation()

SCIP_EXPORT void SCIPupdateSolBoundViolation ( SCIP scip,
SCIP_SOL sol,
SCIP_Real  absviol,
SCIP_Real  relviol 
)

update bound violation of a solution

Parameters
scipSCIP data structure
solprimal CIP solution
absviolabsolute violation
relviolrelative violation

Definition at line 241 of file scip_sol.c.

References Scip::origprimal, SCIPprimalUpdateViolations(), and SCIPsolUpdateBoundViolation().

Referenced by checkSolOrig().

◆ SCIPupdateSolLPRowViolation()

SCIP_EXPORT void SCIPupdateSolLPRowViolation ( SCIP scip,
SCIP_SOL sol,
SCIP_Real  absviol,
SCIP_Real  relviol 
)

update LP row violation of a solution

Parameters
scipSCIP data structure
solprimal CIP solution
absviolabsolute violation
relviolrelative violation

Definition at line 253 of file scip_sol.c.

References Scip::origprimal, SCIPprimalUpdateViolations(), and SCIPsolUpdateLPRowViolation().

◆ SCIPupdateSolConsViolation()

SCIP_EXPORT void SCIPupdateSolConsViolation ( SCIP scip,
SCIP_SOL sol,
SCIP_Real  absviol,
SCIP_Real  relviol 
)

update constraint violation of a solution

Parameters
scipSCIP data structure
solprimal CIP solution
absviolabsolute violation
relviolrelative violation

Definition at line 265 of file scip_sol.c.

References Scip::origprimal, SCIPprimalUpdateViolations(), and SCIPsolUpdateConsViolation().

Referenced by checkAllConss(), checkCons(), checkCumulativeCondition(), checkOrigPbCons(), computeViolation(), isConsViolated(), and SCIP_DECL_CONSCHECK().

◆ SCIPupdateSolLPConsViolation()

SCIP_EXPORT void SCIPupdateSolLPConsViolation ( SCIP scip,
SCIP_SOL sol,
SCIP_Real  absviol,
SCIP_Real  relviol 
)

update LP row and constraint violations of a solution

Parameters
scipSCIP data structure
solprimal CIP solution
absviolabsolute violation
relviolrelative violation

Definition at line 277 of file scip_sol.c.

References Scip::origprimal, SCIPprimalUpdateViolations(), and SCIPsolUpdateLPConsViolation().

Referenced by checkCons(), and isConsViolated().

◆ SCIPactivateSolViolationUpdates()

SCIP_EXPORT void SCIPactivateSolViolationUpdates ( SCIP scip)

allow violation updates

Parameters
scipSCIP data structure

Definition at line 289 of file scip_sol.c.

References Scip::origprimal, SCIPprimalSetUpdateViolations(), and TRUE.

Referenced by checkCons().

◆ SCIPdeactivateSolViolationUpdates()

SCIP_EXPORT void SCIPdeactivateSolViolationUpdates ( SCIP scip)

disallow violation updates

Parameters
scipSCIP data structure

Definition at line 297 of file scip_sol.c.

References FALSE, Scip::origprimal, and SCIPprimalSetUpdateViolations().

Referenced by checkCons().

◆ SCIPhasPrimalRay()

SCIP_EXPORT SCIP_Bool SCIPhasPrimalRay ( SCIP scip)

return whether a primal ray is stored that proves unboundedness of the LP relaxation

Returns
return whether a primal ray is stored that proves unboundedness of the LP relaxation
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure

Definition at line 3535 of file scip_sol.c.

References FALSE, NULL, Scip::primal, SCIP_Primal::primalray, SCIP_CALL_ABORT, SCIPcheckStage(), and TRUE.

Referenced by generateCutUnboundedLP(), polyscip::Polyscip::numberofUnboundedResults(), and setupAndSolve().

◆ SCIPgetPrimalRayVal()

SCIP_EXPORT SCIP_Real SCIPgetPrimalRayVal ( SCIP scip,
SCIP_VAR var 
)

gets value of given variable in primal ray causing unboundedness of the LP relaxation; should only be called if such a ray is stored (check with SCIPhasPrimalRay())

Returns
value of given variable in primal ray causing unboundedness of the LP relaxation
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
varvariable to get value for

Definition at line 3553 of file scip_sol.c.

References FALSE, NULL, Scip::primal, SCIP_Primal::primalray, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPsolGetRayVal(), Scip::set, Scip::stat, and TRUE.

Referenced by generateCutUnboundedLP(), polyscip::Polyscip::numberofUnboundedResults(), and setupAndSolve().

◆ SCIPupdatePrimalRay()

SCIP_EXPORT SCIP_RETCODE SCIPupdatePrimalRay ( SCIP scip,
SCIP_SOL primalray 
)

updates the primal ray thats proves unboundedness

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:

See SCIP_STAGE for a complete list of all possible solving stages.

Parameters
scipSCIP data structure
primalraythe new primal ray

Definition at line 3580 of file scip_sol.c.

References FALSE, Scip::mem, NULL, Scip::primal, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPprimalUpdateRay(), Scip::set, Scip::stat, and TRUE.

Referenced by setupAndSolve().