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