Scippy

SCIP

Solving Constraint Integer Programs

sol.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright 2002-2022 Zuse Institute Berlin */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file sol.h
26  * @ingroup INTERNALAPI
27  * @brief internal methods for storing primal CIP solutions
28  * @author Tobias Achterberg
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_SOL_H__
34 #define __SCIP_SOL_H__
35 
36 
37 #include <stdio.h>
38 
39 #include "scip/def.h"
40 #include "blockmemshell/memory.h"
41 #include "scip/type_retcode.h"
42 #include "scip/type_set.h"
43 #include "scip/type_stat.h"
44 #include "scip/type_lp.h"
45 #include "scip/type_nlp.h"
46 #include "scip/type_var.h"
47 #include "scip/type_prob.h"
48 #include "scip/type_sol.h"
49 #include "scip/type_primal.h"
50 #include "scip/type_tree.h"
51 #include "scip/type_heur.h"
52 #include "scip/pub_sol.h"
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 /** creates primal CIP solution, initialized to zero */
60  SCIP_SOL** sol, /**< pointer to primal CIP solution */
61  BMS_BLKMEM* blkmem, /**< block memory */
62  SCIP_SET* set, /**< global SCIP settings */
63  SCIP_STAT* stat, /**< problem statistics data */
64  SCIP_PRIMAL* primal, /**< primal data */
65  SCIP_TREE* tree, /**< branch and bound tree, or NULL */
66  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
67  );
68 
69 /** creates primal CIP solution in original problem space, initialized to the offset in the original problem */
71  SCIP_SOL** sol, /**< pointer to primal CIP solution */
72  BMS_BLKMEM* blkmem, /**< block memory */
73  SCIP_SET* set, /**< global SCIP settings */
74  SCIP_STAT* stat, /**< problem statistics data */
75  SCIP_PROB* origprob, /**< original problem data */
76  SCIP_PRIMAL* primal, /**< primal data */
77  SCIP_TREE* tree, /**< branch and bound tree */
78  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
79  );
80 
81 /** creates a copy of a primal CIP solution */
83  SCIP_SOL** sol, /**< pointer to store the copy of the primal CIP solution */
84  BMS_BLKMEM* blkmem, /**< block memory */
85  SCIP_SET* set, /**< global SCIP settings */
86  SCIP_STAT* stat, /**< problem statistics data */
87  SCIP_PRIMAL* primal, /**< primal data */
88  SCIP_SOL* sourcesol /**< primal CIP solution to copy */
89  );
90 
91 /** transformes given original solution to the transformed space; a corresponding transformed solution has to be given
92  * which is copied into the existing solution and freed afterwards
93  */
95  SCIP_SOL* sol, /**< primal CIP solution to change, living in original space */
96  SCIP_SOL** transsol, /**< pointer to corresponding transformed primal CIP solution */
97  BMS_BLKMEM* blkmem, /**< block memory */
98  SCIP_SET* set, /**< global SCIP settings */
99  SCIP_PRIMAL* primal /**< primal data */
100  );
101 
102 /** adjusts solution values of implicit integer variables in handed solution. Solution objective value is not
103  * deteriorated by this method.
104  */
106  SCIP_SOL* sol, /**< primal CIP solution */
107  SCIP_SET* set, /**< global SCIP settings */
108  SCIP_STAT* stat, /**< problem statistics data */
109  SCIP_PROB* prob, /**< either original or transformed problem, depending on sol origin */
110  SCIP_TREE* tree, /**< branch and bound tree */
111  SCIP_Bool uselprows /**< should LP row information be considered for none-objective variables */
112  );
113 
114 /** creates primal CIP solution, initialized to the current LP solution */
116  SCIP_SOL** sol, /**< pointer to primal CIP solution */
117  BMS_BLKMEM* blkmem, /**< block memory */
118  SCIP_SET* set, /**< global SCIP settings */
119  SCIP_STAT* stat, /**< problem statistics data */
120  SCIP_PROB* prob, /**< transformed problem data */
121  SCIP_PRIMAL* primal, /**< primal data */
122  SCIP_TREE* tree, /**< branch and bound tree */
123  SCIP_LP* lp, /**< current LP data */
124  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
125  );
126 
127 /** creates primal CIP solution, initialized to the current NLP solution */
129  SCIP_SOL** sol, /**< pointer to primal CIP solution */
130  BMS_BLKMEM* blkmem, /**< block memory */
131  SCIP_SET* set, /**< global SCIP settings */
132  SCIP_STAT* stat, /**< problem statistics data */
133  SCIP_PRIMAL* primal, /**< primal data */
134  SCIP_TREE* tree, /**< branch and bound tree */
135  SCIP_NLP* nlp, /**< current NLP data */
136  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
137  );
138 
139 /** creates primal CIP solution, initialized to the current relaxation solution */
141  SCIP_SOL** sol, /**< pointer to primal CIP solution */
142  BMS_BLKMEM* blkmem, /**< block memory */
143  SCIP_SET* set, /**< global SCIP settings */
144  SCIP_STAT* stat, /**< problem statistics data */
145  SCIP_PRIMAL* primal, /**< primal data */
146  SCIP_TREE* tree, /**< branch and bound tree */
147  SCIP_RELAXATION* relaxation, /**< global relaxation data */
148  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
149  );
150 
151 /** creates primal CIP solution, initialized to the current pseudo solution */
153  SCIP_SOL** sol, /**< pointer to primal CIP solution */
154  BMS_BLKMEM* blkmem, /**< block memory */
155  SCIP_SET* set, /**< global SCIP settings */
156  SCIP_STAT* stat, /**< problem statistics data */
157  SCIP_PROB* prob, /**< transformed problem data */
158  SCIP_PRIMAL* primal, /**< primal data */
159  SCIP_TREE* tree, /**< branch and bound tree, or NULL */
160  SCIP_LP* lp, /**< current LP data */
161  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
162  );
163 
164 /** creates primal CIP solution, initialized to the current solution */
166  SCIP_SOL** sol, /**< pointer to primal CIP solution */
167  BMS_BLKMEM* blkmem, /**< block memory */
168  SCIP_SET* set, /**< global SCIP settings */
169  SCIP_STAT* stat, /**< problem statistics data */
170  SCIP_PROB* prob, /**< transformed problem data */
171  SCIP_PRIMAL* primal, /**< primal data */
172  SCIP_TREE* tree, /**< branch and bound tree */
173  SCIP_LP* lp, /**< current LP data */
174  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
175  );
176 
177 /** creates partial primal CIP solution, initialized to unknown values */
179  SCIP_SOL** sol, /**< pointer to primal CIP solution */
180  BMS_BLKMEM* blkmem, /**< block memory */
181  SCIP_SET* set, /**< global SCIP settings */
182  SCIP_STAT* stat, /**< problem statistics data */
183  SCIP_PRIMAL* primal, /**< primal data */
184  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
185  );
186 
187 /** creates primal CIP solution, initialized to unknown values */
189  SCIP_SOL** sol, /**< pointer to primal CIP solution */
190  BMS_BLKMEM* blkmem, /**< block memory */
191  SCIP_SET* set, /**< global SCIP settings */
192  SCIP_STAT* stat, /**< problem statistics data */
193  SCIP_PRIMAL* primal, /**< primal data */
194  SCIP_TREE* tree, /**< branch and bound tree */
195  SCIP_HEUR* heur /**< heuristic that found the solution (or NULL if it's from the tree) */
196  );
197 
198 /** frees primal CIP solution */
200  SCIP_SOL** sol, /**< pointer to primal CIP solution */
201  BMS_BLKMEM* blkmem, /**< block memory */
202  SCIP_PRIMAL* primal /**< primal data */
203  );
204 
205 /** copies current LP solution into CIP solution by linking */
207  SCIP_SOL* sol, /**< primal CIP solution */
208  SCIP_SET* set, /**< global SCIP settings */
209  SCIP_STAT* stat, /**< problem statistics data */
210  SCIP_PROB* prob, /**< transformed problem data */
211  SCIP_TREE* tree, /**< branch and bound tree */
212  SCIP_LP* lp /**< current LP data */
213  );
214 
215 /** copies current NLP solution into CIP solution by linking */
217  SCIP_SOL* sol, /**< primal CIP solution */
218  SCIP_STAT* stat, /**< problem statistics data */
219  SCIP_TREE* tree, /**< branch and bound tree */
220  SCIP_NLP* nlp /**< current NLP data */
221  );
222 
223 /** copies current relaxation solution into CIP solution by linking */
225  SCIP_SOL* sol, /**< primal CIP solution */
226  SCIP_SET* set, /**< global SCIP settings */
227  SCIP_STAT* stat, /**< problem statistics data */
228  SCIP_TREE* tree, /**< branch and bound tree */
229  SCIP_RELAXATION* relaxation /**< global relaxation data */
230  );
231 
232 /** copies current pseudo solution into CIP solution by linking */
234  SCIP_SOL* sol, /**< primal CIP solution */
235  SCIP_SET* set, /**< global SCIP settings */
236  SCIP_STAT* stat, /**< problem statistics data */
237  SCIP_PROB* prob, /**< transformed problem data */
238  SCIP_TREE* tree, /**< branch and bound tree, or NULL */
239  SCIP_LP* lp /**< current LP data */
240  );
241 
242 /** copies current solution (LP or pseudo solution) into CIP solution by linking */
244  SCIP_SOL* sol, /**< primal CIP solution */
245  SCIP_SET* set, /**< global SCIP settings */
246  SCIP_STAT* stat, /**< problem statistics data */
247  SCIP_PROB* prob, /**< transformed problem data */
248  SCIP_TREE* tree, /**< branch and bound tree */
249  SCIP_LP* lp /**< current LP data */
250  );
251 
252 /** clears primal CIP solution */
254  SCIP_SOL* sol, /**< primal CIP solution */
255  SCIP_STAT* stat, /**< problem statistics data */
256  SCIP_TREE* tree /**< branch and bound tree */
257  );
258 
259 /** declares all entries in the primal CIP solution to be unknown */
261  SCIP_SOL* sol, /**< primal CIP solution */
262  SCIP_STAT* stat, /**< problem statistics data */
263  SCIP_TREE* tree /**< branch and bound tree */
264  );
265 
266 /** stores solution values of variables in solution's own array */
268  SCIP_SOL* sol, /**< primal CIP solution */
269  SCIP_SET* set, /**< global SCIP settings */
270  SCIP_PROB* prob /**< transformed problem data */
271  );
272 
273 /** sets value of variable in primal CIP solution */
275  SCIP_SOL* sol, /**< primal CIP solution */
276  SCIP_SET* set, /**< global SCIP settings */
277  SCIP_STAT* stat, /**< problem statistics data */
278  SCIP_TREE* tree, /**< branch and bound tree */
279  SCIP_VAR* var, /**< variable to add to solution */
280  SCIP_Real val /**< solution value of variable */
281  );
282 
283 /** increases value of variable in primal CIP solution */
285  SCIP_SOL* sol, /**< primal CIP solution */
286  SCIP_SET* set, /**< global SCIP settings */
287  SCIP_STAT* stat, /**< problem statistics data */
288  SCIP_TREE* tree, /**< branch and bound tree */
289  SCIP_VAR* var, /**< variable to increase solution value for */
290  SCIP_Real incval /**< increment for solution value of variable */
291  );
292 
293 /** returns value of variable in primal CIP solution */
295  SCIP_SOL* sol, /**< primal CIP solution */
296  SCIP_SET* set, /**< global SCIP settings */
297  SCIP_STAT* stat, /**< problem statistics data */
298  SCIP_VAR* var /**< variable to get value for */
299  );
300 
301 /** returns value of variable in primal ray represented by primal CIP solution */
303  SCIP_SOL* sol, /**< primal CIP solution, representing a primal ray */
304  SCIP_SET* set, /**< global SCIP settings */
305  SCIP_STAT* stat, /**< problem statistics data */
306  SCIP_VAR* var /**< variable to get value for */
307  );
308 
309 
310 /** gets objective value of primal CIP solution in transformed problem */
312  SCIP_SOL* sol, /**< primal CIP solution */
313  SCIP_SET* set, /**< global SCIP settings */
314  SCIP_PROB* transprob, /**< tranformed problem data */
315  SCIP_PROB* origprob /**< original problem data */
316  );
317 
318 /** updates primal solutions after a change in a variable's objective value */
320  SCIP_SOL* sol, /**< primal CIP solution */
321  SCIP_VAR* var, /**< problem variable */
322  SCIP_Real oldobj, /**< old objective value */
323  SCIP_Real newobj /**< new objective value */
324  );
325 
326 /* mark the given solution as partial solution */
328  SCIP_SOL* sol, /**< primal CIP solution */
329  SCIP_SET* set, /**< global SCIP settings */
330  SCIP_STAT* stat, /**< problem statistics */
331  SCIP_VAR** vars, /**< problem variables */
332  int nvars /**< number of problem variables */
333  );
334 
335 /** checks primal CIP solution for feasibility
336  *
337  * @note The difference between SCIPsolCheck() and SCIPcheckSolOrig() is that modifiable constraints are handled
338  * differently. There might be some variables which do not have an original counter part (e.g. in
339  * branch-and-price). Therefore, modifiable constraints can not be double-checked in the original space.
340  */
342  SCIP_SOL* sol, /**< primal CIP solution */
343  SCIP_SET* set, /**< global SCIP settings */
344  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
345  BMS_BLKMEM* blkmem, /**< block memory */
346  SCIP_STAT* stat, /**< problem statistics */
347  SCIP_PROB* prob, /**< transformed problem data */
348  SCIP_Bool printreason, /**< Should all reasons of violations be printed? */
349  SCIP_Bool completely, /**< Should all violations be checked? */
350  SCIP_Bool checkbounds, /**< Should the bounds of the variables be checked? */
351  SCIP_Bool checkintegrality, /**< Has integrality to be checked? */
352  SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
353  SCIP_Bool* feasible /**< stores whether solution is feasible */
354  );
355 
356 /** try to round given solution */
358  SCIP_SOL* sol, /**< primal solution */
359  SCIP_SET* set, /**< global SCIP settings */
360  SCIP_STAT* stat, /**< problem statistics data */
361  SCIP_PROB* prob, /**< transformed problem data */
362  SCIP_TREE* tree, /**< branch and bound tree */
363  SCIP_Bool* success /**< pointer to store whether rounding was successful */
364  );
365 
366 /** updates the solution value sums in variables by adding the value in the given solution */
368  SCIP_SOL* sol, /**< primal CIP solution */
369  SCIP_SET* set, /**< global SCIP settings */
370  SCIP_STAT* stat, /**< problem statistics data */
371  SCIP_PROB* prob, /**< transformed problem data */
372  SCIP_Real weight /**< weight of solution in weighted average */
373  );
374 
375 /** retransforms solution to original problem space */
377  SCIP_SOL* sol, /**< primal CIP solution */
378  SCIP_SET* set, /**< global SCIP settings */
379  SCIP_STAT* stat, /**< problem statistics data */
380  SCIP_PROB* origprob, /**< original problem */
381  SCIP_PROB* transprob, /**< transformed problem */
382  SCIP_Bool* hasinfval /**< pointer to store whether the solution has infinite values */
383  );
384 
385 /** recomputes the objective value of an original solution, e.g., when transferring solutions
386  * from the solution pool (objective coefficients might have changed in the meantime)
387  */
389  SCIP_SOL* sol, /**< primal CIP solution */
390  SCIP_SET* set, /**< global SCIP settings */
391  SCIP_STAT* stat, /**< problem statistics data */
392  SCIP_PROB* origprob /**< original problem */
393  );
394 
395 
396 /** returns whether the given solutions in transformed space are equal */
398  SCIP_SOL* sol1, /**< first primal CIP solution */
399  SCIP_SOL* sol2, /**< second primal CIP solution */
400  SCIP_SET* set, /**< global SCIP settings */
401  SCIP_STAT* stat, /**< problem statistics data */
402  SCIP_PROB* origprob, /**< original problem */
403  SCIP_PROB* transprob /**< transformed problem after presolve */
404  );
405 
406 /** outputs non-zero elements of solution to file stream */
408  SCIP_SOL* sol, /**< primal CIP solution */
409  SCIP_SET* set, /**< global SCIP settings */
410  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
411  SCIP_STAT* stat, /**< problem statistics data */
412  SCIP_PROB* prob, /**< problem data (original or transformed) */
413  SCIP_PROB* transprob, /**< transformed problem data or NULL (to display priced variables) */
414  FILE* file, /**< output file (or NULL for standard output) */
415  SCIP_Bool mipstart, /**< should only discrete variables be printed? */
416  SCIP_Bool printzeros /**< should variables set to zero be printed? */
417  );
418 
419 /** outputs non-zero elements of solution representing a ray to file stream */
421  SCIP_SOL* sol, /**< primal CIP solution */
422  SCIP_SET* set, /**< global SCIP settings */
423  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
424  SCIP_STAT* stat, /**< problem statistics data */
425  SCIP_PROB* prob, /**< problem data (original or transformed) */
426  SCIP_PROB* transprob, /**< transformed problem data or NULL (to display priced variables) */
427  FILE* file, /**< output file (or NULL for standard output) */
428  SCIP_Bool printzeros /**< should variables set to zero be printed? */
429  );
430 
431 
432 /** reset violations of a solution */
434  SCIP_SOL* sol /**< primal CIP solution */
435  );
436 
437 /** update integrality violation of a solution */
439  SCIP_SOL* sol, /**< primal CIP solution */
440  SCIP_Real absviolintegrality /**< absolute violation of integrality */
441  );
442 
443 /** update bound violation of a solution */
445  SCIP_SOL* sol, /**< primal CIP solution */
446  SCIP_Real absviolbounds, /**< absolute violation of bounds */
447  SCIP_Real relviolbounds /**< relative violation of bounds */
448  );
449 
450 /** update LP row violation of a solution */
452  SCIP_SOL* sol, /**< primal CIP solution */
453  SCIP_Real absviollprows, /**< absolute violation of LP rows */
454  SCIP_Real relviollprows /**< relative violation of LP rows */
455  );
456 
457 /** update constraint violation of a solution */
459  SCIP_SOL* sol, /**< primal CIP solution */
460  SCIP_Real absviolcons, /**< absolute violation of constraint */
461  SCIP_Real relviolcons /**< relative violation of constraint */
462  );
463 
464 /** update violation of a constraint that is represented in the LP */
466  SCIP_SOL* sol, /**< primal CIP solution */
467  SCIP_Real absviol, /**< absolute violation of constraint */
468  SCIP_Real relviol /**< relative violation of constraint */
469  );
470 
471 
472 
473 /* In debug mode, the following methods are implemented as function calls to ensure
474  * type validity.
475  */
476 
477 /** adds value to the objective value of a given original primal CIP solution */
479  SCIP_SOL* sol, /**< primal CIP solution */
480  SCIP_Real addval /**< offset value to add */
481  );
482 
483 /** gets current position of solution in array of existing solutions of primal data */
485  SCIP_SOL* sol /**< primal CIP solution */
486  );
487 
488 /** sets current position of solution in array of existing solutions of primal data */
490  SCIP_SOL* sol, /**< primal CIP solution */
491  int primalindex /**< new primal index of solution */
492  );
493 
494 #ifdef NDEBUG
495 
496 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
497  * speed up the algorithms.
498  */
499 
500 #define SCIPsolOrigAddObjval(sol, addval) ((sol)->obj += (addval))
501 #define SCIPsolGetPrimalIndex(sol) ((sol)->primalindex)
502 #define SCIPsolSetPrimalIndex(sol,idx) { (sol)->primalindex = idx; }
503 
504 #endif
505 
506 #ifdef __cplusplus
507 }
508 #endif
509 
510 #endif
SCIP_RETCODE SCIPsolSetUnknown(SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree)
Definition: sol.c:1031
SCIP_RETCODE SCIPsolAdjustImplicitSolVals(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool uselprows)
Definition: sol.c:473
SCIP_RETCODE SCIPsolCopy(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_SOL *sourcesol)
Definition: sol.c:362
type definitions for NLP management
SCIP_RETCODE SCIPsolClear(SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree)
Definition: sol.c:1014
SCIP_RETCODE SCIPsolLinkRelaxSol(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_RELAXATION *relaxation)
Definition: sol.c:929
void SCIPsolUpdateConsViolation(SCIP_SOL *sol, SCIP_Real absviolcons, SCIP_Real relviolcons)
Definition: sol.c:2396
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_Real SCIPsolGetObj(SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
Definition: sol.c:1546
void SCIPsolUpdateVarsum(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Real weight)
Definition: sol.c:1840
type definitions for global SCIP settings
void SCIPsolUpdateLPConsViolation(SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
Definition: sol.c:2409
SCIP_RETCODE SCIPsolCreateCurrentSol(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur)
Definition: sol.c:703
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPsolRetransform(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_Bool *hasinfval)
Definition: sol.c:1868
SCIP_RETCODE SCIPsolMarkPartial(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **vars, int nvars)
Definition: sol.c:1582
SCIP_RETCODE SCIPsolSetVal(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real val)
Definition: sol.c:1077
type definitions for problem statistics
SCIP_RETCODE SCIPsolCreateRelaxSol(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_RELAXATION *relaxation, SCIP_HEUR *heur)
Definition: sol.c:652
SCIP_RETCODE SCIPsolCreateOriginal(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
Definition: sol.c:325
type definitions for LP management
void SCIPsolUpdateVarObj(SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real oldobj, SCIP_Real newobj)
Definition: sol.c:1563
void SCIPsolUpdateBoundViolation(SCIP_SOL *sol, SCIP_Real absviolbounds, SCIP_Real relviolbounds)
Definition: sol.c:2370
SCIP_RETCODE SCIPsolTransform(SCIP_SOL *sol, SCIP_SOL **transsol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal)
Definition: sol.c:426
SCIP_RETCODE SCIPsolUnlink(SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *prob)
Definition: sol.c:1048
SCIP_RETCODE SCIPsolRound(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool *success)
Definition: sol.c:1768
SCIP_RETCODE SCIPsolLinkCurrentSol(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
Definition: sol.c:988
SCIP_RETCODE SCIPsolFree(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_PRIMAL *primal)
Definition: sol.c:801
void SCIPsolUpdateIntegralityViolation(SCIP_SOL *sol, SCIP_Real absviolintegrality)
Definition: sol.c:2359
void SCIPsolUpdateLPRowViolation(SCIP_SOL *sol, SCIP_Real absviollprows, SCIP_Real relviollprows)
Definition: sol.c:2383
type definitions for primal heuristics
SCIP_RETCODE SCIPsolPrint(SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PROB *transprob, FILE *file, SCIP_Bool mipstart, SCIP_Bool printzeros)
Definition: sol.c:2095
public methods for primal CIP solutions
SCIP_RETCODE SCIPsolPrintRay(SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PROB *transprob, FILE *file, SCIP_Bool printzeros)
Definition: sol.c:2231
type definitions for problem variables
SCIP_RETCODE SCIPsolCreatePseudoSol(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur)
Definition: sol.c:678
SCIP_RETCODE SCIPsolCreateUnknown(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
Definition: sol.c:766
int SCIPsolGetPrimalIndex(SCIP_SOL *sol)
Definition: sol.c:2623
#define SCIP_Bool
Definition: def.h:93
SCIP_Real SCIPsolGetRayVal(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var)
Definition: sol.c:1477
SCIP_RETCODE SCIPsolCheck(SCIP_SOL *sol, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)
Definition: sol.c:1647
type definitions for branch and bound tree
SCIP_RETCODE SCIPsolLinkLPSol(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
Definition: sol.c:820
type definitions for storing primal CIP solutions
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPsolCreatePartial(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_HEUR *heur)
Definition: sol.c:730
SCIP_RETCODE SCIPsolLinkPseudoSol(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_LP *lp)
Definition: sol.c:959
void SCIPsolRecomputeObj(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob)
Definition: sol.c:1995
SCIP_RETCODE SCIPsolIncVal(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real incval)
Definition: sol.c:1271
void SCIPsolResetViolations(SCIP_SOL *sol)
Definition: sol.c:2343
#define SCIP_Real
Definition: def.h:186
SCIP_Real SCIPsolGetVal(SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var)
Definition: sol.c:1347
SCIP_RETCODE SCIPsolCreate(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
Definition: sol.c:288
type definitions for collecting primal CIP solutions and primal informations
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPsolCreateLPSol(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_HEUR *heur)
Definition: sol.c:608
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:439
SCIP_Bool SCIPsolsAreEqual(SCIP_SOL *sol1, SCIP_SOL *sol2, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob)
Definition: sol.c:2030
void SCIPsolOrigAddObjval(SCIP_SOL *sol, SCIP_Real addval)
Definition: sol.c:2561
SCIP_RETCODE SCIPsolLinkNLPSol(SCIP_SOL *sol, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_NLP *nlp)
Definition: sol.c:878
SCIP_RETCODE SCIPsolCreateNLPSol(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_NLP *nlp, SCIP_HEUR *heur)
Definition: sol.c:631
void SCIPsolSetPrimalIndex(SCIP_SOL *sol, int primalindex)
Definition: sol.c:2633
memory allocation routines