Scippy

SCIP

Solving Constraint Integer Programs

sepa_intobj.c
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 (C) 2002-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file sepa_intobj.c
17  * @ingroup DEFPLUGINS_SEPA
18  * @brief integer objective value separator
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  */
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #include "scip/pub_event.h"
25 #include "scip/pub_lp.h"
26 #include "scip/pub_message.h"
27 #include "scip/pub_sepa.h"
28 #include "scip/pub_var.h"
29 #include "scip/scip_branch.h"
30 #include "scip/scip_cut.h"
31 #include "scip/scip_event.h"
32 #include "scip/scip_general.h"
33 #include "scip/scip_lp.h"
34 #include "scip/scip_message.h"
35 #include "scip/scip_mem.h"
36 #include "scip/scip_numerics.h"
37 #include "scip/scip_prob.h"
38 #include "scip/scip_sepa.h"
39 #include "scip/scip_sol.h"
40 #include "scip/scip_solvingstats.h"
41 #include "scip/scip_var.h"
42 #include "scip/sepa_intobj.h"
43 #include <string.h>
44 
45 
46 #define SEPA_NAME "intobj"
47 #define SEPA_DESC "integer objective value separator"
48 #define SEPA_PRIORITY -100
49 #define SEPA_FREQ -1
50 #define SEPA_MAXBOUNDDIST 0.0
51 #define SEPA_USESSUBSCIP FALSE /**< does the separator use a secondary SCIP instance? */
52 #define SEPA_DELAY FALSE /**< should separation method be delayed, if other separators found cuts? */
53 
54 #define EVENTHDLR_NAME "intobj"
55 #define EVENTHDLR_DESC "objective change event handler for integer objective value separator"
56 
57 
58 /*
59  * Data structures
60  */
61 
62 /** separator data */
63 struct SCIP_SepaData
64 {
65  SCIP_ROW* objrow; /**< objective value inequality */
66  SCIP_VAR* objvar; /**< objective value variable */
67  SCIP_Real setoff; /**< setoff of the inequality */
68 };
69 
70 
71 /*
72  * Local methods
73  */
74 
75 /** creates separator data */
76 static
78  SCIP* scip, /**< SCIP data structure */
79  SCIP_SEPADATA** sepadata /**< pointer to store separator data */
80  )
81 {
82  assert(sepadata != NULL);
83 
84  SCIP_CALL( SCIPallocBlockMemory(scip, sepadata) );
85  (*sepadata)->objrow = NULL;
86  (*sepadata)->objvar = NULL;
87  (*sepadata)->setoff = 0.0;
88 
89  return SCIP_OKAY;
90 }
91 
92 /** frees separator data */
93 static
95  SCIP* scip, /**< SCIP data structure */
96  SCIP_SEPADATA** sepadata /**< pointer to separator data */
97  )
98 {
99  assert(sepadata != NULL);
100  assert(*sepadata != NULL);
101  assert((*sepadata)->objrow == NULL);
102  assert((*sepadata)->objvar == NULL);
103 
104  SCIPfreeBlockMemory(scip, sepadata);
105 
106  return SCIP_OKAY;
107 }
108 
109 /** creates the objective value inequality and the objective value variable, if not yet existing */
110 static
112  SCIP* scip, /**< SCIP data structure */
113  SCIP_SEPA* sepa, /**< separator */
114  SCIP_SEPADATA* sepadata /**< separator data */
115  )
116 {
117  assert(sepadata != NULL);
118 
119  if( sepadata->objrow == NULL )
120  {
121  SCIP_VAR** vars;
122  SCIP_Real obj;
123  SCIP_Real intobjval;
124  int nvars;
125  int v;
126  SCIP_Bool attendobjvarbound;
127 
128  attendobjvarbound = FALSE;
129  /* create and add objective value variable */
130  if( sepadata->objvar == NULL )
131  {
132  SCIP_CALL( SCIPcreateVar(scip, &sepadata->objvar, "objvar", -SCIPinfinity(scip), SCIPinfinity(scip), 0.0,
134  SCIPvarMarkRelaxationOnly(sepadata->objvar);
135  SCIP_CALL( SCIPaddVar(scip, sepadata->objvar) );
136  SCIP_CALL( SCIPaddVarLocksType(scip, sepadata->objvar, SCIP_LOCKTYPE_MODEL, +1, +1) );
137  }
138  else
139  attendobjvarbound = TRUE;
140 
141  /* get problem variables */
142  vars = SCIPgetVars(scip);
143  nvars = SCIPgetNVars(scip);
144 
145  /* create objective value inequality */
146  if( attendobjvarbound )
147  intobjval = SCIPceil(scip, SCIPgetLowerbound(scip)) - SCIPvarGetLbGlobal(sepadata->objvar);
148  else
149  intobjval = SCIPceil(scip, SCIPgetLowerbound(scip));
150  SCIP_CALL( SCIPcreateEmptyRowSepa(scip, &sepadata->objrow, sepa, "objrow", intobjval, SCIPinfinity(scip),
151  FALSE, !SCIPallVarsInProb(scip), TRUE) );
152  sepadata->setoff = intobjval;
153 
154  SCIP_CALL( SCIPcacheRowExtensions(scip, sepadata->objrow) );
155  for( v = 0; v < nvars; ++v )
156  {
157  obj = SCIPvarGetObj(vars[v]);
158  if( !SCIPisZero(scip, obj) )
159  {
160  SCIP_CALL( SCIPaddVarToRow(scip, sepadata->objrow, vars[v], obj) );
161  }
162  }
163  SCIP_CALL( SCIPaddVarToRow(scip, sepadata->objrow, sepadata->objvar, -1.0) );
164  SCIP_CALL( SCIPflushRowExtensions(scip, sepadata->objrow) );
165 
166  SCIPdebugMsg(scip, "created objective value row: ");
167  SCIPdebug( SCIP_CALL( SCIPprintRow(scip, sepadata->objrow, NULL) ) );
168  }
169 
170  return SCIP_OKAY;
171 }
172 
173 /** searches and adds integral objective cuts that separate the given primal solution */
174 static
176  SCIP* scip, /**< SCIP data structure */
177  SCIP_SEPA* sepa, /**< the intobj separator */
178  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
179  SCIP_RESULT* result /**< pointer to store the result */
180  )
181 {
182  SCIP_SEPADATA* sepadata;
183  SCIP_Real objval;
184  SCIP_Real intbound;
185  SCIP_Bool infeasible;
186  SCIP_Bool tightened;
187 
188  assert(result != NULL);
189  assert(*result == SCIP_DIDNOTRUN);
190 
191  /* if the objective value may be fractional, we cannot do anything */
192  if( !SCIPisObjIntegral(scip) )
193  return SCIP_OKAY;
194 
195  *result = SCIP_DIDNOTFIND;
196 
197  /* if the current objective value is integral, there is no integral objective value cut */
198  if( sol == NULL )
199  objval = SCIPgetLPObjval(scip);
200  else
201  objval = SCIPgetSolTransObj(scip, sol);
202  if( SCIPisFeasIntegral(scip, objval) )
203  return SCIP_OKAY;
204 
205  sepadata = SCIPsepaGetData(sepa);
206  assert(sepadata != NULL);
207 
208  /* the objective value is fractional: create the objective value inequality, if not yet existing */
209  SCIP_CALL( createObjRow(scip, sepa, sepadata) );
210 
211  /* adjust the bounds of the objective value variable */
212  intbound = SCIPceil(scip, objval) - sepadata->setoff;
213  SCIP_CALL( SCIPtightenVarLb(scip, sepadata->objvar, intbound, FALSE, &infeasible, &tightened) );
214  SCIPdebugMsg(scip, "new objective variable lower bound: <%s>[%g,%g]\n",
215  SCIPvarGetName(sepadata->objvar), SCIPvarGetLbLocal(sepadata->objvar), SCIPvarGetUbLocal(sepadata->objvar));
216 
217  /* add the objective value inequality as a cut to the LP */
218  if( infeasible )
219  *result = SCIP_CUTOFF;
220  else
221  {
222  if( !SCIProwIsInLP(sepadata->objrow) )
223  {
224  SCIP_CALL( SCIPaddRow(scip, sepadata->objrow, FALSE, &infeasible) );
225  }
226  if ( infeasible )
227  *result = SCIP_CUTOFF;
228  else if ( tightened )
229  *result = SCIP_REDUCEDDOM;
230  else
231  *result = SCIP_SEPARATED;
232  }
233 
234  return SCIP_OKAY;
235 }
236 
237 
238 /*
239  * Callback methods of separator
240  */
241 
242 /** copy method for separator plugins (called when SCIP copies plugins) */
243 static
244 SCIP_DECL_SEPACOPY(sepaCopyIntobj)
245 { /*lint --e{715}*/
246  assert(scip != NULL);
247  assert(sepa != NULL);
248  assert(strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0);
249 
250  /* call inclusion method of constraint handler */
252 
253  return SCIP_OKAY;
254 }
255 
256 /** destructor of separator to free user data (called when SCIP is exiting) */
257 static
258 SCIP_DECL_SEPAFREE(sepaFreeIntobj)
259 { /*lint --e{715}*/
260  SCIP_SEPADATA* sepadata;
261 
262  /* free separator data */
263  sepadata = SCIPsepaGetData(sepa);
264  assert(sepadata != NULL);
265 
266  SCIP_CALL( sepadataFree(scip, &sepadata) );
267 
268  SCIPsepaSetData(sepa, NULL);
269 
270  return SCIP_OKAY;
271 }
272 
273 
274 /** deinitialization method of separator (called before transformed problem is freed) */
275 static
276 SCIP_DECL_SEPAEXIT(sepaExitIntobj)
277 { /*lint --e{715}*/
278  SCIP_SEPADATA* sepadata;
279 
280  sepadata = SCIPsepaGetData(sepa);
281  assert(sepadata != NULL);
282 
283  /* release objective variable */
284  if( sepadata->objvar != NULL )
285  {
286  /* remove locks in createObjRow() */
287  SCIP_CALL( SCIPaddVarLocksType(scip, sepadata->objvar, SCIP_LOCKTYPE_MODEL, -1, -1) );
288  SCIP_CALL( SCIPreleaseVar(scip, &sepadata->objvar) );
289  }
290 
291  return SCIP_OKAY;
292 }
293 
294 
295 /** solving process deinitialization method of separator (called before branch and bound process data is freed) */
296 static
297 SCIP_DECL_SEPAEXITSOL(sepaExitsolIntobj)
298 { /*lint --e{715}*/
299  SCIP_SEPADATA* sepadata;
300 
301  sepadata = SCIPsepaGetData(sepa);
302  assert(sepadata != NULL);
303 
304  /* release objective row */
305  if( sepadata->objrow != NULL )
306  {
307  SCIP_CALL( SCIPreleaseRow(scip, &sepadata->objrow) );
308  }
309 
310  return SCIP_OKAY;
311 }
312 
313 
314 /** LP solution separation method of separator */
315 static
316 SCIP_DECL_SEPAEXECLP(sepaExeclpIntobj)
317 { /*lint --e{715}*/
318  *result = SCIP_DIDNOTRUN;
319 
320  /* only call separator, if we are not close to terminating */
321  if( SCIPisStopped(scip) )
322  return SCIP_OKAY;
323 
324  /* only call separator, if an optimal LP solution is at hand */
326  return SCIP_OKAY;
327 
328  /* only call separator, if there are fractional variables */
329  if( SCIPgetNLPBranchCands(scip) == 0 )
330  return SCIP_OKAY;
331 
332  SCIP_CALL( separateCuts(scip, sepa, NULL, result) );
333 
334  return SCIP_OKAY;
335 }
336 
337 
338 /** arbitrary primal solution separation method of separator */
339 static
340 SCIP_DECL_SEPAEXECSOL(sepaExecsolIntobj)
341 { /*lint --e{715}*/
342  *result = SCIP_DIDNOTRUN;
343 
344  SCIP_CALL( separateCuts(scip, sepa, sol, result) );
345 
346  return SCIP_OKAY;
347 }
348 
349 
350 /*
351  * event handler for objective changes
352  */
353 
354 
355 /** initialization method of event handler (called after problem was transformed) */
356 static
357 SCIP_DECL_EVENTINIT(eventInitIntobj)
358 { /*lint --e{715}*/
360 
361  return SCIP_OKAY;
362 }
363 
364 /** deinitialization method of event handler (called before transformed problem is freed) */
365 static
366 SCIP_DECL_EVENTEXIT(eventExitIntobj)
367 { /*lint --e{715}*/
369 
370  return SCIP_OKAY;
371 }
372 
373 
374 /** execution method of objective change event handler */
375 static
376 SCIP_DECL_EVENTEXEC(eventExecIntobj)
377 { /*lint --e{715}*/
378  SCIP_EVENTHDLRDATA* eventhdlrdata;
379  SCIP_SEPADATA* sepadata;
380  SCIP_VAR* var;
381  SCIP_Real objdelta;
382 
383  eventhdlrdata = SCIPeventhdlrGetData(eventhdlr);
384  sepadata = (SCIP_SEPADATA*)eventhdlrdata;
385  assert(sepadata != NULL);
386 
387  /* we don't have anything to do, if the objective value inequality doesn't yet exist */
388  if( sepadata->objrow == NULL )
389  return SCIP_OKAY;
390 
391  var = SCIPeventGetVar(event);
392 
393  switch( SCIPeventGetType(event) )
394  {
396  SCIPdebugMsg(scip, "variable <%s> with obj=%g was added to the problem\n", SCIPvarGetName(var), SCIPvarGetObj(var));
397  objdelta = SCIPvarGetObj(var);
398  if( !SCIPisZero(scip, objdelta) )
399  {
400  SCIP_CALL( SCIPaddVarToRow(scip, sepadata->objrow, var, SCIPvarGetObj(var)) );
401  }
402  break;
403 
405  SCIPdebugMsg(scip, "variable <%s> changed objective value from %g to %g\n", SCIPvarGetName(var), SCIPeventGetOldobj(event), SCIPeventGetNewobj(event));
406  objdelta = SCIPeventGetNewobj(event) - SCIPeventGetOldobj(event);
407  SCIP_CALL( SCIPaddVarToRow(scip, sepadata->objrow, var, objdelta) );
408  break;
409 
410  default:
411  SCIPerrorMessage("invalid event type %x\n", SCIPeventGetType(event));
412  return SCIP_INVALIDDATA;
413  }
414 
415  return SCIP_OKAY;
416 }
417 
418 
419 /*
420  * separator specific interface methods
421  */
422 
423 /** creates the integer objective value separator and includes it in SCIP */
425  SCIP* scip /**< SCIP data structure */
426  )
427 {
428  SCIP_SEPADATA* sepadata;
429  SCIP_EVENTHDLRDATA* eventhdlrdata;
430  SCIP_SEPA* sepa;
431  SCIP_EVENTHDLR* eventhdlr;
432 
433  /* create intobj separator data */
434  SCIP_CALL( sepadataCreate(scip, &sepadata) );
435 
436  /* include separator */
439  sepaExeclpIntobj, sepaExecsolIntobj,
440  sepadata) );
441 
442  assert(sepa != NULL);
443 
444  /* set non-NULL pointers to callback methods */
445  SCIP_CALL( SCIPsetSepaCopy(scip, sepa, sepaCopyIntobj) );
446  SCIP_CALL( SCIPsetSepaFree(scip, sepa, sepaFreeIntobj) );
447  SCIP_CALL( SCIPsetSepaExit(scip, sepa, sepaExitIntobj) );
448  SCIP_CALL( SCIPsetSepaExitsol(scip, sepa, sepaExitsolIntobj) );
449 
450  /* include event handler for objective change events */
451  eventhdlr = NULL;
452  eventhdlrdata = (SCIP_EVENTHDLRDATA*)sepadata;
454  eventExecIntobj, eventhdlrdata) );
455  assert(eventhdlr != NULL);
456 
457  SCIP_CALL( SCIPsetEventhdlrInit(scip, eventhdlr, eventInitIntobj) );
458  SCIP_CALL( SCIPsetEventhdlrExit(scip, eventhdlr, eventExitIntobj) );
459 
460  return SCIP_OKAY;
461 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
static SCIP_RETCODE sepadataFree(SCIP *scip, SCIP_SEPADATA **sepadata)
Definition: sepa_intobj.c:94
SCIP_Bool SCIPisStopped(SCIP *scip)
Definition: scip_general.c:687
#define SCIP_EVENTTYPE_OBJCHANGED
Definition: type_event.h:65
#define EVENTHDLR_NAME
Definition: sepa_intobj.c:54
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5184
public methods for memory management
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
Definition: scip_var.c:4263
static SCIP_DECL_SEPAEXIT(sepaExitIntobj)
Definition: sepa_intobj.c:276
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
Definition: scip_lp.c:2152
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:146
int SCIPgetNLPBranchCands(SCIP *scip)
Definition: scip_branch.c:419
SCIP_Bool SCIPallVarsInProb(SCIP *scip)
Definition: scip_prob.c:2737
int SCIPgetNVars(SCIP *scip)
Definition: scip_prob.c:1986
#define FALSE
Definition: def.h:73
SCIP_EXPORT SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:17510
#define TRUE
Definition: def.h:72
#define SCIPdebug(x)
Definition: pub_message.h:84
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
static SCIP_DECL_EVENTINIT(eventInitIntobj)
Definition: sepa_intobj.c:357
public methods for problem variables
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: scip_sepa.c:142
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip_mem.h:95
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1604
#define SEPA_DESC
Definition: sepa_intobj.c:47
static SCIP_DECL_SEPACOPY(sepaCopyIntobj)
Definition: sepa_intobj.c:244
static SCIP_RETCODE separateCuts(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: sepa_intobj.c:175
#define SCIPallocBlockMemory(scip, ptr)
Definition: scip_mem.h:78
#define SEPA_FREQ
Definition: sepa_intobj.c:49
public methods for SCIP variables
static SCIP_DECL_SEPAFREE(sepaFreeIntobj)
Definition: sepa_intobj.c:258
#define SCIPdebugMsg
Definition: scip_message.h:69
public methods for separator plugins
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
Definition: scip_lp.c:159
public methods for numerical tolerances
public methods for querying solving statistics
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
Definition: lp.c:17372
static SCIP_DECL_SEPAEXECSOL(sepaExecsolIntobj)
Definition: sepa_intobj.c:340
#define SEPA_NAME
Definition: sepa_intobj.c:46
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:325
static SCIP_DECL_EVENTEXIT(eventExitIntobj)
Definition: sepa_intobj.c:366
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1581
#define SEPA_PRIORITY
Definition: sepa_intobj.c:48
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
Definition: scip_prob.c:1560
SCIP_EXPORT const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:17012
SCIP_RETCODE SCIPincludeSepaIntobj(SCIP *scip)
Definition: sepa_intobj.c:424
#define SCIPerrorMessage
Definition: pub_message.h:55
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
Definition: scip_lp.c:1508
public methods for event handler plugins and event handlers
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip_event.c:277
SCIP_VAR ** SCIPgetVars(SCIP *scip)
Definition: scip_prob.c:1941
static SCIP_RETCODE createObjRow(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa_intobj.c:111
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
#define NULL
Definition: lpi_spx1.cpp:155
#define SCIP_CALL(x)
Definition: def.h:364
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:1021
SCIP_RETCODE SCIPsetSepaExit(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAEXIT((*sepaexit)))
Definition: scip_sepa.c:190
SCIP_EXPORT SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
Definition: sepa.c:608
SCIP_EXPORT const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:697
SCIP_Real SCIPeventGetOldobj(SCIP_EVENT *event)
Definition: event.c:1175
SCIP_Real SCIPgetLPObjval(SCIP *scip)
Definition: scip_lp.c:238
static SCIP_DECL_SEPAEXECLP(sepaExeclpIntobj)
Definition: sepa_intobj.c:316
SCIP_Real SCIPinfinity(SCIP *scip)
#define SCIP_Bool
Definition: def.h:70
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
Definition: scip_sepa.c:100
#define SEPA_DELAY
Definition: sepa_intobj.c:52
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
Definition: scip_var.c:105
public methods for LP management
static SCIP_DECL_SEPAEXITSOL(sepaExitsolIntobj)
Definition: sepa_intobj.c:297
public methods for cuts and aggregation rows
#define SEPA_USESSUBSCIP
Definition: sepa_intobj.c:51
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_prob.c:1666
static SCIP_RETCODE sepadataCreate(SCIP *scip, SCIP_SEPADATA **sepadata)
Definition: sepa_intobj.c:77
integer objective value separator
SCIP_EXPORT SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17718
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
Definition: scip_event.c:95
public methods for the LP relaxation, rows and columns
SCIP_EXPORT SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17728
public methods for branching rule plugins and branching
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
Definition: scip_cut.c:221
public methods for managing events
general public methods
public methods for solutions
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
Definition: scip_event.c:155
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip_event.c:311
SCIP_EXPORT SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:17662
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
Definition: scip_lp.c:1641
public methods for message output
#define SEPA_MAXBOUNDDIST
Definition: sepa_intobj.c:50
SCIP_Real SCIPeventGetNewobj(SCIP_EVENT *event)
Definition: event.c:1192
SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
Definition: scip_sol.c:1483
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
Definition: scip_var.c:1252
#define SCIP_Real
Definition: def.h:163
public methods for message handling
SCIP_EXPORT void SCIPvarMarkRelaxationOnly(SCIP_VAR *var)
Definition: var.c:17314
SCIP_RETCODE SCIPsetSepaExitsol(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: scip_sepa.c:222
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
Definition: event.c:1044
SCIP_EXPORT void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa.c:618
public methods for separators
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: scip_sepa.c:158
static SCIP_DECL_EVENTEXEC(eventExecIntobj)
Definition: sepa_intobj.c:376
public methods for global and local (sub)problems
#define EVENTHDLR_DESC
Definition: sepa_intobj.c:55
#define SCIP_EVENTTYPE_VARADDED
Definition: type_event.h:61
struct SCIP_SepaData SCIP_SEPADATA
Definition: type_sepa.h:43
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1399
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
Definition: scip_event.c:169