Scippy

SCIP

Solving Constraint Integer Programs

prop_nlobbt.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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file prop_nlobbt.c
17  * @brief nlobbt propagator
18  * @author Benjamin Mueller
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #include <assert.h>
24 
25 #include "scip/prop_nlobbt.h"
26 #include "scip/prop_genvbounds.h"
27 #include "nlpi/nlpi.h"
28 
29 #define PROP_NAME "nlobbt"
30 #define PROP_DESC "propagator template"
31 #define PROP_PRIORITY -1100000
32 #define PROP_FREQ -1
33 #define PROP_DELAY TRUE
34 #define PROP_TIMING SCIP_PROPTIMING_AFTERLPLOOP
35 
36 #define DEFAULT_MINNONCONVEXFRAC 0.20 /**< default minimum (# convex nlrows)/(# nonconvex nlrows) threshold to apply propagator */
37 #define DEFAULT_MINLINEARFRAC 0.02 /**< default minimum (# convex nlrows)/(# linear nlrows) threshold to apply propagator */
38 #define DEFAULT_FEASTOLFAC 0.01 /**< default factor for NLP feasibility tolerance */
39 #define DEFAULT_RELOBJTOLFAC 0.01 /**< default factor for NLP relative objective tolerance */
40 #define DEFAULT_ADDLPROWS TRUE /**< should (non-initial) LP rows be used? */
41 #define DEFAULT_ITLIMITFACTOR 2.0 /**< multiple of root node LP iterations used as total LP iteration
42  * limit for nlobbt (<= 0: no limit ) */
43 #define DEFAULT_NLPITERLIMIT 500 /**< default iteration limit of NLP solver; 0 for no limit */
44 #define DEFAULT_NLPTIMELIMIT 0.0 /**< default time limit of NLP solver; 0.0 for no limit */
45 #define DEFAULT_NLPVERLEVEL 0 /**< verbosity level of NLP solver */
46 #define DEFAULT_RANDSEED 79 /**< initial random seed */
47 
48 /*
49  * Data structures
50  */
51 
52 /** status of bound candidates */
53 enum BoundStatus
54 {
55  UNSOLVED = 1, /**< did not solve LB or UB problem */
56  SOLVEDLB = 2, /**< solved LB problem */
57  SOLVEDUB = 4 /**< solved UB problem */
58 };
59 
60 /** propagator data */
61 struct SCIP_PropData
62 {
63  SCIP_NLPI* nlpi; /**< nlpi used to create the nlpi problem */
64  SCIP_NLPIPROBLEM* nlpiprob; /**< nlpi problem representing the convex NLP relaxation */
65  SCIP_HASHMAP* var2nlpiidx; /**< mapping between variables and nlpi indices */
66  SCIP_VAR** nlpivars; /**< array containing all variables of the nlpi */
67  int nlpinvars; /**< total number of nlpi variables */
68  SCIP_Real* nlscore; /**< score for each nonlinear variable */
69  int* status; /**< array containing a bound status for each candidate (type int* is
70  * necessary to use sort functions) */
71  SCIP_PROP* genvboundprop; /**< genvbound propagator */
72  SCIP_RANDNUMGEN* randnumgen; /**< random number generator */
73  SCIP_Bool skipprop; /**< should the propagator be skipped? */
74  SCIP_Longint lastnode; /**< number of last node where obbt was performed */
75  int currpos; /**< current position in the nlpivars array */
76 
77  int nlpiterlimit; /**< iteration limit of NLP solver; 0 for no limit */
78  SCIP_Real nlptimelimit; /**< time limit of NLP solver; 0.0 for no limit */
79  int nlpverblevel; /**< verbosity level of NLP solver */
80  SCIP_NLPSTATISTICS* nlpstatistics; /**< statistics from NLP solver */
81 
82  SCIP_Real feastolfac; /**< factor for NLP feasibility tolerance */
83  SCIP_Real relobjtolfac; /**< factor for NLP relative objective tolerance */
84  SCIP_Real minnonconvexfrac; /**< minimum (#convex nlrows)/(#nonconvex nlrows) threshold to apply propagator */
85  SCIP_Real minlinearfrac; /**< minimum (#convex nlrows)/(#linear nlrows) threshold to apply propagator */
86  SCIP_Bool addlprows; /**< should (non-initial) LP rows be used? */
87  SCIP_Real itlimitfactor; /**< LP iteration limit for nlobbt will be this factor times total LP
88  * iterations in root node */
89 };
90 
91 /*
92  * Local methods
93  */
94 
95 /** clears the propagator data */
96 static
98  SCIP* scip, /**< SCIP data structure */
99  SCIP_PROPDATA* propdata /**< propagator data */
100  )
101 {
102  assert(propdata != NULL);
103 
104  if( propdata->nlpiprob != NULL )
105  {
106  assert(propdata->nlpi != NULL);
107 
108  SCIPfreeBlockMemoryArray(scip, &propdata->status, propdata->nlpinvars);
109  SCIPfreeBlockMemoryArray(scip, &propdata->nlscore, propdata->nlpinvars);
110  SCIPfreeBlockMemoryArray(scip, &propdata->nlpivars, propdata->nlpinvars);
111  SCIPhashmapFree(&propdata->var2nlpiidx);
112  SCIP_CALL( SCIPnlpiFreeProblem(propdata->nlpi, &propdata->nlpiprob) );
113 
114  propdata->nlpinvars = 0;
115  }
116  assert(propdata->nlpinvars == 0);
117 
118  propdata->skipprop = FALSE;
119  propdata->currpos = 0;
120  propdata->lastnode = -1;
121 
122  return SCIP_OKAY;
123 }
124 
125 /** checks whether it is worth to call nonlinear OBBT procedure */
126 static
128  SCIP* scip, /**< SCIP data structure */
129  SCIP_PROPDATA* propdata /**< propagation data */
130  )
131 {
132  SCIP_NLROW** nlrows;
133  int nnonconvexnlrows;
134  int nconvexnlrows;
135  int nlinearnlrows;
136  int nnlrows;
137  int i;
138 
139  nlrows = SCIPgetNLPNlRows(scip);
140  nnlrows = SCIPgetNNLPNlRows(scip);
141  nnonconvexnlrows = 0;
142  nconvexnlrows = 0;
143  nlinearnlrows = 0;
144 
145  for( i = 0; i < nnlrows; ++i )
146  {
147  if( SCIPnlrowGetNQuadElems(nlrows[i]) == 0 && SCIPnlrowGetExprtree(nlrows[i]) == NULL )
148  ++nlinearnlrows;
149  else if( SCIPnlrowGetCurvature(nlrows[i]) == SCIP_EXPRCURV_CONVEX )
150  {
151  if( !SCIPisInfinity(scip, SCIPnlrowGetRhs(nlrows[i])) )
152  ++nconvexnlrows;
153  if( !SCIPisInfinity(scip, -SCIPnlrowGetLhs(nlrows[i])) )
154  ++nnonconvexnlrows;
155  }
156  else if( SCIPnlrowGetCurvature(nlrows[i]) == SCIP_EXPRCURV_CONCAVE )
157  {
158  if( !SCIPisInfinity(scip, SCIPnlrowGetRhs(nlrows[i])) )
159  ++nnonconvexnlrows;
160  if( !SCIPisInfinity(scip, -SCIPnlrowGetLhs(nlrows[i])) )
161  ++nconvexnlrows;
162  }
163  else
164  {
165  if( !SCIPisInfinity(scip, SCIPnlrowGetRhs(nlrows[i])) )
166  ++nnonconvexnlrows;
167  if( !SCIPisInfinity(scip, -SCIPnlrowGetLhs(nlrows[i])) )
168  ++nnonconvexnlrows;
169  }
170  }
171 
172  SCIPdebugMsg(scip, "nconvex=%d nnonconvex=%d nlinear=%d\n", nconvexnlrows, nnonconvexnlrows, nlinearnlrows);
173 
174  return nconvexnlrows > 0
175  && nnonconvexnlrows > 0
176  && (SCIPisGE(scip, (SCIP_Real)nconvexnlrows, nnonconvexnlrows * propdata->minnonconvexfrac))
177  && (SCIPisGE(scip, (SCIP_Real)nconvexnlrows, nlinearnlrows * propdata->minlinearfrac));
178 }
179 
180 /** filters variables which achieve their lower or dual bound in the current NLP solution */
181 static
183  SCIP* scip, /**< SCIP data structure */
184  SCIP_PROPDATA* propdata /**< propagator data */
185  )
186 {
187  SCIP_Real* primal;
188  int i;
189 
190  assert(propdata->currpos >= 0 && propdata->currpos < propdata->nlpinvars);
191  assert(SCIPnlpiGetSolstat(propdata->nlpi, propdata->nlpiprob) <= SCIP_NLPSOLSTAT_FEASIBLE);
192 
193  SCIP_CALL( SCIPnlpiGetSolution(propdata->nlpi, propdata->nlpiprob, &primal, NULL, NULL, NULL, NULL) );
194  assert(primal != NULL);
195 
196  /* we skip all candidates which have been processed already, i.e., starting at propdata->currpos + 1 */
197  for( i = propdata->currpos + 1; i < propdata->nlpinvars; ++i )
198  {
199  SCIP_VAR* var;
200  SCIP_Real val;
201  int varidx;
202 
203  /* only uninteresting variables left -> stop filtering */
204  if( SCIPisLE(scip, propdata->nlscore[i], 0.0) )
205  break;
206 
207  var = propdata->nlpivars[i];
208  assert(var != NULL && SCIPhashmapExists(propdata->var2nlpiidx, (void*)var));
209 
210  varidx = (int)(size_t)SCIPhashmapGetImage(propdata->var2nlpiidx, (void*)var);
211  assert(SCIPgetVars(scip)[varidx] == var);
212  val = primal[varidx];
213 
214  if( (propdata->status[i] & SOLVEDLB) == 0 && !SCIPisInfinity(scip, -val) /*lint !e641*/
215  && SCIPisFeasLE(scip, val, SCIPvarGetLbLocal(var)) )
216  {
217  SCIPdebugMsg(scip, "filter LB of %s in [%g,%g] with %g\n", SCIPvarGetName(var), SCIPvarGetLbLocal(var),
218  SCIPvarGetUbLocal(var), val);
219  propdata->status[i] |= SOLVEDLB; /*lint !e641*/
220  assert((propdata->status[i] & SOLVEDLB) != 0); /*lint !e641*/
221  }
222 
223  if( (propdata->status[i] & SOLVEDUB) == 0 && !SCIPisInfinity(scip, val) /*lint !e641*/
224  && SCIPisFeasGE(scip, val, SCIPvarGetUbLocal(var)) )
225  {
226  SCIPdebugMsg(scip, "filter UB of %s in [%g,%g] with %g\n", SCIPvarGetName(var), SCIPvarGetLbLocal(var),
227  SCIPvarGetUbLocal(var), val);
228  propdata->status[i] |= SOLVEDUB; /*lint !e641*/
229  assert((propdata->status[i] & SOLVEDUB) != 0); /*lint !e641*/
230  }
231  }
232 
233  return SCIP_OKAY;
234 }
235 
236 /** tries to add a generalized variable bound by exploiting the dual solution of the last NLP solve (see @ref
237  * prop_nlobbt.h for more information)
238  */
239 static
241  SCIP* scip, /**< SCIP data structure */
242  SCIP_PROPDATA* propdata, /**< propagator data */
243  SCIP_VAR* var, /**< variable used in last NLP solve */
244  int varidx, /**< variable index in the propdata->nlpivars array */
245  SCIP_BOUNDTYPE boundtype, /**< type of bound provided by the genvbound */
246  SCIP_Real cutoffbound /**< cutoff bound */
247  )
248 {
249  SCIP_VAR** lvbvars;
250  SCIP_Real* lvbcoefs;
251  SCIP_Real* primal;
252  SCIP_Real* dual;
253  SCIP_Real* alpha;
254  SCIP_Real* beta;
255  SCIP_Real constant;
256  SCIP_Real mu;
257  int nlvbvars;
258  int i;
259 
260  assert(propdata->genvboundprop != NULL);
261  assert(var != NULL);
262  assert(varidx >= 0 && varidx < propdata->nlpinvars);
263  assert(SCIPnlpiGetSolstat(propdata->nlpi, propdata->nlpiprob) <= SCIP_NLPSOLSTAT_LOCOPT);
264 
265  SCIP_CALL( SCIPnlpiGetSolution(propdata->nlpi, propdata->nlpiprob, &primal, &dual, &alpha, &beta, NULL) );
266 
267  /* not possible to generate genvbound if the duals for the propagated variable do not disappear */
268  if( !SCIPisFeasZero(scip, alpha[varidx] - beta[varidx]) )
269  return SCIP_OKAY;
270 
271  SCIP_CALL( SCIPallocBufferArray(scip, &lvbcoefs, propdata->nlpinvars) );
272  SCIP_CALL( SCIPallocBufferArray(scip, &lvbvars, propdata->nlpinvars) );
273  constant = boundtype == SCIP_BOUNDTYPE_LOWER ? primal[varidx] : -primal[varidx];
274  mu = 0.0;
275  nlvbvars = 0;
276 
277  /* collect coefficients of genvbound */
278  for( i = 0; i < propdata->nlpinvars; ++i )
279  {
280  if( !SCIPisZero(scip, beta[i] - alpha[i]) )
281  {
282  lvbvars[nlvbvars] = propdata->nlpivars[i];
283  lvbcoefs[nlvbvars] = beta[i] - alpha[i];
284  ++nlvbvars;
285 
286  constant += (alpha[i] - beta[i]) * primal[i];
287  }
288  }
289 
290  /* first dual multiplier corresponds to the cutoff row if cutoffbound < SCIPinfinity() */
291  if( !SCIPisInfinity(scip, cutoffbound) && SCIPisGT(scip, dual[0], 0.0) )
292  {
293  mu = dual[0];
294  constant += mu * cutoffbound;
295  }
296 
297  /* add genvbound to genvbounds propagator */
298  if( !SCIPisInfinity(scip, REALABS(constant)) && (nlvbvars > 0 || SCIPisFeasGT(scip, mu, 0.0)) )
299  {
300  SCIP_CALL( SCIPgenVBoundAdd(scip, propdata->genvboundprop, lvbvars, var, lvbcoefs, nlvbvars, -mu, constant,
301  boundtype) );
302  SCIPdebugMsg(scip, "add genvbound for %s\n", SCIPvarGetName(var));
303  }
304 
305  SCIPfreeBufferArray(scip, &lvbvars);
306  SCIPfreeBufferArray(scip, &lvbcoefs);
307 
308  return SCIP_OKAY;
309 }
310 
311 /** sets the objective function, solves the NLP, and tightens the given variable; after calling this function, the
312  * objective function is set to zero
313  *
314  * @note function assumes that objective function is zero
315  */
316 static
318  SCIP* scip, /**< SCIP data structure */
319  SCIP_PROPDATA* propdata, /**< propagator data */
320  SCIP_VAR* var, /**< variable to propagate */
321  int varidx, /**< variable index in the propdata->nlpivars array */
322  SCIP_BOUNDTYPE boundtype, /**< minimize or maximize var? */
323  int* nlpiter, /**< buffer to store the total number of nlp iterations */
324  SCIP_RESULT* result /**< pointer to store result */
325  )
326 {
327  SCIP_Real timelimit;
328  SCIP_Real* primal;
329  SCIP_Real obj;
330  int iterlimit;
331 
332 #ifdef SCIP_DEBUG
333  SCIP_Real oldlb;
334  SCIP_Real oldub;
335 
336  oldlb = SCIPvarGetLbLocal(var);
337  oldub = SCIPvarGetUbLocal(var);
338 #endif
339 
340  assert(var != NULL);
341  assert(varidx >= 0 && varidx < propdata->nlpinvars);
342  assert(result != NULL && *result != SCIP_CUTOFF);
343 
344  *nlpiter = 0;
345 
346  /* set time and iteration limit */
347  SCIP_CALL( SCIPgetRealParam(scip, "limits/time", &timelimit) );
348  if( !SCIPisInfinity(scip, timelimit) )
349  {
350  timelimit -= SCIPgetSolvingTime(scip);
351  if( timelimit <= 0.0 )
352  {
353  SCIPdebugMsg(scip, "skip NLP solve; no time left\n");
354  return SCIP_OKAY;
355  }
356  }
357  if( propdata->nlptimelimit > 0.0 )
358  timelimit = MIN(propdata->nlptimelimit, timelimit);
359  iterlimit = propdata->nlpiterlimit > 0 ? propdata->nlpiterlimit : INT_MAX;
360  SCIP_CALL( SCIPnlpiSetRealPar(propdata->nlpi, propdata->nlpiprob, SCIP_NLPPAR_TILIM, timelimit) );
361  SCIP_CALL( SCIPnlpiSetIntPar(propdata->nlpi, propdata->nlpiprob, SCIP_NLPPAR_ITLIM, iterlimit) );
362 
363  /* set corresponding objective coefficient and solve NLP */
364  obj = boundtype == SCIP_BOUNDTYPE_LOWER ? 1.0 : -1.0;
365  SCIP_CALL( SCIPnlpiSetObjective(propdata->nlpi, propdata->nlpiprob, 1, &varidx, &obj, 0, NULL, NULL, NULL, 0.0) );
366 
367  SCIPdebugMsg(scip, "solve var=%s boundtype=%d nlscore=%g\n", SCIPvarGetName(var), boundtype,
368  propdata->nlscore[propdata->currpos]);
369  SCIP_CALL( SCIPnlpiSolve(propdata->nlpi, propdata->nlpiprob) );
370  SCIPdebugMsg(scip, "NLP solstat = %d\n", SCIPnlpiGetSolstat(propdata->nlpi, propdata->nlpiprob));
371 
372  /* collect NLP statistics */
373  assert(propdata->nlpstatistics != NULL);
374  SCIP_CALL( SCIPnlpiGetStatistics(propdata->nlpi, propdata->nlpiprob, propdata->nlpstatistics) );
375  *nlpiter = SCIPnlpStatisticsGetNIterations(propdata->nlpstatistics);
376  SCIPdebugMsg(scip, "iterations %d time %g\n", *nlpiter, SCIPnlpStatisticsGetTotalTime(propdata->nlpstatistics));
377 
378  /* filter bound candidates first, otherwise we do not have access to the primal solution values */
379  if( SCIPnlpiGetSolstat(propdata->nlpi, propdata->nlpiprob) <= SCIP_NLPSOLSTAT_FEASIBLE )
380  {
381  SCIP_CALL( filterCands(scip, propdata) );
382  }
383 
384  /* try to tighten variable bound */
385  if( SCIPnlpiGetSolstat(propdata->nlpi, propdata->nlpiprob) <= SCIP_NLPSOLSTAT_LOCOPT )
386  {
387  SCIP_Bool tightened;
388  SCIP_Bool infeasible;
389 
390  /* try to add a genvbound in the root node */
391  if( propdata->genvboundprop != NULL && SCIPgetDepth(scip) == 0 )
392  {
393  SCIP_CALL( addGenVBound(scip, propdata, var, varidx, boundtype, SCIPgetCutoffbound(scip)) );
394  }
395 
396  SCIP_CALL( SCIPnlpiGetSolution(propdata->nlpi, propdata->nlpiprob, &primal, NULL, NULL, NULL, NULL) );
397 
398  if( boundtype == SCIP_BOUNDTYPE_LOWER )
399  {
400  SCIP_CALL( SCIPtightenVarLb(scip, var, primal[varidx], FALSE, &infeasible, &tightened) );
401  }
402  else
403  {
404  SCIP_CALL( SCIPtightenVarUb(scip, var, primal[varidx], FALSE, &infeasible, &tightened) );
405  }
406 
407  if( infeasible )
408  {
409  SCIPdebugMsg(scip, "detect infeasibility after propagating %s\n", SCIPvarGetName(var));
410  *result = SCIP_CUTOFF;
411  }
412  else if( tightened )
413  {
414  SCIP_Real lb;
415  SCIP_Real ub;
416 
417  *result = SCIP_REDUCEDDOM;
418 
419  /* update bounds in NLP */
420  lb = SCIPvarGetLbLocal(var);
421  ub = SCIPvarGetUbLocal(var);
422  SCIP_CALL( SCIPnlpiChgVarBounds(propdata->nlpi, propdata->nlpiprob, 1, &varidx, &lb, &ub) );
423 
424 #ifdef SCIP_DEBUG
425  SCIPdebugMsg(scip, "tightened bounds of %s from [%g,%g] to [%g,%g]\n", SCIPvarGetName(var), oldlb, oldub, lb, ub);
426 #endif
427  }
428  }
429 
430  /* reset objective function */
431  obj = 0.0;
432  SCIP_CALL( SCIPnlpiSetObjective(propdata->nlpi, propdata->nlpiprob, 1, &varidx, &obj, 0, NULL, NULL, NULL, 0.0) );
433 
434  return SCIP_OKAY;
435 }
436 
437 /** main method of the propagator
438  *
439  * creates a convex NLP relaxation and solves the OBBT-NLPs for each possible candidate;
440  * binary and variables with a small domain will be ignored to reduce the computational cost of the propagator; after
441  * solving each NLP we filter out all variable candidates which are on their lower or upper bound; candidates with a
442  * larger number of occurrences are preferred
443  */
444 static
446  SCIP* scip, /**< SCIP data structure */
447  SCIP_PROPDATA* propdata, /**< propagation data */
448  SCIP_RESULT* result /**< pointer to store result */
449  )
450 {
451  int nlpiterleft;
452 
453  assert(result != NULL);
454  assert(!propdata->skipprop);
455  assert(SCIPgetNNlpis(scip) > 0);
456 
457  *result = SCIP_DIDNOTRUN;
458 
459  if( propdata->nlpiprob == NULL && !isNlobbtApplicable(scip, propdata) )
460  {
461  /* do not call the propagator anymore (except after a restart) */
462  SCIPdebugMsg(scip, "nlobbt propagator is not applicable\n");
463  propdata->skipprop = TRUE;
464  return SCIP_OKAY;
465  }
466 
467  *result = SCIP_DIDNOTFIND;
468 
469  /* compute NLP iteration limit */
470  if( propdata->itlimitfactor > 0.0 )
471  nlpiterleft = (int)(propdata->itlimitfactor * SCIPgetNRootLPIterations(scip));
472  else
473  nlpiterleft = INT_MAX;
474 
475  /* recompute NLP relaxation if the variable set changed */
476  if( propdata->nlpiprob != NULL && SCIPgetNVars(scip) != propdata->nlpinvars )
477  {
478  SCIP_CALL( propdataClear(scip, propdata) );
479  assert(propdata->nlpiprob == NULL);
480  }
481 
482  /* create or update NLP relaxation */
483  if( propdata->nlpiprob == NULL )
484  {
485  int i;
486 
487  propdata->nlpinvars = SCIPgetNVars(scip);
488  propdata->nlpi = SCIPgetNlpis(scip)[0];
489  assert(propdata->nlpi != NULL);
490 
491  SCIP_CALL( SCIPnlpiCreateProblem(propdata->nlpi, &propdata->nlpiprob, "nlobbt-nlp") );
492  SCIP_CALL( SCIPhashmapCreate(&propdata->var2nlpiidx, SCIPblkmem(scip), propdata->nlpinvars) );
493  SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &propdata->nlpivars, SCIPgetVars(scip), propdata->nlpinvars) ); /*lint !e666*/
494  SCIP_CALL( SCIPallocBlockMemoryArray(scip, &propdata->nlscore, propdata->nlpinvars) );
495  SCIP_CALL( SCIPallocBlockMemoryArray(scip, &propdata->status, propdata->nlpinvars) );
496 
497  SCIP_CALL( SCIPcreateNlpiProb(scip, propdata->nlpi, SCIPgetNLPNlRows(scip), SCIPgetNNLPNlRows(scip),
498  propdata->nlpiprob, propdata->var2nlpiidx, propdata->nlscore, SCIPgetCutoffbound(scip), FALSE, TRUE) );
499 
500  /* initialize bound status; perturb nlscores by a factor which ensures that zero scores remain zero */
501  assert(propdata->randnumgen != NULL);
502  for( i = 0; i < propdata->nlpinvars; ++i )
503  {
504  propdata->status[i] = UNSOLVED; /*lint !e641*/
505  propdata->nlscore[i] *= 1.0 + SCIPrandomGetReal(propdata->randnumgen, SCIPfeastol(scip), 2.0 * SCIPfeastol(scip));
506  }
507 
508  /* add rows of the LP */
509  if( SCIPgetDepth(scip) == 0 )
510  {
511  SCIP_CALL( SCIPaddNlpiProbRows(scip, propdata->nlpi, propdata->nlpiprob, propdata->var2nlpiidx,
512  SCIPgetLPRows(scip), SCIPgetNLPRows(scip)) );
513  }
514  }
515  else
516  {
517  SCIP_CALL( SCIPupdateNlpiProb(scip, propdata->nlpi, propdata->nlpiprob, propdata->var2nlpiidx,
518  propdata->nlpivars, propdata->nlpinvars, SCIPgetCutoffbound(scip)) );
519  }
520 
521  assert(propdata->nlpiprob != NULL);
522  assert(propdata->var2nlpiidx != NULL);
523  assert(propdata->nlpivars != NULL);
524  assert(propdata->nlscore != NULL);
525 
526  /* sort variables w.r.t. their nlscores if we did not solve any NLP for this node */
527  if( propdata->currpos == 0 )
528  {
529  SCIPsortDownRealIntPtr(propdata->nlscore, propdata->status, (void**)propdata->nlpivars, propdata->nlpinvars);
530  }
531 
532  /* set parameters of NLP solver */
533  SCIP_CALL( SCIPnlpiSetRealPar(propdata->nlpi, propdata->nlpiprob, SCIP_NLPPAR_FEASTOL,
534  SCIPfeastol(scip) * propdata->feastolfac) );
535  SCIP_CALL( SCIPnlpiSetRealPar(propdata->nlpi, propdata->nlpiprob, SCIP_NLPPAR_RELOBJTOL,
536  SCIPfeastol(scip) * propdata->relobjtolfac) );
537  SCIP_CALL( SCIPnlpiSetIntPar(propdata->nlpi, propdata->nlpiprob, SCIP_NLPPAR_VERBLEVEL, propdata->nlpverblevel) );
538 
539  /* main propagation loop */
540  while( propdata->currpos < propdata->nlpinvars
541  && nlpiterleft > 0
542  && SCIPisGT(scip, propdata->nlscore[propdata->currpos], 0.0)
543  && *result != SCIP_CUTOFF
544  && !SCIPisStopped(scip) )
545  {
546  SCIP_VAR* var;
547  int varidx;
548  int iters;
549 
550  var = propdata->nlpivars[propdata->currpos];
551  assert(var != NULL);
552 
553  /* skip binary or almost fixed variables */
555  || SCIPisFeasEQ(scip, SCIPvarGetLbLocal(var), SCIPvarGetUbLocal(var)) )
556  {
557  ++(propdata->currpos);
558  continue;
559  }
560 
561  SCIPdebugMsg(scip, "iterations left %d\n", nlpiterleft);
562 
563  /* get index of var in the nlpi */
564  assert(SCIPhashmapExists(propdata->var2nlpiidx, (void*)var) );
565  varidx = (int)(size_t)SCIPhashmapGetImage(propdata->var2nlpiidx, (void*)var);
566  assert(var == SCIPgetVars(scip)[varidx]);
567 
568  /* case: minimize var */
569  if( (propdata->status[propdata->currpos] & SOLVEDLB) == 0 ) /*lint !e641*/
570  {
571  SCIP_CALL( solveNlp(scip, propdata, var, varidx, SCIP_BOUNDTYPE_LOWER, &iters, result) );
572  nlpiterleft -= iters;
573  }
574 
575  /* case: maximize var */
576  if( *result != SCIP_CUTOFF && (propdata->status[propdata->currpos] & SOLVEDUB) == 0 ) /*lint !e641*/
577  {
578  SCIP_CALL( solveNlp(scip, propdata, var, varidx, SCIP_BOUNDTYPE_UPPER, &iters, result) );
579  nlpiterleft -= iters;
580  }
581 
582  /* update the current position */
583  ++(propdata->currpos);
584  }
585 
586  return SCIP_OKAY;
587 }
588 
589 /*
590  * Callback methods of propagator
591  */
592 
593 /** destructor of propagator to free user data (called when SCIP is exiting) */
594 static
595 SCIP_DECL_PROPFREE(propFreeNlobbt)
596 { /*lint --e{715}*/
597  SCIP_PROPDATA* propdata;
598 
599  propdata = SCIPpropGetData(prop);
600  assert(propdata != NULL);
601 
602  SCIP_CALL( propdataClear(scip, propdata) );
603  SCIPfreeBlockMemory(scip, &propdata);
604  SCIPpropSetData(prop, NULL);
605 
606  return SCIP_OKAY;
607 }
608 
609 /** solving process initialization method of propagator (called when branch and bound process is about to begin) */
610 static
611 SCIP_DECL_PROPINITSOL(propInitsolNlobbt)
612 { /*lint --e{715}*/
613  SCIP_PROPDATA* propdata;
614 
615  assert(scip != NULL);
616  assert(prop != NULL);
617 
618  propdata = SCIPpropGetData(prop);
619  assert(propdata != NULL);
620 
621  /* if genvbounds propagator is not available, we cannot create genvbounds */
622  propdata->genvboundprop = SCIPfindProp(scip, "genvbounds");
623 
624  SCIP_CALL( SCIPcreateRandom(scip, &propdata->randnumgen,
625  DEFAULT_RANDSEED) );
626  SCIP_CALL( SCIPnlpStatisticsCreate(SCIPblkmem(scip), &propdata->nlpstatistics) );
627  propdata->lastnode = -1;
628 
629  return SCIP_OKAY;
630 }
631 
632 /** solving process deinitialization method of propagator (called before branch and bound process data is freed) */
633 static
634 SCIP_DECL_PROPEXITSOL(propExitsolNlobbt)
635 { /*lint --e{715}*/
636  SCIP_PROPDATA* propdata;
637 
638  propdata = SCIPpropGetData(prop);
639  assert(propdata != NULL);
640 
641  SCIPnlpStatisticsFree(SCIPblkmem(scip), &propdata->nlpstatistics);
642  SCIPfreeRandom(scip, &propdata->randnumgen);
643 
644  SCIP_CALL( propdataClear(scip, propdata) );
645 
646  return SCIP_OKAY;
647 }
648 
649 /** execution method of propagator */
650 static
651 SCIP_DECL_PROPEXEC(propExecNlobbt)
652 { /*lint --e{715}*/
653  SCIP_PROPDATA* propdata;
654 
655  *result = SCIP_DIDNOTRUN;
656 
657  propdata = SCIPpropGetData(prop);
658  assert(propdata != NULL);
659 
660  if( propdata->skipprop || SCIPgetStage(scip) != SCIP_STAGE_SOLVING || SCIPinRepropagation(scip)
661  || SCIPinProbing(scip) || SCIPinDive(scip) || !SCIPallowObjProp(scip) || SCIPgetNNlpis(scip) == 0 )
662  {
663  SCIPdebugMsg(scip, "skip nlobbt propagator\n");
664  return SCIP_OKAY;
665  }
666 
667  /* only run if LP all columns are in the LP, e.g., do not run if pricers are active */
668  if( !SCIPallColsInLP(scip) )
669  {
670  SCIPdebugMsg(scip, "not all columns in LP, skipping obbt\n");
671  return SCIP_OKAY;
672  }
673 
674  /* do not run if SCIP does not have constructed an NLP */
675  if( !SCIPisNLPConstructed(scip) )
676  {
677  SCIPdebugMsg(scip, "NLP not constructed, skipping nlobbt\n");
678  return SCIP_OKAY;
679  }
680 
681  /* consider all variables again if we process a new node */
682  if( SCIPnodeGetNumber(SCIPgetCurrentNode(scip)) != propdata->lastnode )
683  {
684  propdata->lastnode = SCIPnodeGetNumber(SCIPgetCurrentNode(scip));
685  propdata->currpos = 0;
686  }
687 
688  /* call main procedure of nonlinear OBBT propagator */
689  SCIP_CALL( applyNlobbt(scip, propdata, result) );
690 
691  return SCIP_OKAY;
692 }
693 
694 /*
695  * propagator specific interface methods
696  */
697 
698 /** creates the nlobbt propagator and includes it in SCIP */
700  SCIP* scip /**< SCIP data structure */
701  )
702 {
703  SCIP_PROPDATA* propdata;
704  SCIP_PROP* prop;
705 
706  propdata = NULL;
707  prop = NULL;
708 
709  SCIP_CALL( SCIPallocBlockMemory(scip, &propdata) );
710  assert(propdata != NULL);
711  BMSclearMemory(propdata);
712 
714  propExecNlobbt, propdata) );
715  assert(prop != NULL);
716 
717  SCIP_CALL( SCIPsetPropFree(scip, prop, propFreeNlobbt) );
718  SCIP_CALL( SCIPsetPropInitsol(scip, prop, propInitsolNlobbt) );
719  SCIP_CALL( SCIPsetPropExitsol(scip, prop, propExitsolNlobbt) );
720 
721  SCIP_CALL( SCIPaddRealParam(scip, "propagating/" PROP_NAME "/feastolfac",
722  "factor for NLP feasibility tolerance",
723  &propdata->feastolfac, TRUE, DEFAULT_FEASTOLFAC, 0.0, 1.0, NULL, NULL) );
724 
725  SCIP_CALL( SCIPaddRealParam(scip, "propagating/" PROP_NAME "/relobjtolfac",
726  "factor for NLP relative objective tolerance",
727  &propdata->relobjtolfac, TRUE, DEFAULT_RELOBJTOLFAC, 0.0, 1.0, NULL, NULL) );
728 
729  SCIP_CALL( SCIPaddRealParam(scip, "propagating/" PROP_NAME "/minnonconvexfrac",
730  "(#convex nlrows)/(#nonconvex nlrows) threshold to apply propagator",
731  &propdata->minnonconvexfrac, TRUE, DEFAULT_MINNONCONVEXFRAC, 0.0, SCIPinfinity(scip), NULL, NULL) );
732 
733  SCIP_CALL( SCIPaddRealParam(scip, "propagating/" PROP_NAME "/minlinearfrac",
734  "minimum (#convex nlrows)/(#linear nlrows) threshold to apply propagator",
735  &propdata->minlinearfrac, TRUE, DEFAULT_MINLINEARFRAC, 0.0, SCIPinfinity(scip), NULL, NULL) );
736 
737  SCIP_CALL( SCIPaddBoolParam(scip, "propagating/" PROP_NAME "/addlprows",
738  "should non-initial LP rows be used?",
739  &propdata->addlprows, FALSE, DEFAULT_ADDLPROWS, NULL, NULL) );
740 
741  SCIP_CALL( SCIPaddIntParam(scip, "propagating/" PROP_NAME "/nlpiterlimit",
742  "iteration limit of NLP solver; 0 for no limit",
743  &propdata->nlpiterlimit, TRUE, DEFAULT_NLPITERLIMIT, 0, INT_MAX, NULL, NULL) );
744 
745  SCIP_CALL( SCIPaddRealParam(scip, "propagating/" PROP_NAME "/nlptimelimit",
746  "time limit of NLP solver; 0.0 for no limit",
747  &propdata->nlptimelimit, TRUE, DEFAULT_NLPTIMELIMIT, 0.0, SCIP_REAL_MAX, NULL, NULL) );
748 
749  SCIP_CALL( SCIPaddIntParam(scip, "propagating/" PROP_NAME "/nlpverblevel",
750  "verbosity level of NLP solver",
751  &propdata->nlpverblevel, TRUE, DEFAULT_NLPVERLEVEL, 0, 5, NULL, NULL) );
752 
753  SCIP_CALL( SCIPaddRealParam(scip, "propagating/" PROP_NAME "/itlimitfactor",
754  "LP iteration limit for nlobbt will be this factor times total LP iterations in root node",
755  &propdata->itlimitfactor, TRUE, DEFAULT_ITLIMITFACTOR, 0.0, SCIP_REAL_MAX, NULL, NULL) );
756 
757  return SCIP_OKAY;
758 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
Definition: scip.c:48626
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
Definition: scip.h:22604
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
static SCIP_DECL_PROPINITSOL(propInitsolNlobbt)
Definition: prop_nlobbt.c:612
SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
Definition: scip.c:29675
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
Definition: scip.c:47363
SCIP_Bool SCIPinRepropagation(SCIP *scip)
Definition: scip.c:41459
int SCIPgetNNLPNlRows(SCIP *scip)
Definition: scip.c:31462
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
Definition: scip.c:46306
SCIP_Longint SCIPgetNRootLPIterations(SCIP *scip)
Definition: scip.c:42377
SCIP_RETCODE SCIPnlpiGetStatistics(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:556
SCIP_Real SCIPfeastol(SCIP *scip)
Definition: scip.c:46443
#define SCIPallocBlockMemoryArray(scip, ptr, num)
Definition: scip.h:22587
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
Definition: scip.c:31233
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip.c:22523
static SCIP_DECL_PROPEXITSOL(propExitsolNlobbt)
Definition: prop_nlobbt.c:635
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47298
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
Definition: scip.c:41404
SCIP_STAGE SCIPgetStage(SCIP *scip)
Definition: scip.c:821
#define PROP_FREQ
Definition: prop_nlobbt.c:32
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
Definition: scip.c:43453
SCIP_RETCODE SCIPcreateNlpiProb(SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLROW **nlrows, int nnlrows, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2idx, SCIP_Real *nlscore, SCIP_Real cutoffbound, SCIP_Bool setobj, SCIP_Bool onlyconvex)
Definition: scip.c:34032
SCIP_PROP * SCIPfindProp(SCIP *scip, const char *name)
Definition: scip.c:7873
#define PROP_PRIORITY
Definition: prop_nlobbt.c:31
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip.c:4489
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed)
Definition: scip.c:48608
#define DEFAULT_FEASTOLFAC
Definition: prop_nlobbt.c:38
void SCIPsortDownRealIntPtr(SCIP_Real *realarray, int *intarray, void **ptrarray, int len)
SCIP_Real SCIPnlpStatisticsGetTotalTime(SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:826
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17332
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47015
internal methods for NLPI solver interfaces
static SCIP_RETCODE addGenVBound(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, int varidx, SCIP_BOUNDTYPE boundtype, SCIP_Real cutoffbound)
Definition: prop_nlobbt.c:241
SCIP_RETCODE SCIPnlpiCreateProblem(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **problem, const char *name)
Definition: nlpi.c:211
#define DEFAULT_MINLINEARFRAC
Definition: prop_nlobbt.c:37
#define DEFAULT_NLPITERLIMIT
Definition: prop_nlobbt.c:44
SCIP_RETCODE SCIPnlpiGetSolution(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_Real **primalvalues, SCIP_Real **consdualvalues, SCIP_Real **varlbdualvalues, SCIP_Real **varubdualvalues, SCIP_Real *objval)
Definition: nlpi.c:537
SCIP_RETCODE SCIPincludePropNlobbt(SCIP *scip)
Definition: prop_nlobbt.c:700
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47350
#define FALSE
Definition: def.h:64
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
Definition: misc.c:2793
SCIP_Real SCIPinfinity(SCIP *scip)
Definition: scip.c:47028
#define TRUE
Definition: def.h:63
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_Real SCIPnlrowGetRhs(SCIP_NLROW *nlrow)
Definition: nlp.c:3383
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip.c:22639
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip.h:22602
SCIP_EXPRCURV SCIPnlrowGetCurvature(SCIP_NLROW *nlrow)
Definition: nlp.c:3393
SCIP_RETCODE SCIPnlpiChgVarBounds(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nvars, const int *indices, const SCIP_Real *lbs, const SCIP_Real *ubs)
Definition: nlpi.c:325
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:2931
void SCIPnlpStatisticsFree(BMS_BLKMEM *blkmem, SCIP_NLPSTATISTICS **statistics)
Definition: nlpi.c:801
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip.h:22632
#define SCIPallocBlockMemory(scip, ptr)
Definition: scip.h:22585
#define DEFAULT_RELOBJTOLFAC
Definition: prop_nlobbt.c:39
#define SCIPdebugMsg
Definition: scip.h:455
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip.c:4265
#define DEFAULT_RANDSEED
Definition: prop_nlobbt.c:47
SCIP_NLROW ** SCIPgetNLPNlRows(SCIP *scip)
Definition: scip.c:31440
static SCIP_RETCODE propdataClear(SCIP *scip, SCIP_PROPDATA *propdata)
Definition: prop_nlobbt.c:98
int SCIPnlrowGetNQuadElems(SCIP_NLROW *nlrow)
Definition: nlp.c:3322
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:3025
SCIP_RETCODE SCIPnlpiSolve(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:497
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
Definition: tree.c:7342
#define DEFAULT_NLPVERLEVEL
Definition: prop_nlobbt.c:46
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
Definition: scip.h:22599
#define DEFAULT_NLPTIMELIMIT
Definition: prop_nlobbt.c:45
static SCIP_RETCODE applyNlobbt(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_RESULT *result)
Definition: prop_nlobbt.c:446
SCIP_RETCODE SCIPgenVBoundAdd(SCIP *scip, SCIP_PROP *genvboundprop, SCIP_VAR **vars, SCIP_VAR *var, SCIP_Real *coefs, int ncoefs, SCIP_Real coefcutoffbound, SCIP_Real constant, SCIP_BOUNDTYPE boundtype)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
Definition: scip.c:46731
#define PROP_NAME
Definition: prop_nlobbt.c:29
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:16662
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
Definition: misc.c:2826
SCIP_RETCODE SCIPaddNlpiProbRows(SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2idx, SCIP_ROW **rows, int nrows)
Definition: scip.c:34407
int SCIPgetNNlpis(SCIP *scip)
Definition: scip.c:9602
#define REALABS(x)
Definition: def.h:173
int SCIPgetNLPRows(SCIP *scip)
Definition: scip.c:29696
#define SCIP_CALL(x)
Definition: def.h:350
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47337
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47324
SCIP_NLPSOLSTAT SCIPnlpiGetSolstat(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem)
Definition: nlpi.c:511
static SCIP_RETCODE solveNlp(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, int varidx, SCIP_BOUNDTYPE boundtype, int *nlpiter, SCIP_RESULT *result)
Definition: prop_nlobbt.c:318
SCIP_RETCODE SCIPnlpiSetObjective(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, int nlins, const int *lininds, const SCIP_Real *linvals, int nquadelems, const SCIP_QUADELEM *quadelems, const int *exprvaridxs, const SCIP_EXPRTREE *exprtree, const SCIP_Real constant)
Definition: nlpi.c:300
SCIP_RETCODE SCIPnlpiFreeProblem(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM **problem)
Definition: nlpi.c:224
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip.h:22620
#define PROP_DESC
Definition: prop_nlobbt.c:30
#define SCIP_Bool
Definition: def.h:61
SCIP_RETCODE SCIPupdateNlpiProb(SCIP *scip, SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *nlpiprob, SCIP_HASHMAP *var2nlpiidx, SCIP_VAR **nlpivars, int nlpinvars, SCIP_Real cutoffbound)
Definition: scip.c:34355
int SCIPgetDepth(SCIP *scip)
Definition: scip.c:43045
SCIP_RETCODE SCIPnlpiSetIntPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, int ival)
Definition: nlpi.c:636
nonlinear OBBT propagator
#define DEFAULT_ITLIMITFACTOR
Definition: prop_nlobbt.c:41
#define PROP_DELAY
Definition: prop_nlobbt.c:33
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
Definition: scip.c:47039
#define BMSclearMemory(ptr)
Definition: memory.h:111
SCIP_RETCODE SCIPsetPropExitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXITSOL((*propexitsol)))
Definition: scip.c:7775
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
Definition: misc.c:9388
SCIP_Bool SCIPinProbing(SCIP *scip)
Definition: scip.c:35836
int SCIPgetNVars(SCIP *scip)
Definition: scip.c:11812
#define SCIP_REAL_MAX
Definition: def.h:150
SCIP_EXPRTREE * SCIPnlrowGetExprtree(SCIP_NLROW *nlrow)
Definition: nlp.c:3363
SCIP_Bool SCIPinDive(SCIP *scip)
Definition: scip.c:35802
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:47002
static SCIP_RETCODE filterCands(SCIP *scip, SCIP_PROPDATA *propdata)
Definition: prop_nlobbt.c:183
SCIP_RETCODE SCIPnlpStatisticsCreate(BMS_BLKMEM *blkmem, SCIP_NLPSTATISTICS **statistics)
Definition: nlpi.c:784
static SCIP_DECL_PROPEXEC(propExecNlobbt)
Definition: prop_nlobbt.c:652
SCIP_VAR ** SCIPgetVars(SCIP *scip)
Definition: scip.c:11767
SCIP_RETCODE SCIPsetPropInitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITSOL((*propinitsol)))
Definition: scip.c:7759
#define PROP_TIMING
Definition: prop_nlobbt.c:34
#define SCIP_Real
Definition: def.h:149
struct SCIP_PropData SCIP_PROPDATA
Definition: type_prop.h:38
SCIP_Bool SCIPisStopped(SCIP *scip)
Definition: scip.c:1145
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
Definition: scip.c:7711
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
Definition: prop.c:735
void SCIPpropSetData(SCIP_PROP *prop, SCIP_PROPDATA *propdata)
Definition: prop.c:745
int SCIPnlpStatisticsGetNIterations(SCIP_NLPSTATISTICS *statistics)
Definition: nlpi.c:816
#define SCIP_Longint
Definition: def.h:134
SCIP_Bool SCIPallColsInLP(SCIP *scip)
Definition: scip.c:29719
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
Definition: var.c:16827
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
Definition: scip.c:47076
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:46989
#define DEFAULT_MINNONCONVEXFRAC
Definition: prop_nlobbt.c:36
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17342
SCIP_NLPI ** SCIPgetNlpis(SCIP *scip)
Definition: scip.c:9589
#define DEFAULT_ADDLPROWS
Definition: prop_nlobbt.c:40
SCIP_Real SCIPnlrowGetLhs(SCIP_NLROW *nlrow)
Definition: nlp.c:3373
static SCIP_DECL_PROPFREE(propFreeNlobbt)
Definition: prop_nlobbt.c:596
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip.c:4321
static SCIP_Bool isNlobbtApplicable(SCIP *scip, SCIP_PROPDATA *propdata)
Definition: prop_nlobbt.c:128
SCIP_Bool SCIPallowObjProp(SCIP *scip)
Definition: scip.c:25895
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip.c:4239
generalized variable bounds propagator
SCIP_RETCODE SCIPnlpiSetRealPar(SCIP_NLPI *nlpi, SCIP_NLPIPROBLEM *problem, SCIP_NLPPARAM type, SCIP_Real dval)
Definition: nlpi.c:671
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)
Definition: scip.c:7658
BoundStatus
Definition: prop_nlobbt.c:54