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-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file 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 Leona 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 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /**@addtogroup PublicNLPInterfaceMethods
50  *
51  * @{
52  */
53 
54 /** includes an NLPI in SCIP */
57  SCIP* scip, /**< SCIP data structure */
58  SCIP_NLPI* nlpi /**< NLPI data structure */
59  );
60 
61 /** returns the NLPI of the given name, or NULL if not existing */
64  SCIP* scip, /**< SCIP data structure */
65  const char* name /**< name of NLPI */
66  );
67 
68 /** returns the array of currently available NLPIs (sorted by priority) */
71  SCIP* scip /**< SCIP data structure */
72  );
73 
74 /** returns the number of currently available NLPIs */
76 int SCIPgetNNlpis(
77  SCIP* scip /**< SCIP data structure */
78  );
79 
80 /** sets the priority of an NLPI */
83  SCIP* scip, /**< SCIP data structure */
84  SCIP_NLPI* nlpi, /**< NLPI */
85  int priority /**< new priority of the NLPI */
86  );
87 
88 /** @} */
89 
90 /**@addtogroup PublicNLPMethods
91  *
92  * @{
93  */
94 
95 /** returns whether the NLP relaxation has been enabled
96  *
97  * If the NLP relaxation is enabled, then SCIP will construct the NLP relaxation when the solving process is about to begin.
98  * To check whether an NLP is existing, use SCIPisNLPConstructed().
99  *
100  * @pre This method can be called if SCIP is in one of the following stages:
101  * - \ref SCIP_STAGE_INITPRESOLVE
102  * - \ref SCIP_STAGE_PRESOLVING
103  * - \ref SCIP_STAGE_EXITPRESOLVE
104  * - \ref SCIP_STAGE_PRESOLVED
105  * - \ref SCIP_STAGE_INITSOLVE
106  * - \ref SCIP_STAGE_SOLVING
107  *
108  * @see SCIPenableNLP
109  */
112  SCIP* scip /**< SCIP data structure */
113  );
114 
115 /** marks that there are constraints that are representable by nonlinear rows
116  *
117  * This method should be called by a constraint handler if it has constraints that have a representation as nonlinear rows.
118  *
119  * The function should be called before the branch-and-bound process is initialized, e.g., when presolve is exiting.
120  *
121  * @pre This method can be called if SCIP is in one of the following stages:
122  * - \ref SCIP_STAGE_INITPRESOLVE
123  * - \ref SCIP_STAGE_PRESOLVING
124  * - \ref SCIP_STAGE_EXITPRESOLVE
125  * - \ref SCIP_STAGE_PRESOLVED
126  * - \ref SCIP_STAGE_INITSOLVE
127  * - \ref SCIP_STAGE_SOLVING
128  */
130 void SCIPenableNLP(
131  SCIP* scip /**< SCIP data structure */
132  );
133 
134 /** returns, whether an NLP has been constructed
135  *
136  * @pre This method can be called if SCIP is in one of the following stages:
137  * - \ref SCIP_STAGE_INITSOLVE
138  * - \ref SCIP_STAGE_SOLVING
139  */
142  SCIP* scip /**< SCIP data structure */
143  );
144 
145 /** returns whether the NLP has a continuous variable in a nonlinear term
146  *
147  * @pre This method can be called if SCIP is in one of the following stages:
148  * - \ref SCIP_STAGE_INITSOLVE
149  * - \ref SCIP_STAGE_SOLVING
150  */
153  SCIP* scip /**< SCIP data structure */
154  );
155 
156 /** gets current NLP variables along with the current number of NLP variables
157  *
158  * @pre This method can be called if SCIP is in one of the following stages:
159  * - \ref SCIP_STAGE_INITSOLVE
160  * - \ref SCIP_STAGE_SOLVING
161  */
164  SCIP* scip, /**< SCIP data structure */
165  SCIP_VAR*** vars, /**< pointer to store the array of NLP variables, or NULL */
166  int* nvars /**< pointer to store the number of NLP variables, or NULL */
167  );
168 
169 /** gets array with variables of the NLP
170  *
171  * @pre This method can be called if SCIP is in one of the following stages:
172  * - \ref SCIP_STAGE_INITSOLVE
173  * - \ref SCIP_STAGE_SOLVING
174  */
177  SCIP* scip /**< SCIP data structure */
178  );
179 
180 /** gets current number of variables in NLP
181  *
182  * @pre This method can be called if SCIP is in one of the following stages:
183  * - \ref SCIP_STAGE_INITSOLVE
184  * - \ref SCIP_STAGE_SOLVING
185  */
187 int SCIPgetNNLPVars(
188  SCIP* scip /**< SCIP data structure */
189  );
190 
191 /** computes for each variables the number of NLP rows in which the variable appears in a nonlinear var
192  *
193  * @pre This method can be called if SCIP is in one of the following stages:
194  * - \ref SCIP_STAGE_INITSOLVE
195  * - \ref SCIP_STAGE_SOLVING
196  */
199  SCIP* scip, /**< SCIP data structure */
200  int* nlcount /**< an array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables */
201  );
202 
203 /** returns dual solution values associated with lower bounds of NLP variables
204  *
205  * @pre This method can be called if SCIP is in one of the following stages:
206  * - \ref SCIP_STAGE_INITSOLVE
207  * - \ref SCIP_STAGE_SOLVING
208  */
211  SCIP* scip /**< SCIP data structure */
212  );
213 
214 /** returns dual solution values associated with upper bounds of NLP variables
215  *
216  * @pre This method can be called if SCIP is in one of the following stages:
217  * - \ref SCIP_STAGE_INITSOLVE
218  * - \ref SCIP_STAGE_SOLVING
219  */
222  SCIP* scip /**< SCIP data structure */
223  );
224 
225 /** gets current NLP nonlinear rows along with the current number of NLP nonlinear rows
226  *
227  * @pre This method can be called if SCIP is in one of the following stages:
228  * - \ref SCIP_STAGE_INITSOLVE
229  * - \ref SCIP_STAGE_SOLVING
230  */
233  SCIP* scip, /**< SCIP data structure */
234  SCIP_NLROW*** nlrows, /**< pointer to store the array of NLP nonlinear rows, or NULL */
235  int* nnlrows /**< pointer to store the number of NLP nonlinear rows, or NULL */
236  );
237 
238 /** gets array with nonlinear rows of the NLP
239  *
240  * @pre This method can be called if SCIP is in one of the following stages:
241  * - \ref SCIP_STAGE_INITSOLVE
242  * - \ref SCIP_STAGE_SOLVING
243  */
246  SCIP* scip /**< SCIP data structure */
247  );
248 
249 /** gets current number of nonlinear rows in NLP
250  *
251  * @pre This method can be called if SCIP is in one of the following stages:
252  * - \ref SCIP_STAGE_INITSOLVE
253  * - \ref SCIP_STAGE_SOLVING
254  */
257  SCIP* scip /**< SCIP data structure */
258  );
259 
260 /** adds a nonlinear row to the NLP. This row is captured by the NLP.
261  *
262  * @pre This method can be called if SCIP is in one of the following stages:
263  * - \ref SCIP_STAGE_INITSOLVE
264  * - \ref SCIP_STAGE_SOLVING
265  */
268  SCIP* scip, /**< SCIP data structure */
269  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
270  );
271 
272 /** removes a nonlinear row from the NLP. This row is released in the NLP.
273  *
274  * @pre This method can be called if SCIP is in one of the following stages:
275  * - \ref SCIP_STAGE_INITSOLVE
276  * - \ref SCIP_STAGE_SOLVING
277  * - \ref SCIP_STAGE_SOLVED
278  * - \ref SCIP_STAGE_EXITSOLVE
279  */
282  SCIP* scip, /**< SCIP data structure */
283  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
284  );
285 
286 /** makes sure that the NLP of the current node is flushed
287  *
288  * @pre This method can be called if SCIP is in one of the following stages:
289  * - \ref SCIP_STAGE_INITSOLVE
290  * - \ref SCIP_STAGE_SOLVING
291  */
294  SCIP* scip /**< SCIP data structure */
295  );
296 
297 /** sets or clears initial primal guess for NLP solution (start point for NLP solver)
298  *
299  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
300  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
301  *
302  * @pre This method can be called if SCIP is in one of the following stages:
303  * - \ref SCIP_STAGE_INITSOLVE
304  * - \ref SCIP_STAGE_SOLVING
305  */
308  SCIP* scip, /**< SCIP data structure */
309  SCIP_Real* initialguess /**< values of initial guess (corresponding to variables from SCIPgetNLPVarsData), or NULL to use no start point */
310  );
311 
312 /** sets initial primal guess for NLP solution (start point for NLP solver)
313  *
314  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
315  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
316  *
317  * @pre This method can be called if SCIP is in one of the following stages:
318  * - \ref SCIP_STAGE_INITSOLVE
319  * - \ref SCIP_STAGE_SOLVING
320  */
323  SCIP* scip, /**< SCIP data structure */
324  SCIP_SOL* sol /**< solution which values should be taken as initial guess, or NULL for LP solution */
325  );
326 
327 /** solves the current NLP
328  *
329  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
330  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
331  *
332  * @pre This method can be called if SCIP is in one of the following stages:
333  * - \ref SCIP_STAGE_INITSOLVE
334  * - \ref SCIP_STAGE_SOLVING
335  */
338  SCIP* scip /**< SCIP data structure */
339  );
340 
341 /** gets solution status of current NLP
342  *
343  * @pre This method can be called if SCIP is in one of the following stages:
344  * - \ref SCIP_STAGE_INITSOLVE
345  * - \ref SCIP_STAGE_SOLVING
346  */
349  SCIP* scip /**< SCIP data structure */
350  );
351 
352 /** gets termination status of last NLP solve
353  *
354  * @pre This method can be called if SCIP is in one of the following stages:
355  * - \ref SCIP_STAGE_INITSOLVE
356  * - \ref SCIP_STAGE_SOLVING
357  */
360  SCIP* scip /**< SCIP data structure */
361  );
362 
363 /** gives statistics (number of iterations, solving time, ...) of last NLP solve
364  *
365  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
366  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
367  *
368  * @pre This method can be called if SCIP is in one of the following stages:
369  * - \ref SCIP_STAGE_INITSOLVE
370  * - \ref SCIP_STAGE_SOLVING
371  */
374  SCIP* scip, /**< SCIP data structure */
375  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
376  );
377 
378 /** gets objective value of current NLP
379  *
380  * @pre This method can be called if SCIP is in one of the following stages:
381  * - \ref SCIP_STAGE_INITSOLVE
382  * - \ref SCIP_STAGE_SOLVING
383  */
386  SCIP* scip /**< SCIP data structure */
387  );
388 
389 /** indicates whether a feasible solution for the current NLP is available
390  * thus, returns whether the solution status <= feasible
391  *
392  * @pre This method can be called if SCIP is in one of the following stages:
393  * - \ref SCIP_STAGE_INITSOLVE
394  * - \ref SCIP_STAGE_SOLVING
395  */
398  SCIP* scip /**< SCIP data structure */
399  );
400 
401 /** gets fractional variables of last NLP solution along with solution values and fractionalities
402  *
403  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
404  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
405  *
406  * @pre This method can be called if SCIP is in one of the following stages:
407  * - \ref SCIP_STAGE_INITSOLVE
408  * - \ref SCIP_STAGE_SOLVING
409  */
412  SCIP* scip, /**< SCIP data structure */
413  SCIP_VAR*** fracvars, /**< pointer to store the array of NLP fractional variables, or NULL */
414  SCIP_Real** fracvarssol, /**< pointer to store the array of NLP fractional variables solution values, or NULL */
415  SCIP_Real** fracvarsfrac, /**< pointer to store the array of NLP fractional variables fractionalities, or NULL */
416  int* nfracvars, /**< pointer to store the number of NLP fractional variables , or NULL */
417  int* npriofracvars /**< pointer to store the number of NLP fractional variables with maximal branching priority, or NULL */
418  );
419 
420 /** gets integer parameter of NLP
421  *
422  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
423  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
424  *
425  * @pre This method can be called if SCIP is in one of the following stages:
426  * - \ref SCIP_STAGE_INITSOLVE
427  * - \ref SCIP_STAGE_SOLVING
428  */
431  SCIP* scip, /**< SCIP data structure */
432  SCIP_NLPPARAM type, /**< parameter number */
433  int* ival /**< pointer to store the parameter value */
434  );
435 
436 /** sets integer parameter of NLP
437  *
438  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
439  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
440  *
441  * @pre This method can be called if SCIP is in one of the following stages:
442  * - \ref SCIP_STAGE_INITSOLVE
443  * - \ref SCIP_STAGE_SOLVING
444  */
447  SCIP* scip, /**< SCIP data structure */
448  SCIP_NLPPARAM type, /**< parameter number */
449  int ival /**< parameter value */
450  );
451 
452 /** gets floating point parameter of NLP
453  *
454  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
455  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
456  *
457  * @pre This method can be called if SCIP is in one of the following stages:
458  * - \ref SCIP_STAGE_INITSOLVE
459  * - \ref SCIP_STAGE_SOLVING
460  */
463  SCIP* scip, /**< SCIP data structure */
464  SCIP_NLPPARAM type, /**< parameter number */
465  SCIP_Real* dval /**< pointer to store the parameter value */
466  );
467 
468 /** sets floating point parameter of NLP
469  *
470  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
471  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
472  *
473  * @pre This method can be called if SCIP is in one of the following stages:
474  * - \ref SCIP_STAGE_INITSOLVE
475  * - \ref SCIP_STAGE_SOLVING
476  */
479  SCIP* scip, /**< SCIP data structure */
480  SCIP_NLPPARAM type, /**< parameter number */
481  SCIP_Real dval /**< parameter value */
482  );
483 
484 /** gets string parameter of NLP
485  *
486  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
487  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
488  *
489  * @pre This method can be called if SCIP is in one of the following stages:
490  * - \ref SCIP_STAGE_INITSOLVE
491  * - \ref SCIP_STAGE_SOLVING
492  */
495  SCIP* scip, /**< SCIP data structure */
496  SCIP_NLPPARAM type, /**< parameter number */
497  const char** sval /**< pointer to store the parameter value */
498  );
499 
500 /** sets string parameter of NLP
501  *
502  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
503  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
504  *
505  * @pre This method can be called if SCIP is in one of the following stages:
506  * - \ref SCIP_STAGE_INITSOLVE
507  * - \ref SCIP_STAGE_SOLVING
508  */
511  SCIP* scip, /**< SCIP data structure */
512  SCIP_NLPPARAM type, /**< parameter number */
513  const char* sval /**< parameter value */
514  );
515 
516 /** writes current NLP to a file
517  *
518  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
519  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
520  *
521  * @pre This method can be called if SCIP is in one of the following stages:
522  * - \ref SCIP_STAGE_INITSOLVE
523  * - \ref SCIP_STAGE_SOLVING
524  */
527  SCIP* scip, /**< SCIP data structure */
528  const char* filename /**< file name */
529  );
530 
531 /** gets the NLP interface and problem used by the SCIP NLP;
532  * with the NLPI and its problem you can use all of the methods defined in nlpi/nlpi.h;
533  *
534  * @warning You have to make sure, that the full internal state of the NLPI does not change or is recovered completely
535  * after the end of the method that uses the NLPI. In particular, if you manipulate the NLP or its solution
536  * (e.g. by calling one of the SCIPnlpiAdd...() or the SCIPnlpiSolve() method), you have to check in advance
537  * whether the NLP is currently solved. If this is the case, you have to make sure, the internal solution
538  * status is recovered completely at the end of your method. Additionally you have to resolve the NLP with
539  * SCIPnlpiSolve() in order to reinstall the internal solution status.
540  *
541  * @warning Make also sure, that all parameter values that you have changed are set back to their original values.
542  *
543  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
544  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
545  *
546  * @pre This method can be called if SCIP is in one of the following stages:
547  * - \ref SCIP_STAGE_INITSOLVE
548  * - \ref SCIP_STAGE_SOLVING
549  */
552  SCIP* scip, /**< SCIP data structure */
553  SCIP_NLPI** nlpi, /**< pointer to store the NLP solver interface */
554  SCIP_NLPIPROBLEM** nlpiproblem /**< pointer to store the NLP solver interface problem */
555  );
556 
557 /**@} */
558 
559 /**@addtogroup PublicNLPDiveMethods
560  *
561  * @{ */
562 
563 /** initiates NLP diving making methods SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP(), SCIPchgVarsBoundsDiveNLP(), and SCIPsolveDiveNLP() available
564  *
565  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
566  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
567  *
568  * @pre This method can be called if SCIP is in one of the following stages:
569  * - \ref SCIP_STAGE_INITSOLVE
570  * - \ref SCIP_STAGE_SOLVING
571  */
574  SCIP* scip /**< SCIP data structure */
575  );
576 
577 /** ends NLP diving
578  *
579  * Resets changes made by SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP(), and SCIPchgVarsBoundsDiveNLP().
580  *
581  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
582  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
583  *
584  * @pre This method can be called if SCIP is in one of the following stages:
585  * - \ref SCIP_STAGE_INITSOLVE
586  * - \ref SCIP_STAGE_SOLVING
587  */
590  SCIP* scip /**< SCIP data structure */
591  );
592 
593 /** changes linear objective coefficient of a variable in diving NLP
594  *
595  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
596  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
597  *
598  * @pre This method can be called if SCIP is in one of the following stages:
599  * - \ref SCIP_STAGE_INITSOLVE
600  * - \ref SCIP_STAGE_SOLVING
601  */
604  SCIP* scip, /**< SCIP data structure */
605  SCIP_VAR* var, /**< variable which coefficient to change */
606  SCIP_Real coef /**< new value for coefficient */
607  );
608 
609 /** changes bounds of a variable in diving NLP
610  *
611  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
612  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
613  *
614  * @pre This method can be called if SCIP is in one of the following stages:
615  * - \ref SCIP_STAGE_INITSOLVE
616  * - \ref SCIP_STAGE_SOLVING
617  */
620  SCIP* scip, /**< SCIP data structure */
621  SCIP_VAR* var, /**< variable which bounds to change */
622  SCIP_Real lb, /**< new lower bound */
623  SCIP_Real ub /**< new upper bound */
624  );
625 
626 /** changes bounds of a set of variables in diving NLP
627  *
628  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
629  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
630  *
631  * @pre This method can be called if SCIP is in one of the following stages:
632  * - \ref SCIP_STAGE_INITSOLVE
633  * - \ref SCIP_STAGE_SOLVING
634  */
637  SCIP* scip, /**< SCIP data structure */
638  int nvars, /**< number of variables which bounds to changes */
639  SCIP_VAR** vars, /**< variables which bounds to change */
640  SCIP_Real* lbs, /**< new lower bounds */
641  SCIP_Real* ubs /**< new upper bounds */
642  );
643 
644 /** solves diving NLP
645  *
646  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
647  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
648  *
649  * @pre This method can be called if SCIP is in one of the following stages:
650  * - \ref SCIP_STAGE_INITSOLVE
651  * - \ref SCIP_STAGE_SOLVING
652  */
655  SCIP* scip /**< SCIP data structure */
656  );
657 
658 /**@} */
659 
660 /**@addtogroup PublicNLRowMethods
661  *
662  * @{
663  */
664 
665 /** creates and captures an NLP row
666  *
667  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
668  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
669  *
670  * @pre This method can be called if SCIP is in one of the following stages:
671  * - \ref SCIP_STAGE_PRESOLVED
672  * - \ref SCIP_STAGE_INITSOLVE
673  * - \ref SCIP_STAGE_SOLVING
674  */
677  SCIP* scip, /**< SCIP data structure */
678  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
679  const char* name, /**< name of nonlinear row */
680  SCIP_Real constant, /**< constant */
681  int nlinvars, /**< number of linear variables */
682  SCIP_VAR** linvars, /**< linear variables, or NULL if nlinvars == 0 */
683  SCIP_Real* lincoefs, /**< linear coefficients, or NULL if nlinvars == 0 */
684  int nquadvars, /**< number of variables in quadratic term */
685  SCIP_VAR** quadvars, /**< variables in quadratic terms, or NULL if nquadvars == 0 */
686  int nquadelems, /**< number of elements in quadratic term */
687  SCIP_QUADELEM* quadelems, /**< elements (i.e., monomials) in quadratic term, or NULL if nquadelems == 0 */
688  SCIP_EXPRTREE* expression, /**< nonlinear expression, or NULL */
689  SCIP_Real lhs, /**< left hand side */
690  SCIP_Real rhs, /**< right hand side */
691  SCIP_EXPRCURV curvature /**< curvature of the nonlinear row */
692  );
693 
694 /** creates and captures an NLP nonlinear row without any coefficients
695  *
696  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
697  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
698  *
699  * @pre This method can be called if SCIP is in one of the following stages:
700  * - \ref SCIP_STAGE_PRESOLVED
701  * - \ref SCIP_STAGE_INITSOLVE
702  * - \ref SCIP_STAGE_SOLVING
703  */
706  SCIP* scip, /**< SCIP data structure */
707  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
708  const char* name, /**< name of nonlinear row */
709  SCIP_Real lhs, /**< left hand side */
710  SCIP_Real rhs /**< right hand side */
711  );
712 
713 /** creates and captures an NLP row from a linear row
714  *
715  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
716  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
717  *
718  * @pre This method can be called if SCIP is in one of the following stages:
719  * - \ref SCIP_STAGE_PRESOLVED
720  * - \ref SCIP_STAGE_INITSOLVE
721  * - \ref SCIP_STAGE_SOLVING
722  */
725  SCIP* scip, /**< SCIP data structure */
726  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
727  SCIP_ROW* row /**< the linear row to copy */
728  );
729 
730 /** increases usage counter of NLP nonlinear row
731  *
732  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
733  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
734  *
735  * @pre This method can be called if SCIP is in one of the following stages:
736  * - \ref SCIP_STAGE_PRESOLVED
737  * - \ref SCIP_STAGE_INITSOLVE
738  * - \ref SCIP_STAGE_SOLVING
739  */
742  SCIP* scip, /**< SCIP data structure */
743  SCIP_NLROW* nlrow /**< nonlinear row to capture */
744  );
745 
746 /** decreases usage counter of NLP nonlinear row, and frees memory if necessary
747  *
748  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
749  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
750  *
751  * @pre This method can be called if SCIP is in one of the following stages:
752  * - \ref SCIP_STAGE_PRESOLVED
753  * - \ref SCIP_STAGE_INITSOLVE
754  * - \ref SCIP_STAGE_SOLVING
755  * - \ref SCIP_STAGE_EXITSOLVE
756  */
759  SCIP* scip, /**< SCIP data structure */
760  SCIP_NLROW** nlrow /**< pointer to nonlinear row */
761  );
762 
763 /** changes left hand side of NLP nonlinear row
764  *
765  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
766  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
767  *
768  * @pre This method can be called if SCIP is in one of the following stages:
769  * - \ref SCIP_STAGE_PRESOLVED
770  * - \ref SCIP_STAGE_INITSOLVE
771  * - \ref SCIP_STAGE_SOLVING
772  */
775  SCIP* scip, /**< SCIP data structure */
776  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
777  SCIP_Real lhs /**< new left hand side */
778  );
779 
780 /** changes right hand side of NLP nonlinear row
781  *
782  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
783  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
784  *
785  * @pre This method can be called if SCIP is in one of the following stages:
786  * - \ref SCIP_STAGE_PRESOLVED
787  * - \ref SCIP_STAGE_INITSOLVE
788  * - \ref SCIP_STAGE_SOLVING
789  */
792  SCIP* scip, /**< SCIP data structure */
793  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
794  SCIP_Real rhs /**< new right hand side */
795  );
796 
797 /** changes constant of NLP nonlinear row
798  *
799  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
800  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
801  *
802  * @pre This method can be called if SCIP is in one of the following stages:
803  * - \ref SCIP_STAGE_PRESOLVED
804  * - \ref SCIP_STAGE_INITSOLVE
805  * - \ref SCIP_STAGE_SOLVING
806  */
809  SCIP* scip, /**< SCIP data structure */
810  SCIP_NLROW* nlrow, /**< NLP row */
811  SCIP_Real constant /**< new value for constant */
812  );
813 
814 /** adds variable with a linear coefficient to the nonlinear row
815  *
816  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
817  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
818  *
819  * @pre This method can be called if SCIP is in one of the following stages:
820  * - \ref SCIP_STAGE_PRESOLVED
821  * - \ref SCIP_STAGE_INITSOLVE
822  * - \ref SCIP_STAGE_SOLVING
823  */
826  SCIP* scip, /**< SCIP data structure */
827  SCIP_NLROW* nlrow, /**< NLP row */
828  SCIP_VAR* var, /**< problem variable */
829  SCIP_Real val /**< value of coefficient in linear part of row */
830  );
831 
832 /** adds variables with linear coefficients to the row
833  *
834  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
835  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
836  *
837  * @pre This method can be called if SCIP is in one of the following stages:
838  * - \ref SCIP_STAGE_PRESOLVED
839  * - \ref SCIP_STAGE_INITSOLVE
840  * - \ref SCIP_STAGE_SOLVING
841  */
844  SCIP* scip, /**< SCIP data structure */
845  SCIP_NLROW* nlrow, /**< NLP row */
846  int nvars, /**< number of variables to add to the row */
847  SCIP_VAR** vars, /**< problem variables to add */
848  SCIP_Real* vals /**< values of coefficients in linear part of row */
849  );
850 
851 /** changes linear coefficient of a variables in a row
852  *
853  * Setting the coefficient to 0.0 means that it is removed from the row
854  * the variable does not need to exists before.
855  *
856  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
857  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
858  *
859  * @pre This method can be called if SCIP is in one of the following stages:
860  * - \ref SCIP_STAGE_PRESOLVED
861  * - \ref SCIP_STAGE_INITSOLVE
862  * - \ref SCIP_STAGE_SOLVING
863  */
866  SCIP* scip, /**< SCIP data structure */
867  SCIP_NLROW* nlrow, /**< NLP row */
868  SCIP_VAR* var, /**< variable */
869  SCIP_Real coef /**< new value of coefficient */
870  );
871 
872 /** adds quadratic variable to the nonlinear row
873  *
874  * After adding a quadratic variable, it can be used to add quadratic elements.
875  *
876  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
877  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
878  *
879  * @pre This method can be called if SCIP is in one of the following stages:
880  * - \ref SCIP_STAGE_PRESOLVED
881  * - \ref SCIP_STAGE_INITSOLVE
882  * - \ref SCIP_STAGE_SOLVING
883  */
886  SCIP* scip, /**< SCIP data structure */
887  SCIP_NLROW* nlrow, /**< NLP row */
888  SCIP_VAR* var /**< problem variable */
889  );
890 
891 /** adds quadratic variables to the nonlinear row
892  *
893  * After adding quadratic variables, they can be used to add quadratic elements.
894  *
895  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
896  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
897  *
898  * @pre This method can be called if SCIP is in one of the following stages:
899  * - \ref SCIP_STAGE_PRESOLVED
900  * - \ref SCIP_STAGE_INITSOLVE
901  * - \ref SCIP_STAGE_SOLVING
902  */
905  SCIP* scip, /**< SCIP data structure */
906  SCIP_NLROW* nlrow, /**< NLP row */
907  int nvars, /**< number of problem variables */
908  SCIP_VAR** vars /**< problem variables */
909  );
910 
911 /** add a quadratic element to the nonlinear row
912  *
913  * Variable indices of the quadratic element need to be relative to quadratic variables array of row.
914  *
915  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
916  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
917  *
918  * @pre This method can be called if SCIP is in one of the following stages:
919  * - \ref SCIP_STAGE_PRESOLVED
920  * - \ref SCIP_STAGE_INITSOLVE
921  * - \ref SCIP_STAGE_SOLVING
922  */
925  SCIP* scip, /**< SCIP data structure */
926  SCIP_NLROW* nlrow, /**< NLP row */
927  SCIP_QUADELEM quadelem /**< quadratic element */
928  );
929 
930 /** adds quadratic elements to the nonlinear row
931  *
932  * Variable indices of the quadratic elements need to be relative to quadratic variables array of row.
933  *
934  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
935  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
936  *
937  * @pre This method can be called if SCIP is in one of the following stages:
938  * - \ref SCIP_STAGE_PRESOLVED
939  * - \ref SCIP_STAGE_INITSOLVE
940  * - \ref SCIP_STAGE_SOLVING
941  */
944  SCIP* scip, /**< SCIP data structure */
945  SCIP_NLROW* nlrow, /**< NLP row */
946  int nquadelems, /**< number of quadratic elements */
947  SCIP_QUADELEM* quadelems /**< quadratic elements */
948  );
949 
950 /** changes coefficient in quadratic part of a row
951  *
952  * Setting the coefficient in the quadelement to 0.0 means that it is removed from the row
953  * the element does not need to exists before.
954  *
955  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
956  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
957  *
958  * @pre This method can be called if SCIP is in one of the following stages:
959  * - \ref SCIP_STAGE_PRESOLVED
960  * - \ref SCIP_STAGE_INITSOLVE
961  * - \ref SCIP_STAGE_SOLVING
962  */
965  SCIP* scip, /**< SCIP data structure */
966  SCIP_NLROW* nlrow, /**< NLP row */
967  SCIP_QUADELEM quadelement /**< new quadratic element, or update for existing one */
968  );
969 
970 /** sets or deletes expression tree in the nonlinear row
971  *
972  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
973  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
974  *
975  * @pre This method can be called if SCIP is in one of the following stages:
976  * - \ref SCIP_STAGE_PRESOLVED
977  * - \ref SCIP_STAGE_INITSOLVE
978  * - \ref SCIP_STAGE_SOLVING
979  */
982  SCIP* scip, /**< SCIP data structure */
983  SCIP_NLROW* nlrow, /**< NLP row */
984  SCIP_EXPRTREE* exprtree /**< expression tree, or NULL */
985  );
986 
987 /** sets a parameter of expression tree in the nonlinear row
988  *
989  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
990  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
991  *
992  * @pre This method can be called if SCIP is in one of the following stages:
993  * - \ref SCIP_STAGE_PRESOLVED
994  * - \ref SCIP_STAGE_INITSOLVE
995  * - \ref SCIP_STAGE_SOLVING
996  */
999  SCIP* scip, /**< SCIP data structure */
1000  SCIP_NLROW* nlrow, /**< NLP row */
1001  int paramidx, /**< index of parameter in expression tree */
1002  SCIP_Real paramval /**< new value of parameter in expression tree */
1003  );
1004 
1005 /** sets parameters of expression tree in the nonlinear row
1006  *
1007  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1008  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1009  *
1010  * @pre This method can be called if SCIP is in one of the following stages:
1011  * - \ref SCIP_STAGE_PRESOLVED
1012  * - \ref SCIP_STAGE_INITSOLVE
1013  * - \ref SCIP_STAGE_SOLVING
1014  */
1017  SCIP* scip, /**< SCIP data structure */
1018  SCIP_NLROW* nlrow, /**< NLP row */
1019  SCIP_Real* paramvals /**< new values of parameter in expression tree */
1020  );
1021 
1022 /** recalculates the activity of a nonlinear row in the last NLP solution
1023  *
1024  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1025  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1026  *
1027  * @pre This method can be called if SCIP is in one of the following stages:
1028  * - \ref SCIP_STAGE_PRESOLVED
1029  * - \ref SCIP_STAGE_INITSOLVE
1030  * - \ref SCIP_STAGE_SOLVING
1031  */
1034  SCIP* scip, /**< SCIP data structure */
1035  SCIP_NLROW* nlrow /**< NLP nonlinear row */
1036  );
1037 
1038 /** returns the activity of a nonlinear row in the last NLP solution
1039  *
1040  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1041  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1042  *
1043  * @pre This method can be called if SCIP is in one of the following stages:
1044  * - \ref SCIP_STAGE_INITSOLVE
1045  * - \ref SCIP_STAGE_SOLVING
1046  */
1049  SCIP* scip, /**< SCIP data structure */
1050  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1051  SCIP_Real* activity /**< pointer to store activity value */
1052  );
1053 
1054 /** gives the feasibility of a nonlinear row in the last NLP solution: negative value means infeasibility
1055  *
1056  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1057  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1058  *
1059  * @pre This method can be called if SCIP is in one of the following stages:
1060  * - \ref SCIP_STAGE_INITSOLVE
1061  * - \ref SCIP_STAGE_SOLVING
1062  */
1065  SCIP* scip, /**< SCIP data structure */
1066  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1067  SCIP_Real* feasibility /**< pointer to store feasibility value */
1068  );
1069 
1070 /** recalculates the activity of a nonlinear row for the current pseudo solution
1071  *
1072  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1073  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1074  *
1075  * @pre This method can be called if SCIP is in one of the following stages:
1076  * - \ref SCIP_STAGE_INITSOLVE
1077  * - \ref SCIP_STAGE_SOLVING
1078  */
1081  SCIP* scip, /**< SCIP data structure */
1082  SCIP_NLROW* nlrow /**< NLP nonlinear row */
1083  );
1084 
1085 /** gives the activity of a nonlinear row for the current pseudo solution
1086  *
1087  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1088  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1089  *
1090  * @pre This method can be called if SCIP is in one of the following stages:
1091  * - \ref SCIP_STAGE_INITSOLVE
1092  * - \ref SCIP_STAGE_SOLVING
1093  */
1096  SCIP* scip, /**< SCIP data structure */
1097  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1098  SCIP_Real* pseudoactivity /**< pointer to store pseudo activity value */
1099  );
1100 
1101 /** gives the feasibility of a nonlinear row for the current pseudo solution: negative value means infeasibility
1102  *
1103  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1104  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1105  *
1106  * @pre This method can be called if SCIP is in one of the following stages:
1107  * - \ref SCIP_STAGE_INITSOLVE
1108  * - \ref SCIP_STAGE_SOLVING
1109  */
1112  SCIP* scip, /**< SCIP data structure */
1113  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1114  SCIP_Real* pseudofeasibility /**< pointer to store pseudo feasibility value */
1115  );
1116 
1117 /** recalculates the activity of a nonlinear row in the last NLP or pseudo solution
1118  *
1119  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1120  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1121  *
1122  * @pre This method can be called if SCIP is in one of the following stages:
1123  * - \ref SCIP_STAGE_INITSOLVE
1124  * - \ref SCIP_STAGE_SOLVING
1125  */
1128  SCIP* scip, /**< SCIP data structure */
1129  SCIP_NLROW* nlrow /**< NLP nonlinear row */
1130  );
1131 
1132 /** gives the activity of a nonlinear row in the last NLP or pseudo solution
1133  *
1134  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1135  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1136  *
1137  * @pre This method can be called if SCIP is in one of the following stages:
1138  * - \ref SCIP_STAGE_INITSOLVE
1139  * - \ref SCIP_STAGE_SOLVING
1140  */
1143  SCIP* scip, /**< SCIP data structure */
1144  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1145  SCIP_Real* activity /**< pointer to store activity value */
1146  );
1147 
1148 /** gives the feasibility of a nonlinear row in the last NLP or pseudo solution
1149  *
1150  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1151  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1152  *
1153  * @pre This method can be called if SCIP is in one of the following stages:
1154  * - \ref SCIP_STAGE_INITSOLVE
1155  * - \ref SCIP_STAGE_SOLVING
1156  */
1159  SCIP* scip, /**< SCIP data structure */
1160  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1161  SCIP_Real* feasibility /**< pointer to store feasibility value */
1162  );
1163 
1164 /** gives the activity of a nonlinear row for the given primal solution or NLP solution or pseudo solution
1165  *
1166  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1167  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1168  *
1169  * @pre This method can be called if SCIP is in one of the following stages:
1170  * - \ref SCIP_STAGE_INITSOLVE
1171  * - \ref SCIP_STAGE_SOLVING
1172  */
1175  SCIP* scip, /**< SCIP data structure */
1176  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1177  SCIP_SOL* sol, /**< primal CIP solution, or NULL for NLP solution of pseudo solution */
1178  SCIP_Real* activity /**< pointer to store activity value */
1179  );
1180 
1181 /** gives the feasibility of a nonlinear row for the given primal solution
1182  *
1183  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1184  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1185  *
1186  * @pre This method can be called if SCIP is in one of the following stages:
1187  * - \ref SCIP_STAGE_INITSOLVE
1188  * - \ref SCIP_STAGE_SOLVING
1189  */
1192  SCIP* scip, /**< SCIP data structure */
1193  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
1194  SCIP_SOL* sol, /**< primal CIP solution */
1195  SCIP_Real* feasibility /**< pointer to store feasibility value */
1196  );
1197 
1198 /** gives the minimal and maximal activity of a nonlinear row w.r.t. the variable's bounds
1199  *
1200  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1201  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1202  *
1203  * @pre This method can be called if SCIP is in one of the following stages:
1204  * - \ref SCIP_STAGE_PRESOLVED
1205  * - \ref SCIP_STAGE_INITSOLVE
1206  * - \ref SCIP_STAGE_SOLVING
1207  */
1210  SCIP* scip, /**< SCIP data structure */
1211  SCIP_NLROW* nlrow, /**< NLP row */
1212  SCIP_Real* minactivity, /**< buffer to store minimal activity, or NULL */
1213  SCIP_Real* maxactivity /**< buffer to store maximal activity, or NULL */
1214  );
1215 
1216 /** output nonlinear row to file stream
1217  *
1218  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1219  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1220  *
1221  * @pre This method can be called if SCIP is in one of the following stages:
1222  * - \ref SCIP_STAGE_PRESOLVED
1223  * - \ref SCIP_STAGE_INITSOLVE
1224  * - \ref SCIP_STAGE_SOLVING
1225  */
1228  SCIP* scip, /**< SCIP data structure */
1229  SCIP_NLROW* nlrow, /**< NLP row */
1230  FILE* file /**< output file (or NULL for standard output) */
1231  );
1232 
1233 /**@} */
1234 
1235 #ifdef __cplusplus
1236 }
1237 #endif
1238 
1239 #endif
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition: type_nlpi.h:84
SCIP_EXPORT SCIP_Real SCIPgetNLPObjval(SCIP *scip)
Definition: scip_nlp.c:690
SCIP_EXPORT SCIP_RETCODE SCIPsolveDiveNLP(SCIP *scip)
Definition: scip_nlp.c:1160
SCIP_EXPORT SCIP_RETCODE SCIPaddQuadVarsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nvars, SCIP_VAR **vars)
Definition: scip_nlp.c:1507
SCIP_EXPORT SCIP_RETCODE SCIPaddLinearCoefsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_nlp.c:1417
type definitions for NLP management
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPNlRowsData(SCIP *scip, SCIP_NLROW ***nlrows, int *nnlrows)
Definition: scip_nlp.c:389
SCIP_EXPORT SCIP_NLPI ** SCIPgetNlpis(SCIP *scip)
Definition: scip_nlp.c:119
SCIP_EXPORT SCIP_RETCODE SCIPprintNlRow(SCIP *scip, SCIP_NLROW *nlrow, FILE *file)
Definition: scip_nlp.c:2031
SCIP_EXPORT 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:1194
SCIP_EXPORT SCIP_RETCODE SCIPflushNLP(SCIP *scip)
Definition: scip_nlp.c:511
SCIP_EXPORT SCIP_Bool SCIPisNLPEnabled(SCIP *scip)
Definition: scip_nlp.c:172
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPStatistics(SCIP *scip, SCIP_NLPSTATISTICS *statistics)
Definition: scip_nlp.c:666
#define SCIP_EXPORT
Definition: def.h:100
SCIP_EXPORT SCIP_RETCODE SCIPcreateNlRowFromRow(SCIP *scip, SCIP_NLROW **nlrow, SCIP_ROW *row)
Definition: scip_nlp.c:1256
SCIP_EXPORT SCIP_RETCODE SCIPchgNlRowQuadElement(SCIP *scip, SCIP_NLROW *nlrow, SCIP_QUADELEM quadelement)
Definition: scip_nlp.c:1608
SCIP_EXPORT SCIP_RETCODE SCIPaddQuadElementToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_QUADELEM quadelem)
Definition: scip_nlp.c:1541
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPVarsNonlinearity(SCIP *scip, int *nlcount)
Definition: scip_nlp.c:321
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudoactivity)
Definition: scip_nlp.c:1808
SCIP_EXPORT SCIP_RETCODE SCIPrecalcNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1704
SCIP_EXPORT SCIP_RETCODE SCIPchgVarsBoundsDiveNLP(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *lbs, SCIP_Real *ubs)
Definition: scip_nlp.c:1130
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowActivityBounds(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *minactivity, SCIP_Real *maxactivity)
Definition: scip_nlp.c:2007
SCIP_EXPORT SCIP_RETCODE SCIPaddQuadElementsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nquadelems, SCIP_QUADELEM *quadelems)
Definition: scip_nlp.c:1570
enum SCIP_NlpParam SCIP_NLPPARAM
Definition: type_nlpi.h:56
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1880
SCIP_EXPORT SCIP_RETCODE SCIPrecalcNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1852
SCIP_EXPORT SCIP_RETCODE SCIPstartDiveNLP(SCIP *scip)
Definition: scip_nlp.c:1015
SCIP_EXPORT SCIP_RETCODE SCIPwriteNLP(SCIP *scip, const char *filename)
Definition: scip_nlp.c:938
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPFracVars(SCIP *scip, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
Definition: scip_nlp.c:739
SCIP_EXPORT SCIP_RETCODE SCIPsolveNLP(SCIP *scip)
Definition: scip_nlp.c:596
type definitions for LP management
SCIP_EXPORT SCIP_RETCODE SCIPcaptureNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1279
SCIP_EXPORT SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
Definition: scip_nlp.c:1302
SCIP_EXPORT SCIP_Bool SCIPhasNLPSolution(SCIP *scip)
Definition: scip_nlp.c:714
SCIP_EXPORT SCIP_RETCODE SCIPendDiveNLP(SCIP *scip)
Definition: scip_nlp.c:1043
SCIP_EXPORT SCIP_NLROW ** SCIPgetNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:417
SCIP_EXPORT SCIP_NLPI * SCIPfindNlpi(SCIP *scip, const char *name)
Definition: scip_nlp.c:106
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars)
Definition: scip_nlp.c:247
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition: type_nlpi.h:69
type definitions for SCIP&#39;s main datastructure
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1909
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPIntPar(SCIP *scip, SCIP_NLPPARAM type, int *ival)
Definition: scip_nlp.c:770
SCIP_EXPORT SCIP_RETCODE SCIPchgVarObjDiveNLP(SCIP *scip, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:1069
SCIP_EXPORT int SCIPgetNNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:439
SCIP_EXPORT SCIP_RETCODE SCIPsetNlRowExprtreeParam(SCIP *scip, SCIP_NLROW *nlrow, int paramidx, SCIP_Real paramval)
Definition: scip_nlp.c:1657
type definitions for problem variables
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1731
SCIP_EXPORT SCIP_RETCODE SCIPchgNlRowLinearCoef(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:1454
SCIP_EXPORT SCIP_Real * SCIPgetNLPVarsLbDualsol(SCIP *scip)
Definition: scip_nlp.c:345
SCIP_EXPORT SCIP_RETCODE SCIPincludeNlpi(SCIP *scip, SCIP_NLPI *nlpi)
Definition: scip_nlp.c:70
SCIP_EXPORT SCIP_RETCODE SCIPsetNLPIntPar(SCIP *scip, SCIP_NLPPARAM type, int ival)
Definition: scip_nlp.c:798
SCIP_EXPORT SCIP_Bool SCIPhasNLPContinuousNonlinearity(SCIP *scip)
Definition: scip_nlp.c:225
SCIP_EXPORT SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
Definition: scip_nlp.c:1393
SCIP_EXPORT SCIP_Real * SCIPgetNLPVarsUbDualsol(SCIP *scip)
Definition: scip_nlp.c:367
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowSolFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Real *feasibility)
Definition: scip_nlp.c:1972
SCIP_EXPORT SCIP_VAR ** SCIPgetNLPVars(SCIP *scip)
Definition: scip_nlp.c:277
SCIP_EXPORT SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
Definition: scip_nlp.c:210
SCIP_EXPORT int SCIPgetNNlpis(SCIP *scip)
Definition: scip_nlp.c:132
SCIP_EXPORT SCIP_RETCODE SCIPsetNlpiPriority(SCIP *scip, SCIP_NLPI *nlpi, int priority)
Definition: scip_nlp.c:143
SCIP_EXPORT SCIP_NLPSOLSTAT SCIPgetNLPSolstat(SCIP *scip)
Definition: scip_nlp.c:619
SCIP_EXPORT SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:487
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPStringPar(SCIP *scip, SCIP_NLPPARAM type, const char **sval)
Definition: scip_nlp.c:882
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowNLPFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1759
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowPseudoFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudofeasibility)
Definition: scip_nlp.c:1830
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_RETCODE SCIPchgNlRowRhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real rhs)
Definition: scip_nlp.c:1347
SCIP_EXPORT SCIP_NLPTERMSTAT SCIPgetNLPTermstat(SCIP *scip)
Definition: scip_nlp.c:641
enum SCIP_ExprCurv SCIP_EXPRCURV
Definition: type_expr.h:95
SCIP_EXPORT SCIP_RETCODE SCIPchgVarBoundsDiveNLP(SCIP *scip, SCIP_VAR *var, SCIP_Real lb, SCIP_Real ub)
Definition: scip_nlp.c:1099
SCIP_EXPORT SCIP_RETCODE SCIPcreateEmptyNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real lhs, SCIP_Real rhs)
Definition: scip_nlp.c:1230
SCIP_EXPORT SCIP_RETCODE SCIPsetNLPStringPar(SCIP *scip, SCIP_NLPPARAM type, const char *sval)
Definition: scip_nlp.c:910
SCIP_EXPORT void SCIPenableNLP(SCIP *scip)
Definition: scip_nlp.c:195
SCIP_EXPORT SCIP_RETCODE SCIPsetNLPRealPar(SCIP *scip, SCIP_NLPPARAM type, SCIP_Real dval)
Definition: scip_nlp.c:854
type definitions for expressions and expression trees
SCIP_EXPORT SCIP_RETCODE SCIPchgNlRowLhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real lhs)
Definition: scip_nlp.c:1324
SCIP_EXPORT SCIP_RETCODE SCIPrecalcNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1787
SCIP_EXPORT SCIP_RETCODE SCIPaddQuadVarToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var)
Definition: scip_nlp.c:1482
#define SCIP_Real
Definition: def.h:163
SCIP_EXPORT SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:461
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPI(SCIP *scip, SCIP_NLPI **nlpi, SCIP_NLPIPROBLEM **nlpiproblem)
Definition: scip_nlp.c:975
SCIP_EXPORT SCIP_RETCODE SCIPgetNLPRealPar(SCIP *scip, SCIP_NLPPARAM type, SCIP_Real *dval)
Definition: scip_nlp.c:826
SCIP_EXPORT SCIP_RETCODE SCIPsetNLPInitialGuess(SCIP *scip, SCIP_Real *initialguess)
Definition: scip_nlp.c:537
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_RETCODE SCIPsetNlRowExprtree(SCIP *scip, SCIP_NLROW *nlrow, SCIP_EXPRTREE *exprtree)
Definition: scip_nlp.c:1631
SCIP_EXPORT SCIP_RETCODE SCIPsetNlRowExprtreeParams(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *paramvals)
Definition: scip_nlp.c:1681
SCIP_EXPORT SCIP_RETCODE SCIPchgNlRowConstant(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real constant)
Definition: scip_nlp.c:1370
SCIP_EXPORT SCIP_RETCODE SCIPsetNLPInitialGuessSol(SCIP *scip, SCIP_SOL *sol)
Definition: scip_nlp.c:564
SCIP_EXPORT SCIP_RETCODE SCIPgetNlRowSolActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Real *activity)
Definition: scip_nlp.c:1938
SCIP_EXPORT int SCIPgetNNLPVars(SCIP *scip)
Definition: scip_nlp.c:299
type definitions for specific NLP solver interfaces