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