Scippy

SCIP

Solving Constraint Integer Programs

scip_nlp.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2019 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 scip_nlp.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for nonlinear relaxations
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Robert Lion Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_NLP_H__
32 #define __SCIP_SCIP_NLP_H__
33 
34 
35 #include "nlpi/type_expr.h"
36 #include "nlpi/type_nlpi.h"
37 #include "scip/def.h"
38 #include "scip/type_lp.h"
39 #include "scip/type_nlp.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 #include "scip/type_sol.h"
43 #include "scip/type_var.h"
44 
45 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
46  * this structure except the interface methods in scip.c.
47  * In optimized mode, the structure is included in scip.h, because some of the methods
48  * are implemented as defines for performance reasons (e.g. the numerical comparisons).
49  * Additionally, the internal "set.h" is included, such that the defines in set.h are
50  * available in optimized mode.
51  */
52 #ifdef NDEBUG
53 #include "scip/struct_scip.h"
54 #include "scip/struct_stat.h"
55 #include "scip/set.h"
56 #include "scip/tree.h"
57 #include "scip/misc.h"
58 #include "scip/var.h"
59 #include "scip/cons.h"
60 #include "scip/solve.h"
61 #include "scip/debug.h"
62 #endif
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /**@addtogroup PublicNLPInterfaceMethods
69  *
70  * @{
71  */
72 
73 /** includes an NLPI in SCIP */
74 extern
76  SCIP* scip, /**< SCIP data structure */
77  SCIP_NLPI* nlpi /**< NLPI data structure */
78  );
79 
80 /** returns the NLPI of the given name, or NULL if not existing */
81 extern
83  SCIP* scip, /**< SCIP data structure */
84  const char* name /**< name of NLPI */
85  );
86 
87 /** returns the array of currently available NLPIs (sorted by priority) */
88 extern
90  SCIP* scip /**< SCIP data structure */
91  );
92 
93 /** returns the number of currently available NLPIs */
94 extern
95 int SCIPgetNNlpis(
96  SCIP* scip /**< SCIP data structure */
97  );
98 
99 /** sets the priority of an NLPI */
100 extern
102  SCIP* scip, /**< SCIP data structure */
103  SCIP_NLPI* nlpi, /**< NLPI */
104  int priority /**< new priority of the NLPI */
105  );
106 
107 /* @} */
108 
109 /**@addtogroup PublicNLPMethods
110  *
111  * @{
112  */
113 
114 /** returns whether the NLP relaxation has been enabled
115  *
116  * If the NLP relaxation is enabled, then SCIP will construct the NLP relaxation when the solving process is about to begin.
117  * To check whether an NLP is existing, use SCIPisNLPConstructed().
118  *
119  * @pre This method can be called if SCIP is in one of the following stages:
120  * - \ref SCIP_STAGE_INITPRESOLVE
121  * - \ref SCIP_STAGE_PRESOLVING
122  * - \ref SCIP_STAGE_EXITPRESOLVE
123  * - \ref SCIP_STAGE_PRESOLVED
124  * - \ref SCIP_STAGE_INITSOLVE
125  * - \ref SCIP_STAGE_SOLVING
126  *
127  * @see SCIPenableNLP
128  */
129 extern
131  SCIP* scip /**< SCIP data structure */
132  );
133 
134 /** marks that there are constraints that are representable by nonlinear rows
135  *
136  * This method should be called by a constraint handler if it has constraints that have a representation as nonlinear rows.
137  *
138  * The function should be called before the branch-and-bound process is initialized, e.g., when presolve is exiting.
139  *
140  * @pre This method can be called if SCIP is in one of the following stages:
141  * - \ref SCIP_STAGE_INITPRESOLVE
142  * - \ref SCIP_STAGE_PRESOLVING
143  * - \ref SCIP_STAGE_EXITPRESOLVE
144  * - \ref SCIP_STAGE_PRESOLVED
145  * - \ref SCIP_STAGE_INITSOLVE
146  * - \ref SCIP_STAGE_SOLVING
147  */
148 extern
149 void SCIPenableNLP(
150  SCIP* scip /**< SCIP data structure */
151  );
152 
153 /** returns, whether an NLP has been constructed
154  *
155  * @pre This method can be called if SCIP is in one of the following stages:
156  * - \ref SCIP_STAGE_INITSOLVE
157  * - \ref SCIP_STAGE_SOLVING
158  */
159 extern
161  SCIP* scip /**< SCIP data structure */
162  );
163 
164 /** returns whether the NLP has a continuous variable in a nonlinear term
165  *
166  * @pre This method can be called if SCIP is in one of the following stages:
167  * - \ref SCIP_STAGE_INITSOLVE
168  * - \ref SCIP_STAGE_SOLVING
169  */
170 extern
172  SCIP* scip /**< SCIP data structure */
173  );
174 
175 /** gets current NLP variables along with the current number of NLP variables
176  *
177  * @pre This method can be called if SCIP is in one of the following stages:
178  * - \ref SCIP_STAGE_INITSOLVE
179  * - \ref SCIP_STAGE_SOLVING
180  */
181 extern
183  SCIP* scip, /**< SCIP data structure */
184  SCIP_VAR*** vars, /**< pointer to store the array of NLP variables, or NULL */
185  int* nvars /**< pointer to store the number of NLP variables, or NULL */
186  );
187 
188 /** gets array with variables of the NLP
189  *
190  * @pre This method can be called if SCIP is in one of the following stages:
191  * - \ref SCIP_STAGE_INITSOLVE
192  * - \ref SCIP_STAGE_SOLVING
193  */
194 extern
196  SCIP* scip /**< SCIP data structure */
197  );
198 
199 /** gets current number of variables in NLP
200  *
201  * @pre This method can be called if SCIP is in one of the following stages:
202  * - \ref SCIP_STAGE_INITSOLVE
203  * - \ref SCIP_STAGE_SOLVING
204  */
205 extern
206 int SCIPgetNNLPVars(
207  SCIP* scip /**< SCIP data structure */
208  );
209 
210 /** computes for each variables the number of NLP rows in which the variable appears in a nonlinear var
211  *
212  * @pre This method can be called if SCIP is in one of the following stages:
213  * - \ref SCIP_STAGE_INITSOLVE
214  * - \ref SCIP_STAGE_SOLVING
215  */
216 extern
218  SCIP* scip, /**< SCIP data structure */
219  int* nlcount /**< an array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables */
220  );
221 
222 /** returns dual solution values associated with lower bounds of NLP variables
223  *
224  * @pre This method can be called if SCIP is in one of the following stages:
225  * - \ref SCIP_STAGE_INITSOLVE
226  * - \ref SCIP_STAGE_SOLVING
227  */
228 extern
230  SCIP* scip /**< SCIP data structure */
231  );
232 
233 /** returns dual solution values associated with upper bounds of NLP variables
234  *
235  * @pre This method can be called if SCIP is in one of the following stages:
236  * - \ref SCIP_STAGE_INITSOLVE
237  * - \ref SCIP_STAGE_SOLVING
238  */
239 extern
241  SCIP* scip /**< SCIP data structure */
242  );
243 
244 /** gets current NLP nonlinear rows along with the current number of NLP nonlinear rows
245  *
246  * @pre This method can be called if SCIP is in one of the following stages:
247  * - \ref SCIP_STAGE_INITSOLVE
248  * - \ref SCIP_STAGE_SOLVING
249  */
250 extern
252  SCIP* scip, /**< SCIP data structure */
253  SCIP_NLROW*** nlrows, /**< pointer to store the array of NLP nonlinear rows, or NULL */
254  int* nnlrows /**< pointer to store the number of NLP nonlinear rows, or NULL */
255  );
256 
257 /** gets array with nonlinear rows of the NLP
258  *
259  * @pre This method can be called if SCIP is in one of the following stages:
260  * - \ref SCIP_STAGE_INITSOLVE
261  * - \ref SCIP_STAGE_SOLVING
262  */
263 extern
265  SCIP* scip /**< SCIP data structure */
266  );
267 
268 /** gets current number of nonlinear rows in NLP
269  *
270  * @pre This method can be called if SCIP is in one of the following stages:
271  * - \ref SCIP_STAGE_INITSOLVE
272  * - \ref SCIP_STAGE_SOLVING
273  */
274 extern
276  SCIP* scip /**< SCIP data structure */
277  );
278 
279 /** adds a nonlinear row to the NLP. This row is captured by the NLP.
280  *
281  * @pre This method can be called if SCIP is in one of the following stages:
282  * - \ref SCIP_STAGE_INITSOLVE
283  * - \ref SCIP_STAGE_SOLVING
284  */
285 extern
287  SCIP* scip, /**< SCIP data structure */
288  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
289  );
290 
291 /** makes sure that the NLP of the current node is flushed
292  *
293  * @pre This method can be called if SCIP is in one of the following stages:
294  * - \ref SCIP_STAGE_INITSOLVE
295  * - \ref SCIP_STAGE_SOLVING
296  */
297 extern
299  SCIP* scip /**< SCIP data structure */
300  );
301 
302 /** sets or clears initial primal guess for NLP solution (start point for NLP solver)
303  *
304  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
305  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
306  *
307  * @pre This method can be called if SCIP is in one of the following stages:
308  * - \ref SCIP_STAGE_INITSOLVE
309  * - \ref SCIP_STAGE_SOLVING
310  */
311 extern
313  SCIP* scip, /**< SCIP data structure */
314  SCIP_Real* initialguess /**< values of initial guess (corresponding to variables from SCIPgetNLPVarsData), or NULL to use no start point */
315  );
316 
317 /** sets initial primal guess for NLP solution (start point for NLP solver)
318  *
319  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
320  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
321  *
322  * @pre This method can be called if SCIP is in one of the following stages:
323  * - \ref SCIP_STAGE_INITSOLVE
324  * - \ref SCIP_STAGE_SOLVING
325  */
326 extern
328  SCIP* scip, /**< SCIP data structure */
329  SCIP_SOL* sol /**< solution which values should be taken as initial guess, or NULL for LP solution */
330  );
331 
332 /** solves the current NLP
333  *
334  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
335  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
336  *
337  * @pre This method can be called if SCIP is in one of the following stages:
338  * - \ref SCIP_STAGE_INITSOLVE
339  * - \ref SCIP_STAGE_SOLVING
340  */
341 extern
343  SCIP* scip /**< SCIP data structure */
344  );
345 
346 /** gets solution status of current NLP
347  *
348  * @pre This method can be called if SCIP is in one of the following stages:
349  * - \ref SCIP_STAGE_INITSOLVE
350  * - \ref SCIP_STAGE_SOLVING
351  */
352 extern
354  SCIP* scip /**< SCIP data structure */
355  );
356 
357 /** gets termination status of last NLP solve
358  *
359  * @pre This method can be called if SCIP is in one of the following stages:
360  * - \ref SCIP_STAGE_INITSOLVE
361  * - \ref SCIP_STAGE_SOLVING
362  */
363 extern
365  SCIP* scip /**< SCIP data structure */
366  );
367 
368 /** gives statistics (number of iterations, solving time, ...) of last NLP solve
369  *
370  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
371  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
372  *
373  * @pre This method can be called if SCIP is in one of the following stages:
374  * - \ref SCIP_STAGE_INITSOLVE
375  * - \ref SCIP_STAGE_SOLVING
376  */
377 extern
379  SCIP* scip, /**< SCIP data structure */
380  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
381  );
382 
383 /** gets objective value of current NLP
384  *
385  * @pre This method can be called if SCIP is in one of the following stages:
386  * - \ref SCIP_STAGE_INITSOLVE
387  * - \ref SCIP_STAGE_SOLVING
388  */
389 extern
391  SCIP* scip /**< SCIP data structure */
392  );
393 
394 /** indicates whether a feasible solution for the current NLP is available
395  * thus, returns whether the solution status <= feasible
396  *
397  * @pre This method can be called if SCIP is in one of the following stages:
398  * - \ref SCIP_STAGE_INITSOLVE
399  * - \ref SCIP_STAGE_SOLVING
400  */
401 extern
403  SCIP* scip /**< SCIP data structure */
404  );
405 
406 /** gets fractional variables of last NLP solution along with solution values and fractionalities
407  *
408  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
409  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
410  *
411  * @pre This method can be called if SCIP is in one of the following stages:
412  * - \ref SCIP_STAGE_INITSOLVE
413  * - \ref SCIP_STAGE_SOLVING
414  */
415 extern
417  SCIP* scip, /**< SCIP data structure */
418  SCIP_VAR*** fracvars, /**< pointer to store the array of NLP fractional variables, or NULL */
419  SCIP_Real** fracvarssol, /**< pointer to store the array of NLP fractional variables solution values, or NULL */
420  SCIP_Real** fracvarsfrac, /**< pointer to store the array of NLP fractional variables fractionalities, or NULL */
421  int* nfracvars, /**< pointer to store the number of NLP fractional variables , or NULL */
422  int* npriofracvars /**< pointer to store the number of NLP fractional variables with maximal branching priority, or NULL */
423  );
424 
425 /** gets integer parameter of NLP
426  *
427  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
428  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
429  *
430  * @pre This method can be called if SCIP is in one of the following stages:
431  * - \ref SCIP_STAGE_INITSOLVE
432  * - \ref SCIP_STAGE_SOLVING
433  */
434 extern
436  SCIP* scip, /**< SCIP data structure */
437  SCIP_NLPPARAM type, /**< parameter number */
438  int* ival /**< pointer to store the parameter value */
439  );
440 
441 /** sets integer parameter of NLP
442  *
443  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
444  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
445  *
446  * @pre This method can be called if SCIP is in one of the following stages:
447  * - \ref SCIP_STAGE_INITSOLVE
448  * - \ref SCIP_STAGE_SOLVING
449  */
450 extern
452  SCIP* scip, /**< SCIP data structure */
453  SCIP_NLPPARAM type, /**< parameter number */
454  int ival /**< parameter value */
455  );
456 
457 /** gets floating point parameter of NLP
458  *
459  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
460  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
461  *
462  * @pre This method can be called if SCIP is in one of the following stages:
463  * - \ref SCIP_STAGE_INITSOLVE
464  * - \ref SCIP_STAGE_SOLVING
465  */
466 extern
468  SCIP* scip, /**< SCIP data structure */
469  SCIP_NLPPARAM type, /**< parameter number */
470  SCIP_Real* dval /**< pointer to store the parameter value */
471  );
472 
473 /** sets floating point parameter of NLP
474  *
475  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
476  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
477  *
478  * @pre This method can be called if SCIP is in one of the following stages:
479  * - \ref SCIP_STAGE_INITSOLVE
480  * - \ref SCIP_STAGE_SOLVING
481  */
482 extern
484  SCIP* scip, /**< SCIP data structure */
485  SCIP_NLPPARAM type, /**< parameter number */
486  SCIP_Real dval /**< parameter value */
487  );
488 
489 /** gets string parameter of NLP
490  *
491  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
492  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
493  *
494  * @pre This method can be called if SCIP is in one of the following stages:
495  * - \ref SCIP_STAGE_INITSOLVE
496  * - \ref SCIP_STAGE_SOLVING
497  */
498 extern
500  SCIP* scip, /**< SCIP data structure */
501  SCIP_NLPPARAM type, /**< parameter number */
502  const char** sval /**< pointer to store the parameter value */
503  );
504 
505 /** sets string parameter of NLP
506  *
507  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
508  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
509  *
510  * @pre This method can be called if SCIP is in one of the following stages:
511  * - \ref SCIP_STAGE_INITSOLVE
512  * - \ref SCIP_STAGE_SOLVING
513  */
514 extern
516  SCIP* scip, /**< SCIP data structure */
517  SCIP_NLPPARAM type, /**< parameter number */
518  const char* sval /**< parameter value */
519  );
520 
521 /** writes current NLP to a file
522  *
523  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
524  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
525  *
526  * @pre This method can be called if SCIP is in one of the following stages:
527  * - \ref SCIP_STAGE_INITSOLVE
528  * - \ref SCIP_STAGE_SOLVING
529  */
530 extern
532  SCIP* scip, /**< SCIP data structure */
533  const char* filename /**< file name */
534  );
535 
536 /** gets the NLP interface and problem used by the SCIP NLP;
537  * with the NLPI and its problem you can use all of the methods defined in nlpi/nlpi.h;
538  *
539  * @warning You have to make sure, that the full internal state of the NLPI does not change or is recovered completely
540  * after the end of the method that uses the NLPI. In particular, if you manipulate the NLP or its solution
541  * (e.g. by calling one of the SCIPnlpiAdd...() or the SCIPnlpiSolve() method), you have to check in advance
542  * whether the NLP is currently solved. If this is the case, you have to make sure, the internal solution
543  * status is recovered completely at the end of your method. Additionally you have to resolve the NLP with
544  * SCIPnlpiSolve() in order to reinstall the internal solution status.
545  *
546  * @warning Make also sure, that all parameter values that you have changed are set back to their original values.
547  *
548  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
549  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
550  *
551  * @pre This method can be called if SCIP is in one of the following stages:
552  * - \ref SCIP_STAGE_INITSOLVE
553  * - \ref SCIP_STAGE_SOLVING
554  */
555 extern
557  SCIP* scip, /**< SCIP data structure */
558  SCIP_NLPI** nlpi, /**< pointer to store the NLP solver interface */
559  SCIP_NLPIPROBLEM** nlpiproblem /**< pointer to store the NLP solver interface problem */
560  );
561 
562 /**@} */
563 
564 /**@addtogroup PublicNLPDiveMethods
565  *
566  * @{ */
567 
568 /** initiates NLP diving making methods SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP(), SCIPchgVarsBoundsDiveNLP(), and SCIPsolveDiveNLP() available
569  *
570  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
571  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
572  *
573  * @pre This method can be called if SCIP is in one of the following stages:
574  * - \ref SCIP_STAGE_INITSOLVE
575  * - \ref SCIP_STAGE_SOLVING
576  */
577 extern
579  SCIP* scip /**< SCIP data structure */
580  );
581 
582 /** ends NLP diving
583  *
584  * Resets changes made by SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP(), and SCIPchgVarsBoundsDiveNLP().
585  *
586  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
587  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
588  *
589  * @pre This method can be called if SCIP is in one of the following stages:
590  * - \ref SCIP_STAGE_INITSOLVE
591  * - \ref SCIP_STAGE_SOLVING
592  */
593 extern
595  SCIP* scip /**< SCIP data structure */
596  );
597 
598 /** changes linear objective coefficient of a variable in diving NLP
599  *
600  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
601  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
602  *
603  * @pre This method can be called if SCIP is in one of the following stages:
604  * - \ref SCIP_STAGE_INITSOLVE
605  * - \ref SCIP_STAGE_SOLVING
606  */
607 extern
609  SCIP* scip, /**< SCIP data structure */
610  SCIP_VAR* var, /**< variable which coefficient to change */
611  SCIP_Real coef /**< new value for coefficient */
612  );
613 
614 /** changes bounds of a variable in diving NLP
615  *
616  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
617  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
618  *
619  * @pre This method can be called if SCIP is in one of the following stages:
620  * - \ref SCIP_STAGE_INITSOLVE
621  * - \ref SCIP_STAGE_SOLVING
622  */
623 extern
625  SCIP* scip, /**< SCIP data structure */
626  SCIP_VAR* var, /**< variable which bounds to change */
627  SCIP_Real lb, /**< new lower bound */
628  SCIP_Real ub /**< new upper bound */
629  );
630 
631 /** changes bounds of a set of variables in diving NLP
632  *
633  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
634  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
635  *
636  * @pre This method can be called if SCIP is in one of the following stages:
637  * - \ref SCIP_STAGE_INITSOLVE
638  * - \ref SCIP_STAGE_SOLVING
639  */
640 extern
642  SCIP* scip, /**< SCIP data structure */
643  int nvars, /**< number of variables which bounds to changes */
644  SCIP_VAR** vars, /**< variables which bounds to change */
645  SCIP_Real* lbs, /**< new lower bounds */
646  SCIP_Real* ubs /**< new upper bounds */
647  );
648 
649 /** solves diving NLP
650  *
651  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
652  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
653  *
654  * @pre This method can be called if SCIP is in one of the following stages:
655  * - \ref SCIP_STAGE_INITSOLVE
656  * - \ref SCIP_STAGE_SOLVING
657  */
658 extern
660  SCIP* scip /**< SCIP data structure */
661  );
662 
663 /**@} */
664 
665 /**@addtogroup PublicNLRowMethods
666  *
667  * @{
668  */
669 
670 /** creates and captures an NLP row
671  *
672  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
673  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
674  *
675  * @pre This method can be called if SCIP is in one of the following stages:
676  * - \ref SCIP_STAGE_PRESOLVED
677  * - \ref SCIP_STAGE_INITSOLVE
678  * - \ref SCIP_STAGE_SOLVING
679  */
680 extern
682  SCIP* scip, /**< SCIP data structure */
683  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
684  const char* name, /**< name of nonlinear row */
685  SCIP_Real constant, /**< constant */
686  int nlinvars, /**< number of linear variables */
687  SCIP_VAR** linvars, /**< linear variables, or NULL if nlinvars == 0 */
688  SCIP_Real* lincoefs, /**< linear coefficients, or NULL if nlinvars == 0 */
689  int nquadvars, /**< number of variables in quadratic term */
690  SCIP_VAR** quadvars, /**< variables in quadratic terms, or NULL if nquadvars == 0 */
691  int nquadelems, /**< number of elements in quadratic term */
692  SCIP_QUADELEM* quadelems, /**< elements (i.e., monomials) in quadratic term, or NULL if nquadelems == 0 */
693  SCIP_EXPRTREE* expression, /**< nonlinear expression, or NULL */
694  SCIP_Real lhs, /**< left hand side */
695  SCIP_Real rhs, /**< right hand side */
696  SCIP_EXPRCURV curvature /**< curvature of the nonlinear row */
697  );
698 
699 /** creates and captures an NLP nonlinear row without any coefficients
700  *
701  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
702  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
703  *
704  * @pre This method can be called if SCIP is in one of the following stages:
705  * - \ref SCIP_STAGE_PRESOLVED
706  * - \ref SCIP_STAGE_INITSOLVE
707  * - \ref SCIP_STAGE_SOLVING
708  */
709 extern
711  SCIP* scip, /**< SCIP data structure */
712  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
713  const char* name, /**< name of nonlinear row */
714  SCIP_Real lhs, /**< left hand side */
715  SCIP_Real rhs /**< right hand side */
716  );
717 
718 /** creates and captures an NLP row from a linear row
719  *
720  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
721  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
722  *
723  * @pre This method can be called if SCIP is in one of the following stages:
724  * - \ref SCIP_STAGE_PRESOLVED
725  * - \ref SCIP_STAGE_INITSOLVE
726  * - \ref SCIP_STAGE_SOLVING
727  */
728 extern
730  SCIP* scip, /**< SCIP data structure */
731  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
732  SCIP_ROW* row /**< the linear row to copy */
733  );
734 
735 /** increases usage counter of NLP nonlinear row
736  *
737  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
738  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
739  *
740  * @pre This method can be called if SCIP is in one of the following stages:
741  * - \ref SCIP_STAGE_PRESOLVED
742  * - \ref SCIP_STAGE_INITSOLVE
743  * - \ref SCIP_STAGE_SOLVING
744  */
745 extern
747  SCIP* scip, /**< SCIP data structure */
748  SCIP_NLROW* nlrow /**< nonlinear row to capture */
749  );
750 
751 /** decreases usage counter of NLP nonlinear row, and frees memory if necessary
752  *
753  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
754  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
755  *
756  * @pre This method can be called if SCIP is in one of the following stages:
757  * - \ref SCIP_STAGE_PRESOLVED
758  * - \ref SCIP_STAGE_INITSOLVE
759  * - \ref SCIP_STAGE_SOLVING
760  * - \ref SCIP_STAGE_EXITSOLVE
761  */
762 extern
764  SCIP* scip, /**< SCIP data structure */
765  SCIP_NLROW** nlrow /**< pointer to nonlinear row */
766  );
767 
768 /** changes left hand side of NLP nonlinear row
769  *
770  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
771  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
772  *
773  * @pre This method can be called if SCIP is in one of the following stages:
774  * - \ref SCIP_STAGE_PRESOLVED
775  * - \ref SCIP_STAGE_INITSOLVE
776  * - \ref SCIP_STAGE_SOLVING
777  */
778 extern
780  SCIP* scip, /**< SCIP data structure */
781  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
782  SCIP_Real lhs /**< new left hand side */
783  );
784 
785 /** changes right hand side of NLP nonlinear row
786  *
787  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
788  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
789  *
790  * @pre This method can be called if SCIP is in one of the following stages:
791  * - \ref SCIP_STAGE_PRESOLVED
792  * - \ref SCIP_STAGE_INITSOLVE
793  * - \ref SCIP_STAGE_SOLVING
794  */
795 extern
797  SCIP* scip, /**< SCIP data structure */
798  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
799  SCIP_Real rhs /**< new right hand side */
800  );
801 
802 /** changes constant of NLP nonlinear row
803  *
804  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
805  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
806  *
807  * @pre This method can be called if SCIP is in one of the following stages:
808  * - \ref SCIP_STAGE_PRESOLVED
809  * - \ref SCIP_STAGE_INITSOLVE
810  * - \ref SCIP_STAGE_SOLVING
811  */
812 extern
814  SCIP* scip, /**< SCIP data structure */
815  SCIP_NLROW* nlrow, /**< NLP row */
816  SCIP_Real constant /**< new value for constant */
817  );
818 
819 /** adds variable with a linear coefficient to the nonlinear row
820  *
821  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
822  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
823  *
824  * @pre This method can be called if SCIP is in one of the following stages:
825  * - \ref SCIP_STAGE_PRESOLVED
826  * - \ref SCIP_STAGE_INITSOLVE
827  * - \ref SCIP_STAGE_SOLVING
828  */
829 extern
831  SCIP* scip, /**< SCIP data structure */
832  SCIP_NLROW* nlrow, /**< NLP row */
833  SCIP_VAR* var, /**< problem variable */
834  SCIP_Real val /**< value of coefficient in linear part of row */
835  );
836 
837 /** adds variables with linear coefficients to the row
838  *
839  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
840  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
841  *
842  * @pre This method can be called if SCIP is in one of the following stages:
843  * - \ref SCIP_STAGE_PRESOLVED
844  * - \ref SCIP_STAGE_INITSOLVE
845  * - \ref SCIP_STAGE_SOLVING
846  */
847 extern
849  SCIP* scip, /**< SCIP data structure */
850  SCIP_NLROW* nlrow, /**< NLP row */
851  int nvars, /**< number of variables to add to the row */
852  SCIP_VAR** vars, /**< problem variables to add */
853  SCIP_Real* vals /**< values of coefficients in linear part of row */
854  );
855 
856 /** changes linear coefficient of a variables in a row
857  *
858  * Setting the coefficient to 0.0 means that it is removed from the row
859  * the variable does not need to exists before.
860  *
861  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
862  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
863  *
864  * @pre This method can be called if SCIP is in one of the following stages:
865  * - \ref SCIP_STAGE_PRESOLVED
866  * - \ref SCIP_STAGE_INITSOLVE
867  * - \ref SCIP_STAGE_SOLVING
868  */
869 extern
871  SCIP* scip, /**< SCIP data structure */
872  SCIP_NLROW* nlrow, /**< NLP row */
873  SCIP_VAR* var, /**< variable */
874  SCIP_Real coef /**< new value of coefficient */
875  );
876 
877 /** adds quadratic variable to the nonlinear row
878  *
879  * After adding a quadratic variable, it can be used to add quadratic elements.
880  *
881  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
882  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
883  *
884  * @pre This method can be called if SCIP is in one of the following stages:
885  * - \ref SCIP_STAGE_PRESOLVED
886  * - \ref SCIP_STAGE_INITSOLVE
887  * - \ref SCIP_STAGE_SOLVING
888  */
889 extern
891  SCIP* scip, /**< SCIP data structure */
892  SCIP_NLROW* nlrow, /**< NLP row */
893  SCIP_VAR* var /**< problem variable */
894  );
895 
896 /** adds quadratic variables to the nonlinear row
897  *
898  * After adding quadratic variables, they can be used to add quadratic elements.
899  *
900  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
901  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
902  *
903  * @pre This method can be called if SCIP is in one of the following stages:
904  * - \ref SCIP_STAGE_PRESOLVED
905  * - \ref SCIP_STAGE_INITSOLVE
906  * - \ref SCIP_STAGE_SOLVING
907  */
908 extern
910  SCIP* scip, /**< SCIP data structure */
911  SCIP_NLROW* nlrow, /**< NLP row */
912  int nvars, /**< number of problem variables */
913  SCIP_VAR** vars /**< problem variables */
914  );
915 
916 /** add a quadratic element to the nonlinear row
917  *
918  * Variable indices of the quadratic element need to be relative to quadratic variables array of row.
919  *
920  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
921  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
922  *
923  * @pre This method can be called if SCIP is in one of the following stages:
924  * - \ref SCIP_STAGE_PRESOLVED
925  * - \ref SCIP_STAGE_INITSOLVE
926  * - \ref SCIP_STAGE_SOLVING
927  */
928 extern
930  SCIP* scip, /**< SCIP data structure */
931  SCIP_NLROW* nlrow, /**< NLP row */
932  SCIP_QUADELEM quadelem /**< quadratic element */
933  );
934 
935 /** adds quadratic elements to the nonlinear row
936  *
937  * Variable indices of the quadratic elements need to be relative to quadratic variables array of row.
938  *
939  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
940  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
941  *
942  * @pre This method can be called if SCIP is in one of the following stages:
943  * - \ref SCIP_STAGE_PRESOLVED
944  * - \ref SCIP_STAGE_INITSOLVE
945  * - \ref SCIP_STAGE_SOLVING
946  */
947 extern
949  SCIP* scip, /**< SCIP data structure */
950  SCIP_NLROW* nlrow, /**< NLP row */
951  int nquadelems, /**< number of quadratic elements */
952  SCIP_QUADELEM* quadelems /**< quadratic elements */
953  );
954 
955 /** changes coefficient in quadratic part of a row
956  *
957  * Setting the coefficient in the quadelement to 0.0 means that it is removed from the row
958  * the element does not need to exists before.
959  *
960  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
961  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
962  *
963  * @pre This method can be called if SCIP is in one of the following stages:
964  * - \ref SCIP_STAGE_PRESOLVED
965  * - \ref SCIP_STAGE_INITSOLVE
966  * - \ref SCIP_STAGE_SOLVING
967  */
968 extern
970  SCIP* scip, /**< SCIP data structure */
971  SCIP_NLROW* nlrow, /**< NLP row */
972  SCIP_QUADELEM quadelement /**< new quadratic element, or update for existing one */
973  );
974 
975 /** sets or deletes expression tree in the nonlinear row
976  *
977  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
978  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
979  *
980  * @pre This method can be called if SCIP is in one of the following stages:
981  * - \ref SCIP_STAGE_PRESOLVED
982  * - \ref SCIP_STAGE_INITSOLVE
983  * - \ref SCIP_STAGE_SOLVING
984  */
985 extern
987  SCIP* scip, /**< SCIP data structure */
988  SCIP_NLROW* nlrow, /**< NLP row */
989  SCIP_EXPRTREE* exprtree /**< expression tree, or NULL */
990  );
991 
992 /** sets a parameter of expression tree in the nonlinear row
993  *
994  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
995  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
996  *
997  * @pre This method can be called if SCIP is in one of the following stages:
998  * - \ref SCIP_STAGE_PRESOLVED
999  * - \ref SCIP_STAGE_INITSOLVE
1000  * - \ref SCIP_STAGE_SOLVING
1001  */
1002 extern
1004  SCIP* scip, /**< SCIP data structure */
1005  SCIP_NLROW* nlrow, /**< NLP row */
1006  int paramidx, /**< index of parameter in expression tree */
1007  SCIP_Real paramval /**< new value of parameter in expression tree */
1008  );
1009 
1010 /** sets parameters of expression tree in the nonlinear row
1011  *
1012  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1013  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1014  *
1015  * @pre This method can be called if SCIP is in one of the following stages:
1016  * - \ref SCIP_STAGE_PRESOLVED
1017  * - \ref SCIP_STAGE_INITSOLVE
1018  * - \ref SCIP_STAGE_SOLVING
1019  */
1020 extern
1022  SCIP* scip, /**< SCIP data structure */
1023  SCIP_NLROW* nlrow, /**< NLP row */
1024  SCIP_Real* paramvals /**< new values of parameter in expression tree */
1025  );
1026 
1027 /** recalculates the activity of a nonlinear row in the last NLP solution
1028  *
1029  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1030  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1031  *
1032  * @pre This method can be called if SCIP is in one of the following stages:
1033  * - \ref SCIP_STAGE_PRESOLVED
1034  * - \ref SCIP_STAGE_INITSOLVE
1035  * - \ref SCIP_STAGE_SOLVING
1036  */
1037 extern
1039  SCIP* scip, /**< SCIP data structure */
1040  SCIP_NLROW* nlrow /**< NLP nonlinear row */
1041  );
1042 
1043 /** returns the activity of a nonlinear row in the last NLP solution
1044  *
1045  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1046  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1047  *
1048  * @pre This method can be called if SCIP is in one of the following stages:
1049  * - \ref SCIP_STAGE_INITSOLVE
1050  * - \ref SCIP_STAGE_SOLVING
1051  */
1052 extern
1054  SCIP* scip, /**< SCIP data structure */
1055  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1056  SCIP_Real* activity /**< pointer to store activity value */
1057  );
1058 
1059 /** gives the feasibility of a nonlinear row in the last NLP solution: negative value means infeasibility
1060  *
1061  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1062  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1063  *
1064  * @pre This method can be called if SCIP is in one of the following stages:
1065  * - \ref SCIP_STAGE_INITSOLVE
1066  * - \ref SCIP_STAGE_SOLVING
1067  */
1068 extern
1070  SCIP* scip, /**< SCIP data structure */
1071  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1072  SCIP_Real* feasibility /**< pointer to store feasibility value */
1073  );
1074 
1075 /** recalculates the activity of a nonlinear row for the current pseudo solution
1076  *
1077  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1078  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1079  *
1080  * @pre This method can be called if SCIP is in one of the following stages:
1081  * - \ref SCIP_STAGE_INITSOLVE
1082  * - \ref SCIP_STAGE_SOLVING
1083  */
1084 extern
1086  SCIP* scip, /**< SCIP data structure */
1087  SCIP_NLROW* nlrow /**< NLP nonlinear row */
1088  );
1089 
1090 /** gives the activity of a nonlinear row for the current pseudo solution
1091  *
1092  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1093  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1094  *
1095  * @pre This method can be called if SCIP is in one of the following stages:
1096  * - \ref SCIP_STAGE_INITSOLVE
1097  * - \ref SCIP_STAGE_SOLVING
1098  */
1099 extern
1101  SCIP* scip, /**< SCIP data structure */
1102  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1103  SCIP_Real* pseudoactivity /**< pointer to store pseudo activity value */
1104  );
1105 
1106 /** gives the feasibility of a nonlinear row for the current pseudo solution: negative value means infeasibility
1107  *
1108  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1109  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1110  *
1111  * @pre This method can be called if SCIP is in one of the following stages:
1112  * - \ref SCIP_STAGE_INITSOLVE
1113  * - \ref SCIP_STAGE_SOLVING
1114  */
1115 extern
1117  SCIP* scip, /**< SCIP data structure */
1118  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1119  SCIP_Real* pseudofeasibility /**< pointer to store pseudo feasibility value */
1120  );
1121 
1122 /** recalculates the activity of a nonlinear row in the last NLP or pseudo solution
1123  *
1124  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1125  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1126  *
1127  * @pre This method can be called if SCIP is in one of the following stages:
1128  * - \ref SCIP_STAGE_INITSOLVE
1129  * - \ref SCIP_STAGE_SOLVING
1130  */
1131 extern
1133  SCIP* scip, /**< SCIP data structure */
1134  SCIP_NLROW* nlrow /**< NLP nonlinear row */
1135  );
1136 
1137 /** gives the activity of a nonlinear row in the last NLP or pseudo solution
1138  *
1139  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1140  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1141  *
1142  * @pre This method can be called if SCIP is in one of the following stages:
1143  * - \ref SCIP_STAGE_INITSOLVE
1144  * - \ref SCIP_STAGE_SOLVING
1145  */
1146 extern
1148  SCIP* scip, /**< SCIP data structure */
1149  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1150  SCIP_Real* activity /**< pointer to store activity value */
1151  );
1152 
1153 /** gives the feasibility of a nonlinear row in the last NLP or pseudo solution
1154  *
1155  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1156  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1157  *
1158  * @pre This method can be called if SCIP is in one of the following stages:
1159  * - \ref SCIP_STAGE_INITSOLVE
1160  * - \ref SCIP_STAGE_SOLVING
1161  */
1162 extern
1164  SCIP* scip, /**< SCIP data structure */
1165  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1166  SCIP_Real* feasibility /**< pointer to store feasibility value */
1167  );
1168 
1169 /** gives the activity of a nonlinear row for the given primal solution or NLP solution or pseudo solution
1170  *
1171  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1172  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1173  *
1174  * @pre This method can be called if SCIP is in one of the following stages:
1175  * - \ref SCIP_STAGE_INITSOLVE
1176  * - \ref SCIP_STAGE_SOLVING
1177  */
1178 extern
1180  SCIP* scip, /**< SCIP data structure */
1181  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1182  SCIP_SOL* sol, /**< primal CIP solution, or NULL for NLP solution of pseudo solution */
1183  SCIP_Real* activity /**< pointer to store activity value */
1184  );
1185 
1186 /** gives the feasibility of a nonlinear row for the given primal solution
1187  *
1188  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1189  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1190  *
1191  * @pre This method can be called if SCIP is in one of the following stages:
1192  * - \ref SCIP_STAGE_INITSOLVE
1193  * - \ref SCIP_STAGE_SOLVING
1194  */
1195 extern
1197  SCIP* scip, /**< SCIP data structure */
1198  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1199  SCIP_SOL* sol, /**< primal CIP solution */
1200  SCIP_Real* feasibility /**< pointer to store feasibility value */
1201  );
1202 
1203 /** gives the minimal and maximal activity of a nonlinear row w.r.t. the variable's bounds
1204  *
1205  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1206  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1207  *
1208  * @pre This method can be called if SCIP is in one of the following stages:
1209  * - \ref SCIP_STAGE_PRESOLVED
1210  * - \ref SCIP_STAGE_INITSOLVE
1211  * - \ref SCIP_STAGE_SOLVING
1212  */
1213 extern
1215  SCIP* scip, /**< SCIP data structure */
1216  SCIP_NLROW* nlrow, /**< NLP row */
1217  SCIP_Real* minactivity, /**< buffer to store minimal activity, or NULL */
1218  SCIP_Real* maxactivity /**< buffer to store maximal activity, or NULL */
1219  );
1220 
1221 /** output nonlinear row to file stream
1222  *
1223  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1224  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1225  *
1226  * @pre This method can be called if SCIP is in one of the following stages:
1227  * - \ref SCIP_STAGE_PRESOLVED
1228  * - \ref SCIP_STAGE_INITSOLVE
1229  * - \ref SCIP_STAGE_SOLVING
1230  */
1231 extern
1233  SCIP* scip, /**< SCIP data structure */
1234  SCIP_NLROW* nlrow, /**< NLP row */
1235  FILE* file /**< output file (or NULL for standard output) */
1236  );
1237 
1238 /**@} */
1239 
1240 #ifdef __cplusplus
1241 }
1242 #endif
1243 
1244 #endif
SCIP_RETCODE SCIPaddLinearCoefsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_nlp.c:1465
int SCIPgetNNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:513
SCIP_RETCODE SCIPgetNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudoactivity)
Definition: scip_nlp.c:1856
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition: type_nlpi.h:84
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
Definition: scip_nlp.c:284
SCIP_VAR ** SCIPgetNLPVars(SCIP *scip)
Definition: scip_nlp.c:351
SCIP_RETCODE SCIPgetNLPIntPar(SCIP *scip, SCIP_NLPPARAM type, int *ival)
Definition: scip_nlp.c:818
internal methods for branch and bound tree
type definitions for NLP management
SCIP_RETCODE SCIPgetNLPNlRowsData(SCIP *scip, SCIP_NLROW ***nlrows, int *nnlrows)
Definition: scip_nlp.c:463
SCIP_Real * SCIPgetNLPVarsUbDualsol(SCIP *scip)
Definition: scip_nlp.c:441
SCIP_RETCODE SCIPchgNlRowRhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real rhs)
Definition: scip_nlp.c:1395
SCIP_NLPSOLSTAT SCIPgetNLPSolstat(SCIP *scip)
Definition: scip_nlp.c:667
SCIP_RETCODE SCIPsetNlRowExprtreeParam(SCIP *scip, SCIP_NLROW *nlrow, int paramidx, SCIP_Real paramval)
Definition: scip_nlp.c:1705
SCIP_RETCODE SCIPchgVarObjDiveNLP(SCIP *scip, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:1117
SCIP_RETCODE SCIPsetNlRowExprtree(SCIP *scip, SCIP_NLROW *nlrow, SCIP_EXPRTREE *exprtree)
Definition: scip_nlp.c:1679
SCIP_RETCODE SCIPchgNlRowLinearCoef(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:1502
SCIP_Bool SCIPhasNLPContinuousNonlinearity(SCIP *scip)
Definition: scip_nlp.c:299
SCIP_RETCODE SCIPaddQuadElementToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_QUADELEM quadelem)
Definition: scip_nlp.c:1589
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPsolveNLP(SCIP *scip)
Definition: scip_nlp.c:644
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPgetNlRowSolActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Real *activity)
Definition: scip_nlp.c:1986
SCIP_RETCODE SCIPgetNLPVarsNonlinearity(SCIP *scip, int *nlcount)
Definition: scip_nlp.c:395
SCIP_RETCODE SCIPflushNLP(SCIP *scip)
Definition: scip_nlp.c:559
enum SCIP_NlpParam SCIP_NLPPARAM
Definition: type_nlpi.h:56
SCIP_RETCODE SCIPsetNLPIntPar(SCIP *scip, SCIP_NLPPARAM type, int ival)
Definition: scip_nlp.c:846
SCIP_RETCODE SCIPsetNLPStringPar(SCIP *scip, SCIP_NLPPARAM type, const char *sval)
Definition: scip_nlp.c:958
SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
Definition: scip_nlp.c:1441
SCIP_NLROW ** SCIPgetNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:491
SCIP_RETCODE SCIPcreateNlRowFromRow(SCIP *scip, SCIP_NLROW **nlrow, SCIP_ROW *row)
Definition: scip_nlp.c:1304
type definitions for LP management
int SCIPgetNNLPVars(SCIP *scip)
Definition: scip_nlp.c:373
SCIP_NLPTERMSTAT SCIPgetNLPTermstat(SCIP *scip)
Definition: scip_nlp.c:689
SCIP_RETCODE SCIPsetNlRowExprtreeParams(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *paramvals)
Definition: scip_nlp.c:1729
SCIP_RETCODE SCIPsolveDiveNLP(SCIP *scip)
Definition: scip_nlp.c:1208
SCIP_RETCODE SCIPchgNlRowQuadElement(SCIP *scip, SCIP_NLROW *nlrow, SCIP_QUADELEM quadelement)
Definition: scip_nlp.c:1656
SCIP_RETCODE SCIPrecalcNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1835
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:535
SCIP_RETCODE SCIPwriteNLP(SCIP *scip, const char *filename)
Definition: scip_nlp.c:986
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition: type_nlpi.h:69
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
Definition: scip_nlp.c:1350
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPchgVarBoundsDiveNLP(SCIP *scip, SCIP_VAR *var, SCIP_Real lb, SCIP_Real ub)
Definition: scip_nlp.c:1147
SCIP_RETCODE SCIPgetNLPRealPar(SCIP *scip, SCIP_NLPPARAM type, SCIP_Real *dval)
Definition: scip_nlp.c:874
SCIP_RETCODE SCIPgetNlRowActivityBounds(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *minactivity, SCIP_Real *maxactivity)
Definition: scip_nlp.c:2055
SCIP_Bool SCIPisNLPEnabled(SCIP *scip)
Definition: scip_nlp.c:246
internal miscellaneous methods
SCIP_RETCODE SCIPsetNLPInitialGuess(SCIP *scip, SCIP_Real *initialguess)
Definition: scip_nlp.c:585
int SCIPgetNNlpis(SCIP *scip)
Definition: scip_nlp.c:206
SCIP_RETCODE SCIPsetNLPInitialGuessSol(SCIP *scip, SCIP_SOL *sol)
Definition: scip_nlp.c:612
internal methods for global SCIP settings
SCIP_RETCODE SCIPgetNLPI(SCIP *scip, SCIP_NLPI **nlpi, SCIP_NLPIPROBLEM **nlpiproblem)
Definition: scip_nlp.c:1023
SCIP_RETCODE SCIPrecalcNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1900
SCIP main data structure.
type definitions for problem variables
SCIP_RETCODE SCIPgetNLPStringPar(SCIP *scip, SCIP_NLPPARAM type, const char **sval)
Definition: scip_nlp.c:930
SCIP_RETCODE SCIPchgNlRowLhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real lhs)
Definition: scip_nlp.c:1372
internal methods for problem variables
SCIP_RETCODE SCIPsetNLPRealPar(SCIP *scip, SCIP_NLPPARAM type, SCIP_Real dval)
Definition: scip_nlp.c:902
SCIP_RETCODE SCIPgetNlRowFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1957
SCIP_RETCODE SCIPincludeNlpi(SCIP *scip, SCIP_NLPI *nlpi)
Definition: scip_nlp.c:144
#define SCIP_Bool
Definition: def.h:69
SCIP_RETCODE SCIPgetNLPStatistics(SCIP *scip, SCIP_NLPSTATISTICS *statistics)
Definition: scip_nlp.c:714
SCIP_RETCODE SCIPchgNlRowConstant(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real constant)
Definition: scip_nlp.c:1418
SCIP_RETCODE SCIPrecalcNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1752
SCIP_RETCODE SCIPgetNLPVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars)
Definition: scip_nlp.c:321
SCIP_RETCODE SCIPchgVarsBoundsDiveNLP(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *lbs, SCIP_Real *ubs)
Definition: scip_nlp.c:1178
SCIP_RETCODE SCIPgetNlRowPseudoFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudofeasibility)
Definition: scip_nlp.c:1878
SCIP_RETCODE SCIPgetNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1928
methods for debugging
SCIP_RETCODE SCIPcreateEmptyNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real lhs, SCIP_Real rhs)
Definition: scip_nlp.c:1278
SCIP_RETCODE SCIPcaptureNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1327
datastructures for problem statistics
SCIP_Real * SCIPgetNLPVarsLbDualsol(SCIP *scip)
Definition: scip_nlp.c:419
type definitions for storing primal CIP solutions
void SCIPenableNLP(SCIP *scip)
Definition: scip_nlp.c:269
SCIP_Bool SCIPhasNLPSolution(SCIP *scip)
Definition: scip_nlp.c:762
enum SCIP_ExprCurv SCIP_EXPRCURV
Definition: type_expr.h:95
SCIP_RETCODE SCIPaddQuadVarToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var)
Definition: scip_nlp.c:1530
SCIP_RETCODE SCIPaddQuadVarsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nvars, SCIP_VAR **vars)
Definition: scip_nlp.c:1555
SCIP_RETCODE SCIPgetNlRowSolFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Real *feasibility)
Definition: scip_nlp.c:2020
SCIP_NLPI * SCIPfindNlpi(SCIP *scip, const char *name)
Definition: scip_nlp.c:180
internal methods for main solving loop and node processing
SCIP_RETCODE SCIPendDiveNLP(SCIP *scip)
Definition: scip_nlp.c:1091
type definitions for expressions and expression trees
SCIP_RETCODE SCIPgetNLPFracVars(SCIP *scip, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
Definition: scip_nlp.c:787
#define SCIP_Real
Definition: def.h:157
SCIP_RETCODE SCIPgetNlRowNLPFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1807
internal methods for constraints and constraint handlers
SCIP_RETCODE SCIPprintNlRow(SCIP *scip, SCIP_NLROW *nlrow, FILE *file)
Definition: scip_nlp.c:2079
SCIP_RETCODE SCIPsetNlpiPriority(SCIP *scip, SCIP_NLPI *nlpi, int priority)
Definition: scip_nlp.c:217
SCIP_Real SCIPgetNLPObjval(SCIP *scip)
Definition: scip_nlp.c:738
SCIP_RETCODE SCIPstartDiveNLP(SCIP *scip)
Definition: scip_nlp.c:1063
SCIP_NLPI ** SCIPgetNlpis(SCIP *scip)
Definition: scip_nlp.c:193
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadvars, SCIP_VAR **quadvars, int nquadelems, SCIP_QUADELEM *quadelems, SCIP_EXPRTREE *expression, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
Definition: scip_nlp.c:1242
SCIP_RETCODE SCIPgetNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1779
SCIP_RETCODE SCIPaddQuadElementsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nquadelems, SCIP_QUADELEM *quadelems)
Definition: scip_nlp.c:1618
type definitions for specific NLP solver interfaces