## Detailed Description

primal CIP solution

For reasons of efficiency, a working solution only stores values that have been accessed at least once, or that have been changed from the value in the solution's source. The user has to call SCIPsolUnlink() in order to retrieve all non-cached elements from the solution's source and to store the values in the solution's own array. This changes the solution's origin to SCIP_SOLORIGIN_ZERO. A linked solution with origin SCIP_SOLORIGIN_LPSOL or SCIP_SOLORIGIN_PSEUDOSOL becomes invalid after the next node is focused (i.e. the LP and pseudo solutions changed) and cannot be accessed anymore.

Solutions with origin ORIGINAL contain the values for original variables. The stored objective value also corresponds to the original problem.

Definition at line 73 of file struct_sol.h.

`#include <struct_sol.h>`

## Data Fields | |

SCIP_Real | obj |

SCIP_Real | time |

SCIP_Longint | nodenum |

SCIP_REALARRAY * | vals |

SCIP_BOOLARRAY * | valid |

union { | |

SCIP_HEUR * heur | |

SCIP_RELAX * relax | |

} | creator |

SCIP_VIOL | viol |

int | runnum |

int | depth |

int | primalindex |

int | index |

SCIP_SOLORIGIN | solorigin |

SCIP_Bool | hasinfval |

SCIP_SOLTYPE | type |

SCIP_Longint | lpcount |

## Field Documentation

## ◆ obj

SCIP_Real SCIP_Sol::obj |

objective value of solution

Definition at line 75 of file struct_sol.h.

Referenced by SCIPsolCheck(), SCIPsolClear(), SCIPsolCopy(), SCIPsolGetObj(), SCIPsolGetOrigObj(), SCIPsolLinkLPSol(), SCIPsolLinkNLPSol(), SCIPsolLinkPseudoSol(), SCIPsolLinkRelaxSol(), SCIPsolOrigAddObjval(), SCIPsolRecomputeObj(), SCIPsolRetransform(), SCIPsolsAreEqual(), SCIPsolSetUnknown(), SCIPsolTransform(), and SCIPsolUpdateVarObj().

## ◆ time

SCIP_Real SCIP_Sol::time |

clock time, when the solution was discovered

Definition at line 76 of file struct_sol.h.

Referenced by SCIPcopySolStats(), SCIPsolCopy(), SCIPsolGetTime(), and solStamp().

## ◆ nodenum

SCIP_Longint SCIP_Sol::nodenum |

last node number of current run, where this solution was modified

Definition at line 77 of file struct_sol.h.

Referenced by SCIPcopySolStats(), SCIPsolCheck(), SCIPsolCopy(), SCIPsolGetNodenum(), SCIPsolGetVal(), SCIPsolIncVal(), SCIPsolSetVal(), and solStamp().

## ◆ vals

SCIP_REALARRAY* SCIP_Sol::vals |

solution values for variables

Definition at line 78 of file struct_sol.h.

Referenced by SCIPsolCopy(), SCIPsolMarkPartial(), SCIPsolTransform(), solGetArrayVal(), solIncArrayVal(), and solSetArrayVal().

## ◆ valid

SCIP_BOOLARRAY* SCIP_Sol::valid |

is value in vals array valid? otherwise it has to be retrieved from origin

Definition at line 79 of file struct_sol.h.

Referenced by SCIPsolCopy(), SCIPsolGetVal(), SCIPsolMarkPartial(), SCIPsolRound(), SCIPsolTransform(), solClearArrays(), solGetArrayVal(), solIncArrayVal(), solSetArrayVal(), and solUnlinkVar().

## ◆ heur

SCIP_HEUR* SCIP_Sol::heur |

heuristic that found the solution, if solution is of heuristic type

Definition at line 83 of file struct_sol.h.

Referenced by SCIPsolGetHeur(), and SCIPsolSetHeur().

## ◆ relax

SCIP_RELAX* SCIP_Sol::relax |

relaxation handler that found the solution, if solution has relax type

Definition at line 84 of file struct_sol.h.

Referenced by SCIPsolGetRelax(), and SCIPsolSetRelax().

## ◆ creator

union { ... } SCIP_Sol::creator |

Referenced by SCIPsolGetHeur(), SCIPsolGetRelax(), SCIPsolSetHeur(), and SCIPsolSetRelax().

## ◆ viol

SCIP_VIOL SCIP_Sol::viol |

maximum violations of problem constraints

Definition at line 86 of file struct_sol.h.

Referenced by SCIPsolCopy(), SCIPsolGetAbsBoundViolation(), SCIPsolGetAbsConsViolation(), SCIPsolGetAbsIntegralityViolation(), SCIPsolGetAbsLPRowViolation(), SCIPsolGetRelBoundViolation(), SCIPsolGetRelConsViolation(), SCIPsolGetRelLPRowViolation(), SCIPsolResetViolations(), SCIPsolUpdateBoundViolation(), SCIPsolUpdateConsViolation(), SCIPsolUpdateIntegralityViolation(), and SCIPsolUpdateLPRowViolation().

## ◆ runnum

int SCIP_Sol::runnum |

branch and bound run number in which the solution was found

Definition at line 87 of file struct_sol.h.

Referenced by SCIPcopySolStats(), SCIPsolCopy(), SCIPsolGetRunnum(), SCIPsolGetVal(), SCIPsolIncVal(), SCIPsolSetVal(), and solStamp().

## ◆ depth

int SCIP_Sol::depth |

depth at which the solution was found

Definition at line 88 of file struct_sol.h.

Referenced by SCIPcopySolStats(), SCIPsolCopy(), SCIPsolGetDepth(), and solStamp().

## ◆ primalindex

int SCIP_Sol::primalindex |

index of solution in array of existing solutions of primal data

Definition at line 89 of file struct_sol.h.

Referenced by SCIPsolGetPrimalIndex(), SCIPsolSetPrimalIndex(), and SCIPsolTransform().

## ◆ index

int SCIP_Sol::index |

consecutively numbered unique index of all created solutions

Definition at line 90 of file struct_sol.h.

Referenced by SCIPsolGetIndex().

## ◆ solorigin

SCIP_SOLORIGIN SCIP_Sol::solorigin |

origin of solution: where to retrieve uncached elements

Definition at line 91 of file struct_sol.h.

Referenced by SCIPsolCheck(), SCIPsolClear(), SCIPsolCopy(), SCIPsolGetOrigin(), SCIPsolGetRayVal(), SCIPsolGetVal(), SCIPsolIncVal(), SCIPsolIsOriginal(), SCIPsolIsPartial(), SCIPsolLinkLPSol(), SCIPsolLinkNLPSol(), SCIPsolLinkPseudoSol(), SCIPsolLinkRelaxSol(), SCIPsolMarkPartial(), SCIPsolOrigAddObjval(), SCIPsolPrint(), SCIPsolRetransform(), SCIPsolRound(), SCIPsolSetUnknown(), SCIPsolSetVal(), SCIPsolTransform(), SCIPsolUnlink(), solGetArrayVal(), and solUnlinkVar().

## ◆ hasinfval

SCIP_Bool SCIP_Sol::hasinfval |

does the solution (potentially) contain an infinite value? Note: this could also be implemented as a counter for the number of infinite values, to avoid redundant checks when resetting inf. solution values

Definition at line 92 of file struct_sol.h.

Referenced by SCIPsolCheck(), SCIPsolCopy(), solClearArrays(), solIncArrayVal(), and solSetArrayVal().

## ◆ type

SCIP_SOLTYPE SCIP_Sol::type |

type of solution: heuristic or (LP) relaxation solution, or unspecified origin

Definition at line 96 of file struct_sol.h.

Referenced by SCIPsolCopy(), SCIPsolGetHeur(), SCIPsolGetRelax(), SCIPsolGetType(), SCIPsolSetHeur(), SCIPsolSetLPRelaxation(), SCIPsolSetPseudo(), SCIPsolSetRelax(), and SCIPsolSetStrongbranching().

## ◆ lpcount

SCIP_Longint SCIP_Sol::lpcount |

number of LPs solved when this solution was created, needed for debug checks concerning solutions linked to the LP solution

Definition at line 98 of file struct_sol.h.

Referenced by SCIPsolCopy(), SCIPsolGetVal(), SCIPsolRound(), and solStamp().