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-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_nlp.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for nonlinear relaxation
19  * @author Thorsten Gellermann
20  * @author Stefan Vigerske
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_SCIP_NLP_H__
26 #define __SCIP_SCIP_NLP_H__
27 
28 
29 #include "scip/def.h"
30 #include "scip/type_lp.h"
31 #include "scip/type_nlp.h"
32 #include "scip/type_nlpi.h"
33 #include "scip/type_retcode.h"
34 #include "scip/type_scip.h"
35 #include "scip/type_sol.h"
36 #include "scip/type_var.h"
37 #include "scip/type_expr.h"
38 #include "scip/pub_nlp.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /**@addtogroup PublicNLPMethods
45  *
46  * @{
47  */
48 
49 /** returns whether the NLP relaxation has been enabled
50  *
51  * If the NLP relaxation is enabled, then SCIP will construct the NLP relaxation when the solving process is about to begin.
52  * To check whether an NLP is existing, use SCIPisNLPConstructed().
53  *
54  * @pre This method can be called if SCIP is in one of the following stages:
55  * - \ref SCIP_STAGE_INITPRESOLVE
56  * - \ref SCIP_STAGE_PRESOLVING
57  * - \ref SCIP_STAGE_EXITPRESOLVE
58  * - \ref SCIP_STAGE_PRESOLVED
59  * - \ref SCIP_STAGE_INITSOLVE
60  * - \ref SCIP_STAGE_SOLVING
61  *
62  * @see SCIPenableNLP
63  */
64 SCIP_EXPORT
66  SCIP* scip /**< SCIP data structure */
67  );
68 
69 /** notifies SCIP that the NLP relaxation should be initialized in INITSOLVE
70  *
71  * This method is typically called by a constraint handler that handles constraints that have a nonlinear representation as nonlinear rows, e.g., cons_nonlinear.
72  *
73  * The function should be called before the branch-and-bound process is initialized, e.g., when presolve is exiting.
74  *
75  * @pre This method can be called if SCIP is in one of the following stages:
76  * - \ref SCIP_STAGE_INITPRESOLVE
77  * - \ref SCIP_STAGE_PRESOLVING
78  * - \ref SCIP_STAGE_EXITPRESOLVE
79  * - \ref SCIP_STAGE_PRESOLVED
80  */
81 SCIP_EXPORT
82 void SCIPenableNLP(
83  SCIP* scip /**< SCIP data structure */
84  );
85 
86 /** returns, whether an NLP has been constructed
87  *
88  * @pre This method can be called if SCIP is in one of the following stages:
89  * - \ref SCIP_STAGE_INITSOLVE
90  * - \ref SCIP_STAGE_SOLVING
91  */
92 SCIP_EXPORT
94  SCIP* scip /**< SCIP data structure */
95  );
96 
97 /** checks whether the NLP has a continuous variable in a nonlinear term
98  *
99  * @pre This method can be called if SCIP is in one of the following stages:
100  * - \ref SCIP_STAGE_INITSOLVE
101  * - \ref SCIP_STAGE_SOLVING
102  */
103 SCIP_EXPORT
105  SCIP* scip, /**< SCIP data structure */
106  SCIP_Bool* result /**< buffer to store result */
107  );
108 
109 /** gets current NLP variables along with the current number of NLP variables
110  *
111  * @pre This method can be called if SCIP is in one of the following stages:
112  * - \ref SCIP_STAGE_INITSOLVE
113  * - \ref SCIP_STAGE_SOLVING
114  */
115 SCIP_EXPORT
117  SCIP* scip, /**< SCIP data structure */
118  SCIP_VAR*** vars, /**< pointer to store the array of NLP variables, or NULL */
119  int* nvars /**< pointer to store the number of NLP variables, or NULL */
120  );
121 
122 /** gets array with variables of the NLP
123  *
124  * @pre This method can be called if SCIP is in one of the following stages:
125  * - \ref SCIP_STAGE_INITSOLVE
126  * - \ref SCIP_STAGE_SOLVING
127  */
128 SCIP_EXPORT
130  SCIP* scip /**< SCIP data structure */
131  );
132 
133 /** gets current number of variables in NLP
134  *
135  * @pre This method can be called if SCIP is in one of the following stages:
136  * - \ref SCIP_STAGE_INITSOLVE
137  * - \ref SCIP_STAGE_SOLVING
138  */
139 SCIP_EXPORT
140 int SCIPgetNNLPVars(
141  SCIP* scip /**< SCIP data structure */
142  );
143 
144 /** computes for each variables the number of NLP rows in which the variable appears in the nonlinear part
145  *
146  * @pre This method can be called if SCIP is in one of the following stages:
147  * - \ref SCIP_STAGE_INITSOLVE
148  * - \ref SCIP_STAGE_SOLVING
149  */
150 SCIP_EXPORT
152  SCIP* scip, /**< SCIP data structure */
153  int* nlcount /**< an array of length at least SCIPnlpGetNVars() to store nonlinearity counts of variables */
154  );
155 
156 /** returns dual solution values associated with lower bounds 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  */
162 SCIP_EXPORT
164  SCIP* scip /**< SCIP data structure */
165  );
166 
167 /** returns dual solution values associated with upper bounds of NLP variables
168  *
169  * @pre This method can be called if SCIP is in one of the following stages:
170  * - \ref SCIP_STAGE_INITSOLVE
171  * - \ref SCIP_STAGE_SOLVING
172  */
173 SCIP_EXPORT
175  SCIP* scip /**< SCIP data structure */
176  );
177 
178 /** gets current NLP nonlinear rows along with the current number of NLP nonlinear rows
179  *
180  * @pre This method can be called if SCIP is in one of the following stages:
181  * - \ref SCIP_STAGE_INITSOLVE
182  * - \ref SCIP_STAGE_SOLVING
183  */
184 SCIP_EXPORT
186  SCIP* scip, /**< SCIP data structure */
187  SCIP_NLROW*** nlrows, /**< pointer to store the array of NLP nonlinear rows, or NULL */
188  int* nnlrows /**< pointer to store the number of NLP nonlinear rows, or NULL */
189  );
190 
191 /** gets array with nonlinear rows of the NLP
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  */
197 SCIP_EXPORT
199  SCIP* scip /**< SCIP data structure */
200  );
201 
202 /** gets current number of nonlinear rows in NLP
203  *
204  * @pre This method can be called if SCIP is in one of the following stages:
205  * - \ref SCIP_STAGE_INITSOLVE
206  * - \ref SCIP_STAGE_SOLVING
207  */
208 SCIP_EXPORT
210  SCIP* scip /**< SCIP data structure */
211  );
212 
213 /** adds a nonlinear row to the NLP. This row is captured by the NLP.
214  *
215  * @pre This method can be called if SCIP is in one of the following stages:
216  * - \ref SCIP_STAGE_INITSOLVE
217  * - \ref SCIP_STAGE_SOLVING
218  */
219 SCIP_EXPORT
221  SCIP* scip, /**< SCIP data structure */
222  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
223  );
224 
225 /** removes a nonlinear row from the NLP
226  *
227  * This row is released in the NLP.
228  *
229  * @pre This method can be called if SCIP is in one of the following stages:
230  * - \ref SCIP_STAGE_INITSOLVE
231  * - \ref SCIP_STAGE_SOLVING
232  * - \ref SCIP_STAGE_SOLVED
233  * - \ref SCIP_STAGE_EXITSOLVE
234  */
235 SCIP_EXPORT
237  SCIP* scip, /**< SCIP data structure */
238  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
239  );
240 
241 /** makes sure that the NLP of the current node is flushed
242  *
243  * @pre This method can be called if SCIP is in one of the following stages:
244  * - \ref SCIP_STAGE_INITSOLVE
245  * - \ref SCIP_STAGE_SOLVING
246  */
247 SCIP_EXPORT
249  SCIP* scip /**< SCIP data structure */
250  );
251 
252 /** sets or clears initial primal guess for NLP solution (start point for NLP solver)
253  *
254  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
255  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
256  *
257  * @pre This method can be called if SCIP is in one of the following stages:
258  * - \ref SCIP_STAGE_INITSOLVE
259  * - \ref SCIP_STAGE_SOLVING
260  */
261 SCIP_EXPORT
263  SCIP* scip, /**< SCIP data structure */
264  SCIP_Real* initialguess /**< values of initial guess (corresponding to variables from SCIPgetNLPVarsData), or NULL to use no start point */
265  );
266 
267 /** sets initial primal guess for NLP solution (start point for NLP solver)
268  *
269  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
270  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
271  *
272  * @pre This method can be called if SCIP is in one of the following stages:
273  * - \ref SCIP_STAGE_INITSOLVE
274  * - \ref SCIP_STAGE_SOLVING
275  */
276 SCIP_EXPORT
278  SCIP* scip, /**< SCIP data structure */
279  SCIP_SOL* sol /**< solution which values should be taken as initial guess, or NULL for LP solution */
280  );
281 
282 /** solves the current NLP (or diving NLP if in diving mode) with given parameters
283  *
284  * Typical use is
285  *
286  * SCIP_NLPPARAM nlparam = { SCIP_NLPPARAM_DEFAULT(scip); }
287  * nlpparam.iterlimit = 42;
288  * SCIP_CALL( SCIPsolveNLPParam(scip, nlpparam) );
289  *
290  * or, in one line:
291  *
292  * SCIP_CALL( SCIPsolveNLPParam(scip, (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT(scip), .iterlimit = 42 }) );
293  *
294  * To get the latter, also \ref SCIPsolveNLP can be used.
295  *
296  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
297  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
298  *
299  * @pre This method can be called if SCIP is in one of the following stages:
300  * - \ref SCIP_STAGE_INITSOLVE
301  * - \ref SCIP_STAGE_SOLVING
302  */
303 SCIP_EXPORT
305  SCIP* scip, /**< SCIP data structure */
306  SCIP_NLPPARAM param /**< NLP solve parameters */
307  );
308 
309 /** solves the current NLP (or diving NLP if in diving mode) with non-default parameters given as optional arguments
310  *
311  * Typical use is
312  *
313  * SCIP_CALL( SCIPsolveNLP(scip) );
314  *
315  * to solve with default parameters.
316  * Additionally, one or several values of SCIP_NLPPARAM can be set:
317  *
318  * SCIP_CALL( SCIPsolveNLP(scip, .iterlimit = 42, .verblevel = 1) ); //lint !e666
319  *
320  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
321  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
322  *
323  * @pre This method can be called if SCIP is in one of the following stages:
324  * - \ref SCIP_STAGE_INITSOLVE
325  * - \ref SCIP_STAGE_SOLVING
326  */
327 /* the scip argument has been made part of the variadic arguments, since ISO C99 requires at least one argument for the "..." part and we want to allow leaving all parameters at default
328  * for the same reason, we have the .caller argument, so that macro SCIP_VARARGS_REST will have at least one arg to return
329  */
330 #if !defined(_MSC_VER) || _MSC_VER >= 1800
331 #define SCIPsolveNLP(...) \
332  SCIPsolveNLPParam(SCIP_VARARGS_FIRST((__VA_ARGS__, ignored)), \
333  (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT_INITS(SCIP_VARARGS_FIRST((__VA_ARGS__, ignored))), SCIP_VARARGS_REST(__VA_ARGS__, .caller = __FILE__) })
334 #else
335 /* very old MSVC doesn't support C99's designated initializers, so have a version of SCIPsolveNLP() that just ignores given parameters
336  * (compilation of scip_nlp.c will print a warning)
337  */
338 #define SCIPsolveNLP(...) \
339  SCIPsolveNLPParam(SCIP_VARARGS_FIRST((__VA_ARGS__, ignored)), SCIP_NLPPARAM_DEFAULT_STATIC)
340 #endif
341 
342 
343 /** gets solution status of current NLP
344  *
345  * @pre This method can be called if SCIP is in one of the following stages:
346  * - \ref SCIP_STAGE_INITSOLVE
347  * - \ref SCIP_STAGE_SOLVING
348  */
349 SCIP_EXPORT
351  SCIP* scip /**< SCIP data structure */
352  );
353 
354 /** gets termination status of last NLP solve
355  *
356  * @pre This method can be called if SCIP is in one of the following stages:
357  * - \ref SCIP_STAGE_INITSOLVE
358  * - \ref SCIP_STAGE_SOLVING
359  */
360 SCIP_EXPORT
362  SCIP* scip /**< SCIP data structure */
363  );
364 
365 /** gives statistics (number of iterations, solving time, ...) of last NLP solve
366  *
367  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
368  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
369  *
370  * @pre This method can be called if SCIP is in one of the following stages:
371  * - \ref SCIP_STAGE_INITSOLVE
372  * - \ref SCIP_STAGE_SOLVING
373  */
374 SCIP_EXPORT
376  SCIP* scip, /**< SCIP data structure */
377  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
378  );
379 
380 /** gets objective value of current NLP
381  *
382  * @pre This method can be called if SCIP is in one of the following stages:
383  * - \ref SCIP_STAGE_INITSOLVE
384  * - \ref SCIP_STAGE_SOLVING
385  */
386 SCIP_EXPORT
388  SCIP* scip /**< SCIP data structure */
389  );
390 
391 /** indicates whether a solution for the current NLP is available
392  *
393  * The solution may be optimal, feasible, or infeasible.
394  * Thus, returns whether the NLP solution status is at most \ref SCIP_NLPSOLSTAT_LOCINFEASIBLE.
395  *
396  * @pre This method can be called if SCIP is in one of the following stages:
397  * - \ref SCIP_STAGE_INITSOLVE
398  * - \ref SCIP_STAGE_SOLVING
399  */
400 SCIP_EXPORT
402  SCIP* scip /**< SCIP data structure */
403  );
404 
405 /** gets fractional variables of last NLP solution along with solution values and fractionalities
406  *
407  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
408  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
409  *
410  * @pre This method can be called if SCIP is in one of the following stages:
411  * - \ref SCIP_STAGE_INITSOLVE
412  * - \ref SCIP_STAGE_SOLVING
413  */
414 SCIP_EXPORT
416  SCIP* scip, /**< SCIP data structure */
417  SCIP_VAR*** fracvars, /**< pointer to store the array of NLP fractional variables, or NULL */
418  SCIP_Real** fracvarssol, /**< pointer to store the array of NLP fractional variables solution values, or NULL */
419  SCIP_Real** fracvarsfrac, /**< pointer to store the array of NLP fractional variables fractionalities, or NULL */
420  int* nfracvars, /**< pointer to store the number of NLP fractional variables , or NULL */
421  int* npriofracvars /**< pointer to store the number of NLP fractional variables with maximal branching priority, or NULL */
422  );
423 
424 /** writes current NLP to a file
425  *
426  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
427  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
428  *
429  * @pre This method can be called if SCIP is in one of the following stages:
430  * - \ref SCIP_STAGE_INITSOLVE
431  * - \ref SCIP_STAGE_SOLVING
432  */
433 SCIP_EXPORT
435  SCIP* scip, /**< SCIP data structure */
436  const char* filename /**< file name */
437  );
438 
439 /** gets the NLP interface and problem used by the SCIP NLP
440  *
441  * @warning With the NLPI and its problem, all methods defined in \ref scip_nlpi.h and \ref pub_nlpi.h can be used.
442  * It needs to be ensured that the full internal state of the NLPI does not change or is recovered completely
443  * after the end of the method that uses the NLPI. In particular, if the NLP or its solution is manipulated
444  * (e.g. by calling one of the SCIPaddNlpi...() or the SCIPsolveNlpi() method), one has to check in advance
445  * whether the NLP is currently solved. If this is the case, one has to make sure that the internal solution
446  * status is recovered completely again. Additionally one has to resolve the NLP with
447  * SCIPsolveNlpi() in order to reinstall the internal solution status.
448  *
449  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
450  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
451  *
452  * @pre This method can be called if SCIP is in one of the following stages:
453  * - \ref SCIP_STAGE_INITSOLVE
454  * - \ref SCIP_STAGE_SOLVING
455  */
456 SCIP_EXPORT
458  SCIP* scip, /**< SCIP data structure */
459  SCIP_NLPI** nlpi, /**< pointer to store the NLP solver interface */
460  SCIP_NLPIPROBLEM** nlpiproblem /**< pointer to store the NLP solver interface problem */
461  );
462 
463 /**@} */
464 
465 /**@addtogroup PublicNLPDiveMethods
466  *
467  * @{ */
468 
469 /** initiates NLP diving
470  *
471  * Makes functions SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP() and SCIPchgVarsBoundsDiveNLP() available.
472  * Further, SCIPsolveNLP() can be used to solve the diving NLP.
473  *
474  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
475  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
476  *
477  * @pre This method can be called if SCIP is in one of the following stages:
478  * - \ref SCIP_STAGE_INITSOLVE
479  * - \ref SCIP_STAGE_SOLVING
480  */
481 SCIP_EXPORT
483  SCIP* scip /**< SCIP data structure */
484  );
485 
486 /** ends NLP diving
487  *
488  * Resets changes made by SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP(), and SCIPchgVarsBoundsDiveNLP().
489  *
490  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
491  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
492  *
493  * @pre This method can be called if SCIP is in one of the following stages:
494  * - \ref SCIP_STAGE_INITSOLVE
495  * - \ref SCIP_STAGE_SOLVING
496  */
497 SCIP_EXPORT
499  SCIP* scip /**< SCIP data structure */
500  );
501 
502 /** changes linear objective coefficient of a variable in diving NLP
503  *
504  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
505  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
506  *
507  * @pre This method can be called if SCIP is in one of the following stages:
508  * - \ref SCIP_STAGE_INITSOLVE
509  * - \ref SCIP_STAGE_SOLVING
510  */
511 SCIP_EXPORT
513  SCIP* scip, /**< SCIP data structure */
514  SCIP_VAR* var, /**< variable which coefficient to change */
515  SCIP_Real coef /**< new value for coefficient */
516  );
517 
518 /** changes bounds of a variable in diving NLP
519  *
520  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
521  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
522  *
523  * @pre This method can be called if SCIP is in one of the following stages:
524  * - \ref SCIP_STAGE_INITSOLVE
525  * - \ref SCIP_STAGE_SOLVING
526  */
527 SCIP_EXPORT
529  SCIP* scip, /**< SCIP data structure */
530  SCIP_VAR* var, /**< variable which bounds to change */
531  SCIP_Real lb, /**< new lower bound */
532  SCIP_Real ub /**< new upper bound */
533  );
534 
535 /** changes bounds of a set of variables in diving NLP
536  *
537  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
538  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
539  *
540  * @pre This method can be called if SCIP is in one of the following stages:
541  * - \ref SCIP_STAGE_INITSOLVE
542  * - \ref SCIP_STAGE_SOLVING
543  */
544 SCIP_EXPORT
546  SCIP* scip, /**< SCIP data structure */
547  int nvars, /**< number of variables which bounds to changes */
548  SCIP_VAR** vars, /**< variables which bounds to change */
549  SCIP_Real* lbs, /**< new lower bounds */
550  SCIP_Real* ubs /**< new upper bounds */
551  );
552 
553 /**@} */
554 
555 /**@addtogroup PublicNLRowMethods
556  *
557  * @{
558  */
559 
560 /** creates and captures a nonlinear row
561  *
562  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
563  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
564  *
565  * @pre This method can be called if SCIP is in one of the following stages:
566  * - \ref SCIP_STAGE_PRESOLVED
567  * - \ref SCIP_STAGE_INITSOLVE
568  * - \ref SCIP_STAGE_SOLVING
569  */
570 SCIP_EXPORT
572  SCIP* scip, /**< SCIP data structure */
573  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
574  const char* name, /**< name of nonlinear row */
575  SCIP_Real constant, /**< constant */
576  int nlinvars, /**< number of linear variables */
577  SCIP_VAR** linvars, /**< linear variables, or NULL if nlinvars == 0 */
578  SCIP_Real* lincoefs, /**< linear coefficients, or NULL if nlinvars == 0 */
579  SCIP_EXPR* expr, /**< nonlinear expression, or NULL */
580  SCIP_Real lhs, /**< left hand side */
581  SCIP_Real rhs, /**< right hand side */
582  SCIP_EXPRCURV curvature /**< curvature of the nonlinear row */
583  );
584 
585 /** creates and captures a nonlinear row without any coefficients
586  *
587  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
588  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
589  *
590  * @pre This method can be called if SCIP is in one of the following stages:
591  * - \ref SCIP_STAGE_PRESOLVED
592  * - \ref SCIP_STAGE_INITSOLVE
593  * - \ref SCIP_STAGE_SOLVING
594  */
595 SCIP_EXPORT
597  SCIP* scip, /**< SCIP data structure */
598  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
599  const char* name, /**< name of nonlinear row */
600  SCIP_Real lhs, /**< left hand side */
601  SCIP_Real rhs /**< right hand side */
602  );
603 
604 /** creates and captures a nonlinear row from a linear row
605  *
606  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
607  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
608  *
609  * @pre This method can be called if SCIP is in one of the following stages:
610  * - \ref SCIP_STAGE_PRESOLVED
611  * - \ref SCIP_STAGE_INITSOLVE
612  * - \ref SCIP_STAGE_SOLVING
613  */
614 SCIP_EXPORT
616  SCIP* scip, /**< SCIP data structure */
617  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
618  SCIP_ROW* row /**< the linear row to copy */
619  );
620 
621 /** increases usage counter of a nonlinear row
622  *
623  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
624  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
625  *
626  * @pre This method can be called if SCIP is in one of the following stages:
627  * - \ref SCIP_STAGE_PRESOLVED
628  * - \ref SCIP_STAGE_INITSOLVE
629  * - \ref SCIP_STAGE_SOLVING
630  */
631 SCIP_EXPORT
633  SCIP* scip, /**< SCIP data structure */
634  SCIP_NLROW* nlrow /**< nonlinear row to capture */
635  );
636 
637 /** decreases usage counter of a nonlinear row, and frees memory if necessary
638  *
639  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
640  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
641  *
642  * @pre This method can be called if SCIP is in one of the following stages:
643  * - \ref SCIP_STAGE_PRESOLVED
644  * - \ref SCIP_STAGE_INITSOLVE
645  * - \ref SCIP_STAGE_SOLVING
646  * - \ref SCIP_STAGE_EXITSOLVE
647  */
648 SCIP_EXPORT
650  SCIP* scip, /**< SCIP data structure */
651  SCIP_NLROW** nlrow /**< pointer to nonlinear row */
652  );
653 
654 /** changes left hand side of a nonlinear row
655  *
656  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
657  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
658  *
659  * @pre This method can be called if SCIP is in one of the following stages:
660  * - \ref SCIP_STAGE_PRESOLVED
661  * - \ref SCIP_STAGE_INITSOLVE
662  * - \ref SCIP_STAGE_SOLVING
663  */
664 SCIP_EXPORT
666  SCIP* scip, /**< SCIP data structure */
667  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
668  SCIP_Real lhs /**< new left hand side */
669  );
670 
671 /** changes right hand side of a nonlinear row
672  *
673  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
674  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
675  *
676  * @pre This method can be called if SCIP is in one of the following stages:
677  * - \ref SCIP_STAGE_PRESOLVED
678  * - \ref SCIP_STAGE_INITSOLVE
679  * - \ref SCIP_STAGE_SOLVING
680  */
681 SCIP_EXPORT
683  SCIP* scip, /**< SCIP data structure */
684  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
685  SCIP_Real rhs /**< new right hand side */
686  );
687 
688 /** changes constant of a nonlinear row
689  *
690  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
691  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
692  *
693  * @pre This method can be called if SCIP is in one of the following stages:
694  * - \ref SCIP_STAGE_PRESOLVED
695  * - \ref SCIP_STAGE_INITSOLVE
696  * - \ref SCIP_STAGE_SOLVING
697  */
698 SCIP_EXPORT
700  SCIP* scip, /**< SCIP data structure */
701  SCIP_NLROW* nlrow, /**< NLP row */
702  SCIP_Real constant /**< new value for constant */
703  );
704 
705 /** adds variable with a linear coefficient to a nonlinear row
706  *
707  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
708  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
709  *
710  * @pre This method can be called if SCIP is in one of the following stages:
711  * - \ref SCIP_STAGE_PRESOLVED
712  * - \ref SCIP_STAGE_INITSOLVE
713  * - \ref SCIP_STAGE_SOLVING
714  */
715 SCIP_EXPORT
717  SCIP* scip, /**< SCIP data structure */
718  SCIP_NLROW* nlrow, /**< NLP row */
719  SCIP_VAR* var, /**< problem variable */
720  SCIP_Real val /**< value of coefficient in linear part of row */
721  );
722 
723 /** adds variables with linear coefficients to a row
724  *
725  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
726  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
727  *
728  * @pre This method can be called if SCIP is in one of the following stages:
729  * - \ref SCIP_STAGE_PRESOLVED
730  * - \ref SCIP_STAGE_INITSOLVE
731  * - \ref SCIP_STAGE_SOLVING
732  */
733 SCIP_EXPORT
735  SCIP* scip, /**< SCIP data structure */
736  SCIP_NLROW* nlrow, /**< NLP row */
737  int nvars, /**< number of variables to add to the row */
738  SCIP_VAR** vars, /**< problem variables to add */
739  SCIP_Real* vals /**< values of coefficients in linear part of row */
740  );
741 
742 /** changes linear coefficient of a variables in a nonlinear row
743  *
744  * Setting the coefficient to 0.0 means that it is removed from the row.
745  * The variable does not need to exists before.
746  *
747  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
748  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
749  *
750  * @pre This method can be called if SCIP is in one of the following stages:
751  * - \ref SCIP_STAGE_PRESOLVED
752  * - \ref SCIP_STAGE_INITSOLVE
753  * - \ref SCIP_STAGE_SOLVING
754  */
755 SCIP_EXPORT
757  SCIP* scip, /**< SCIP data structure */
758  SCIP_NLROW* nlrow, /**< NLP row */
759  SCIP_VAR* var, /**< variable */
760  SCIP_Real coef /**< new value of coefficient */
761  );
762 
763 /** sets or deletes expression in a 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  */
773 SCIP_EXPORT
775  SCIP* scip, /**< SCIP data structure */
776  SCIP_NLROW* nlrow, /**< NLP row */
777  SCIP_EXPR* expr /**< expression, or NULL */
778  );
779 
780 /** recalculates the activity of a nonlinear row in the last NLP solution
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  */
790 SCIP_EXPORT
792  SCIP* scip, /**< SCIP data structure */
793  SCIP_NLROW* nlrow /**< NLP nonlinear row */
794  );
795 
796 /** returns the activity of a nonlinear row in the last NLP solution
797  *
798  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
799  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
800  *
801  * @pre This method can be called if SCIP is in one of the following stages:
802  * - \ref SCIP_STAGE_INITSOLVE
803  * - \ref SCIP_STAGE_SOLVING
804  */
805 SCIP_EXPORT
807  SCIP* scip, /**< SCIP data structure */
808  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
809  SCIP_Real* activity /**< pointer to store activity value */
810  );
811 
812 /** gives the feasibility of a nonlinear row in the last NLP solution: negative value means infeasibility
813  *
814  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
815  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
816  *
817  * @pre This method can be called if SCIP is in one of the following stages:
818  * - \ref SCIP_STAGE_INITSOLVE
819  * - \ref SCIP_STAGE_SOLVING
820  */
821 SCIP_EXPORT
823  SCIP* scip, /**< SCIP data structure */
824  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
825  SCIP_Real* feasibility /**< pointer to store feasibility value */
826  );
827 
828 /** recalculates the activity of a nonlinear row for the current pseudo solution
829  *
830  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
831  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
832  *
833  * @pre This method can be called if SCIP is in one of the following stages:
834  * - \ref SCIP_STAGE_INITSOLVE
835  * - \ref SCIP_STAGE_SOLVING
836  */
837 SCIP_EXPORT
839  SCIP* scip, /**< SCIP data structure */
840  SCIP_NLROW* nlrow /**< NLP nonlinear row */
841  );
842 
843 /** gives the activity of a nonlinear row for the current pseudo solution
844  *
845  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
846  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
847  *
848  * @pre This method can be called if SCIP is in one of the following stages:
849  * - \ref SCIP_STAGE_INITSOLVE
850  * - \ref SCIP_STAGE_SOLVING
851  */
852 SCIP_EXPORT
854  SCIP* scip, /**< SCIP data structure */
855  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
856  SCIP_Real* pseudoactivity /**< pointer to store pseudo activity value */
857  );
858 
859 /** gives the feasibility of a nonlinear row for the current pseudo solution: negative value means infeasibility
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_INITSOLVE
866  * - \ref SCIP_STAGE_SOLVING
867  */
868 SCIP_EXPORT
870  SCIP* scip, /**< SCIP data structure */
871  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
872  SCIP_Real* pseudofeasibility /**< pointer to store pseudo feasibility value */
873  );
874 
875 /** recalculates the activity of a nonlinear row in the last NLP or pseudo solution
876  *
877  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
878  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
879  *
880  * @pre This method can be called if SCIP is in one of the following stages:
881  * - \ref SCIP_STAGE_INITSOLVE
882  * - \ref SCIP_STAGE_SOLVING
883  */
884 SCIP_EXPORT
886  SCIP* scip, /**< SCIP data structure */
887  SCIP_NLROW* nlrow /**< NLP nonlinear row */
888  );
889 
890 /** gives the activity of a nonlinear row in the last NLP or pseudo solution
891  *
892  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
893  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
894  *
895  * @pre This method can be called if SCIP is in one of the following stages:
896  * - \ref SCIP_STAGE_INITSOLVE
897  * - \ref SCIP_STAGE_SOLVING
898  */
899 SCIP_EXPORT
901  SCIP* scip, /**< SCIP data structure */
902  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
903  SCIP_Real* activity /**< pointer to store activity value */
904  );
905 
906 /** gives the feasibility of a nonlinear row in the last NLP or pseudo solution
907  *
908  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
909  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
910  *
911  * @pre This method can be called if SCIP is in one of the following stages:
912  * - \ref SCIP_STAGE_INITSOLVE
913  * - \ref SCIP_STAGE_SOLVING
914  */
915 SCIP_EXPORT
917  SCIP* scip, /**< SCIP data structure */
918  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
919  SCIP_Real* feasibility /**< pointer to store feasibility value */
920  );
921 
922 /** gives the activity of a nonlinear row for the given primal solution or NLP solution or pseudo solution
923  *
924  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
925  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
926  *
927  * @pre This method can be called if SCIP is in one of the following stages:
928  * - \ref SCIP_STAGE_INITSOLVE
929  * - \ref SCIP_STAGE_SOLVING
930  */
931 SCIP_EXPORT
933  SCIP* scip, /**< SCIP data structure */
934  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
935  SCIP_SOL* sol, /**< primal CIP solution, or NULL for NLP solution of pseudo solution */
936  SCIP_Real* activity /**< pointer to store activity value */
937  );
938 
939 /** gives the feasibility of a nonlinear row for the given primal solution
940  *
941  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
942  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
943  *
944  * @pre This method can be called if SCIP is in one of the following stages:
945  * - \ref SCIP_STAGE_INITSOLVE
946  * - \ref SCIP_STAGE_SOLVING
947  */
948 SCIP_EXPORT
950  SCIP* scip, /**< SCIP data structure */
951  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
952  SCIP_SOL* sol, /**< primal CIP solution */
953  SCIP_Real* feasibility /**< pointer to store feasibility value */
954  );
955 
956 /** gives the minimal and maximal activity of a nonlinear row w.r.t. the variable's bounds
957  *
958  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
959  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
960  *
961  * @pre This method can be called if SCIP is in one of the following stages:
962  * - \ref SCIP_STAGE_PRESOLVED
963  * - \ref SCIP_STAGE_INITSOLVE
964  * - \ref SCIP_STAGE_SOLVING
965  */
966 SCIP_EXPORT
968  SCIP* scip, /**< SCIP data structure */
969  SCIP_NLROW* nlrow, /**< NLP row */
970  SCIP_Real* minactivity, /**< buffer to store minimal activity, or NULL */
971  SCIP_Real* maxactivity /**< buffer to store maximal activity, or NULL */
972  );
973 
974 /** prints a nonlinear row to file stream
975  *
976  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
977  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
978  *
979  * @pre This method can be called if SCIP is in one of the following stages:
980  * - \ref SCIP_STAGE_PRESOLVED
981  * - \ref SCIP_STAGE_INITSOLVE
982  * - \ref SCIP_STAGE_SOLVING
983  */
984 SCIP_EXPORT
986  SCIP* scip, /**< SCIP data structure */
987  SCIP_NLROW* nlrow, /**< NLP row */
988  FILE* file /**< output file (or NULL for standard output) */
989  );
990 
991 /**@} */
992 
993 #ifdef __cplusplus
994 }
995 #endif
996 
997 #endif
SCIP_RETCODE SCIPaddLinearCoefsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_nlp.c:1131
int SCIPgetNNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:332
SCIP_RETCODE SCIPgetNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudoactivity)
Definition: scip_nlp.c:1324
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition: type_nlpi.h:185
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
Definition: scip_nlp.c:101
type definitions for NLP management
SCIP_RETCODE SCIPgetNLPNlRowsData(SCIP *scip, SCIP_NLROW ***nlrows, int *nnlrows)
Definition: scip_nlp.c:282
SCIP_RETCODE SCIPchgNlRowRhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real rhs)
Definition: scip_nlp.c:1061
SCIP_NLPSOLSTAT SCIPgetNLPSolstat(SCIP *scip)
Definition: scip_nlp.c:532
SCIP_RETCODE SCIPchgVarObjDiveNLP(SCIP *scip, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:814
SCIP_RETCODE SCIPchgNlRowLinearCoef(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:1168
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
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:1454
SCIP_Real * SCIPgetNLPVarsLbDualsol(SCIP *scip)
Definition: scip_nlp.c:238
SCIP_RETCODE SCIPgetNLPVarsNonlinearity(SCIP *scip, int *nlcount)
Definition: scip_nlp.c:214
SCIP_RETCODE SCIPflushNLP(SCIP *scip)
Definition: scip_nlp.c:406
SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
Definition: scip_nlp.c:1107
SCIP_RETCODE SCIPcreateNlRowFromRow(SCIP *scip, SCIP_NLROW **nlrow, SCIP_ROW *row)
Definition: scip_nlp.c:970
type definitions for LP management
int SCIPgetNNLPVars(SCIP *scip)
Definition: scip_nlp.c:192
SCIP_NLPTERMSTAT SCIPgetNLPTermstat(SCIP *scip)
Definition: scip_nlp.c:554
SCIP_RETCODE SCIPrecalcNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1303
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:354
SCIP_RETCODE SCIPwriteNLP(SCIP *scip, const char *filename)
Definition: scip_nlp.c:685
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition: type_nlpi.h:159
SCIP_RETCODE SCIPhasNLPContinuousNonlinearity(SCIP *scip, SCIP_Bool *result)
Definition: scip_nlp.c:116
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
Definition: scip_nlp.c:1016
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:844
SCIP_RETCODE SCIPgetNlRowActivityBounds(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *minactivity, SCIP_Real *maxactivity)
Definition: scip_nlp.c:1523
SCIP_Bool SCIPisNLPEnabled(SCIP *scip)
Definition: scip_nlp.c:65
SCIP_RETCODE SCIPsetNLPInitialGuess(SCIP *scip, SCIP_Real *initialguess)
Definition: scip_nlp.c:432
SCIP_RETCODE SCIPsetNLPInitialGuessSol(SCIP *scip, SCIP_SOL *sol)
Definition: scip_nlp.c:459
SCIP_RETCODE SCIPgetNLPI(SCIP *scip, SCIP_NLPI **nlpi, SCIP_NLPIPROBLEM **nlpiproblem)
Definition: scip_nlp.c:720
SCIP_RETCODE SCIPrecalcNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1368
SCIP_NLROW ** SCIPgetNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:310
type definitions for problem variables
public methods for NLP management
SCIP_RETCODE SCIPchgNlRowLhs(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real lhs)
Definition: scip_nlp.c:1038
SCIP_Real * SCIPgetNLPVarsUbDualsol(SCIP *scip)
Definition: scip_nlp.c:260
SCIP_RETCODE SCIPgetNlRowFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1425
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPgetNLPStatistics(SCIP *scip, SCIP_NLPSTATISTICS *statistics)
Definition: scip_nlp.c:579
SCIP_RETCODE SCIPchgNlRowConstant(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real constant)
Definition: scip_nlp.c:1084
SCIP_RETCODE SCIPrecalcNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1220
SCIP_EXPRCURV
Definition: type_expr.h:48
SCIP_RETCODE SCIPgetNLPVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars)
Definition: scip_nlp.c:140
SCIP_RETCODE SCIPchgVarsBoundsDiveNLP(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *lbs, SCIP_Real *ubs)
Definition: scip_nlp.c:875
SCIP_RETCODE SCIPgetNlRowPseudoFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudofeasibility)
Definition: scip_nlp.c:1346
SCIP_RETCODE SCIPgetNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1396
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
Definition: scip_nlp.c:912
SCIP_RETCODE SCIPcreateEmptyNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real lhs, SCIP_Real rhs)
Definition: scip_nlp.c:944
SCIP_RETCODE SCIPcaptureNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:993
type definitions for storing primal CIP solutions
SCIP_RETCODE SCIPsetNlRowExpr(SCIP *scip, SCIP_NLROW *nlrow, SCIP_EXPR *expr)
Definition: scip_nlp.c:1194
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:382
void SCIPenableNLP(SCIP *scip)
Definition: scip_nlp.c:86
SCIP_RETCODE SCIPsolveNLPParam(SCIP *scip, SCIP_NLPPARAM param)
Definition: scip_nlp.c:503
SCIP_Bool SCIPhasNLPSolution(SCIP *scip)
Definition: scip_nlp.c:629
SCIP_RETCODE SCIPgetNlRowSolFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Real *feasibility)
Definition: scip_nlp.c:1488
SCIP_RETCODE SCIPendDiveNLP(SCIP *scip)
Definition: scip_nlp.c:788
type and macro definitions related to algebraic expressions
SCIP_RETCODE SCIPgetNLPFracVars(SCIP *scip, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
Definition: scip_nlp.c:654
#define SCIP_Real
Definition: def.h:177
SCIP_RETCODE SCIPgetNlRowNLPFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1275
SCIP_RETCODE SCIPprintNlRow(SCIP *scip, SCIP_NLROW *nlrow, FILE *file)
Definition: scip_nlp.c:1547
SCIP_Real SCIPgetNLPObjval(SCIP *scip)
Definition: scip_nlp.c:603
SCIP_RETCODE SCIPstartDiveNLP(SCIP *scip)
Definition: scip_nlp.c:760
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPgetNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1247
SCIP_VAR ** SCIPgetNLPVars(SCIP *scip)
Definition: scip_nlp.c:170
type definitions for NLP solver interfaces