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-2022 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 /** solving process deinitialization method of separator (called before branch and bound process data is freed) */
275 static
276 SCIP_DECL_SEPAEXITSOL(sepaExitsolIntobj)
277 { /*lint --e{715}*/
278  SCIP_SEPADATA* sepadata;
279 
280  sepadata = SCIPsepaGetData(sepa);
281  assert(sepadata != NULL);
282 
283  /* release objective row */
284  if( sepadata->objrow != NULL )
285  {
286  SCIP_CALL( SCIPreleaseRow(scip, &sepadata->objrow) );
287  }
288 
289  /* release objective variable */
290  if( sepadata->objvar != NULL )
291  {
292  /* remove locks in createObjRow() */
293  SCIP_CALL( SCIPaddVarLocksType(scip, sepadata->objvar, SCIP_LOCKTYPE_MODEL, -1, -1) );
294  SCIP_CALL( SCIPreleaseVar(scip, &sepadata->objvar) );
295  }
296 
297  return SCIP_OKAY;
298 }
299 
300 
301 /** LP solution separation method of separator */
302 static
303 SCIP_DECL_SEPAEXECLP(sepaExeclpIntobj)
304 { /*lint --e{715}*/
305  *result = SCIP_DIDNOTRUN;
306 
307  /* only call separator, if we are not close to terminating */
308  if( SCIPisStopped(scip) )
309  return SCIP_OKAY;
310 
311  /* only call separator, if an optimal LP solution is at hand */
313  return SCIP_OKAY;
314 
315  /* only call separator, if there are fractional variables */
316  if( SCIPgetNLPBranchCands(scip) == 0 )
317  return SCIP_OKAY;
318 
319  SCIP_CALL( separateCuts(scip, sepa, NULL, result) );
320 
321  return SCIP_OKAY;
322 }
323 
324 
325 /** arbitrary primal solution separation method of separator */
326 static
327 SCIP_DECL_SEPAEXECSOL(sepaExecsolIntobj)
328 { /*lint --e{715}*/
329  *result = SCIP_DIDNOTRUN;
330 
331  SCIP_CALL( separateCuts(scip, sepa, sol, result) );
332 
333  return SCIP_OKAY;
334 }
335 
336 
337 /*
338  * event handler for objective changes
339  */
340 
341 
342 /** initialization method of event handler (called after problem was transformed) */
343 static
344 SCIP_DECL_EVENTINIT(eventInitIntobj)
345 { /*lint --e{715}*/
347 
348  return SCIP_OKAY;
349 }
350 
351 /** deinitialization method of event handler (called before transformed problem is freed) */
352 static
353 SCIP_DECL_EVENTEXIT(eventExitIntobj)
354 { /*lint --e{715}*/
356 
357  return SCIP_OKAY;
358 }
359 
360 
361 /** execution method of objective change event handler */
362 static
363 SCIP_DECL_EVENTEXEC(eventExecIntobj)
364 { /*lint --e{715}*/
365  SCIP_EVENTHDLRDATA* eventhdlrdata;
366  SCIP_SEPADATA* sepadata;
367  SCIP_VAR* var;
368  SCIP_Real objdelta;
369 
370  eventhdlrdata = SCIPeventhdlrGetData(eventhdlr);
371  sepadata = (SCIP_SEPADATA*)eventhdlrdata;
372  assert(sepadata != NULL);
373 
374  /* we don't have anything to do, if the objective value inequality doesn't yet exist */
375  if( sepadata->objrow == NULL )
376  return SCIP_OKAY;
377 
378  var = SCIPeventGetVar(event);
379 
380  switch( SCIPeventGetType(event) )
381  {
383  SCIPdebugMsg(scip, "variable <%s> with obj=%g was added to the problem\n", SCIPvarGetName(var), SCIPvarGetObj(var));
384  objdelta = SCIPvarGetObj(var);
385  if( !SCIPisZero(scip, objdelta) )
386  {
387  SCIP_CALL( SCIPaddVarToRow(scip, sepadata->objrow, var, SCIPvarGetObj(var)) );
388  }
389  break;
390 
392  SCIPdebugMsg(scip, "variable <%s> changed objective value from %g to %g\n", SCIPvarGetName(var), SCIPeventGetOldobj(event), SCIPeventGetNewobj(event));
393  objdelta = SCIPeventGetNewobj(event) - SCIPeventGetOldobj(event);
394  SCIP_CALL( SCIPaddVarToRow(scip, sepadata->objrow, var, objdelta) );
395  break;
396 
397  default:
398  SCIPerrorMessage("invalid event type %" SCIP_EVENTTYPE_FORMAT "\n", SCIPeventGetType(event));
399  return SCIP_INVALIDDATA;
400  }
401 
402  return SCIP_OKAY;
403 }
404 
405 
406 /*
407  * separator specific interface methods
408  */
409 
410 /** creates the integer objective value separator and includes it in SCIP */
412  SCIP* scip /**< SCIP data structure */
413  )
414 {
415  SCIP_SEPADATA* sepadata;
416  SCIP_EVENTHDLRDATA* eventhdlrdata;
417  SCIP_SEPA* sepa;
418  SCIP_EVENTHDLR* eventhdlr;
419 
420  /* create intobj separator data */
421  SCIP_CALL( sepadataCreate(scip, &sepadata) );
422 
423  /* include separator */
426  sepaExeclpIntobj, sepaExecsolIntobj,
427  sepadata) );
428 
429  assert(sepa != NULL);
430 
431  /* set non-NULL pointers to callback methods */
432  SCIP_CALL( SCIPsetSepaCopy(scip, sepa, sepaCopyIntobj) );
433  SCIP_CALL( SCIPsetSepaFree(scip, sepa, sepaFreeIntobj) );
434  SCIP_CALL( SCIPsetSepaExitsol(scip, sepa, sepaExitsolIntobj) );
435 
436  /* include event handler for objective change events */
437  eventhdlr = NULL;
438  eventhdlrdata = (SCIP_EVENTHDLRDATA*)sepadata;
440  eventExecIntobj, eventhdlrdata) );
441  assert(eventhdlr != NULL);
442 
443  SCIP_CALL( SCIPsetEventhdlrInit(scip, eventhdlr, eventInitIntobj) );
444  SCIP_CALL( SCIPsetEventhdlrExit(scip, eventhdlr, eventExitIntobj) );
445 
446  return SCIP_OKAY;
447 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
static SCIP_RETCODE sepadataFree(SCIP *scip, SCIP_SEPADATA **sepadata)
Definition: sepa_intobj.c:94
#define SCIP_EVENTTYPE_OBJCHANGED
Definition: type_event.h:65
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5200
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1626
#define EVENTHDLR_NAME
Definition: sepa_intobj.c:54
public methods for memory management
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1649
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:17910
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
Definition: scip_event.c:169
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
Definition: scip_lp.c:1686
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17966
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
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
Definition: scip_var.c:1245
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
Definition: type_event.h:146
#define FALSE
Definition: def.h:87
SCIP_Real SCIPinfinity(SCIP *scip)
#define TRUE
Definition: def.h:86
#define SCIPdebug(x)
Definition: pub_message.h:84
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:720
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
static SCIP_DECL_EVENTINIT(eventInitIntobj)
Definition: sepa_intobj.c:344
public methods for problem variables
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip_mem.h:99
SCIP_Bool SCIPallVarsInProb(SCIP *scip)
Definition: scip_prob.c:2741
#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
int SCIPgetNLPBranchCands(SCIP *scip)
Definition: scip_branch.c:419
#define SEPA_FREQ
Definition: sepa_intobj.c:49
public methods for SCIP variables
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: scip_sepa.c:142
static SCIP_DECL_SEPAFREE(sepaFreeIntobj)
Definition: sepa_intobj.c:258
#define SCIPdebugMsg
Definition: scip_message.h:69
public methods for separator plugins
SCIP_RETCODE SCIPincludeSepaIntobj(SCIP *scip)
Definition: sepa_intobj.c:411
public methods for numerical tolerances
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
Definition: sepa.c:610
public methods for querying solving statistics
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
Definition: lp.c:17456
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
Definition: scip_var.c:4256
static SCIP_DECL_SEPAEXECSOL(sepaExecsolIntobj)
Definition: sepa_intobj.c:327
#define SEPA_NAME
Definition: sepa_intobj.c:46
static SCIP_DECL_EVENTEXIT(eventExitIntobj)
Definition: sepa_intobj.c:353
#define SEPA_PRIORITY
Definition: sepa_intobj.c:48
SCIP_Real SCIPeventGetOldobj(SCIP_EVENT *event)
Definition: event.c:1175
#define SCIPerrorMessage
Definition: pub_message.h:55
public methods for event handler plugins and event handlers
static SCIP_RETCODE createObjRow(SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa_intobj.c:111
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
Definition: scip_event.c:155
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:17251
SCIP_Real SCIPeventGetNewobj(SCIP_EVENT *event)
Definition: event.c:1192
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa.c:620
#define NULL
Definition: lpi_spx1.cpp:155
SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
Definition: scip_sol.c:1482
#define SCIP_CALL(x)
Definition: def.h:384
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
Definition: scip_cut.c:241
static SCIP_DECL_SEPAEXECLP(sepaExeclpIntobj)
Definition: sepa_intobj.c:303
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
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
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: scip_event.c:277
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
Definition: scip_lp.c:159
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
Definition: event.c:1021
void SCIPvarMarkRelaxationOnly(SCIP_VAR *var)
Definition: var.c:17556
#define SEPA_DELAY
Definition: sepa_intobj.c:52
public methods for LP management
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:1444
static SCIP_DECL_SEPAEXITSOL(sepaExitsolIntobj)
Definition: sepa_intobj.c:276
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: scip_event.c:311
public methods for cuts and aggregation rows
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:17758
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
#define SEPA_USESSUBSCIP
Definition: sepa_intobj.c:51
static SCIP_RETCODE sepadataCreate(SCIP *scip, SCIP_SEPADATA **sepadata)
Definition: sepa_intobj.c:77
integer objective value separator
public methods for the LP relaxation, rows and columns
int SCIPgetNVars(SCIP *scip)
Definition: scip_prob.c:1990
public methods for branching rule plugins and branching
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
Definition: scip_lp.c:1553
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
Definition: scip_prob.c:1560
public methods for managing events
general public methods
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: scip_sepa.c:158
SCIP_Real SCIPgetLPObjval(SCIP *scip)
Definition: scip_lp.c:238
public methods for solutions
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_prob.c:1666
#define SCIP_EVENTTYPE_FORMAT
Definition: type_event.h:143
public methods for message output
#define SEPA_MAXBOUNDDIST
Definition: sepa_intobj.c:50
SCIP_VAR ** SCIPgetVars(SCIP *scip)
Definition: scip_prob.c:1945
#define SCIP_Real
Definition: def.h:177
SCIP_Bool SCIPisStopped(SCIP *scip)
Definition: scip_general.c:694
public methods for message handling
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
Definition: scip_lp.c:2197
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17976
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
public methods for separators
SCIPallocBlockMemory(scip, subsol))
static SCIP_DECL_EVENTEXEC(eventExecIntobj)
Definition: sepa_intobj.c:363
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
Definition: event.c:325
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