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-2023 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 /** adds a nonlinear row to the NLP. This row is captured by the NLP.
223  *
224  * @pre This method can be called if SCIP is in one of the following stages:
225  * - \ref SCIP_STAGE_INITSOLVE
226  * - \ref SCIP_STAGE_SOLVING
227  */
228 SCIP_EXPORT
230  SCIP* scip, /**< SCIP data structure */
231  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
232  );
233 
234 /** removes a nonlinear row from the NLP
235  *
236  * This row is released in the NLP.
237  *
238  * @pre This method can be called if SCIP is in one of the following stages:
239  * - \ref SCIP_STAGE_INITSOLVE
240  * - \ref SCIP_STAGE_SOLVING
241  * - \ref SCIP_STAGE_SOLVED
242  * - \ref SCIP_STAGE_EXITSOLVE
243  */
244 SCIP_EXPORT
246  SCIP* scip, /**< SCIP data structure */
247  SCIP_NLROW* nlrow /**< nonlinear row to add to NLP */
248  );
249 
250 /** makes sure that the NLP of the current node is flushed
251  *
252  * @pre This method can be called if SCIP is in one of the following stages:
253  * - \ref SCIP_STAGE_INITSOLVE
254  * - \ref SCIP_STAGE_SOLVING
255  */
256 SCIP_EXPORT
258  SCIP* scip /**< SCIP data structure */
259  );
260 
261 /** sets or clears initial primal guess for NLP solution (start point for NLP solver)
262  *
263  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
264  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
265  *
266  * @pre This method can be called if SCIP is in one of the following stages:
267  * - \ref SCIP_STAGE_INITSOLVE
268  * - \ref SCIP_STAGE_SOLVING
269  */
270 SCIP_EXPORT
272  SCIP* scip, /**< SCIP data structure */
273  SCIP_Real* initialguess /**< values of initial guess (corresponding to variables from SCIPgetNLPVarsData), or NULL to use no start point */
274  );
275 
276 /** sets initial primal guess for NLP solution (start point for NLP solver)
277  *
278  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
279  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
280  *
281  * @pre This method can be called if SCIP is in one of the following stages:
282  * - \ref SCIP_STAGE_INITSOLVE
283  * - \ref SCIP_STAGE_SOLVING
284  */
285 SCIP_EXPORT
287  SCIP* scip, /**< SCIP data structure */
288  SCIP_SOL* sol /**< solution which values should be taken as initial guess, or NULL for LP solution */
289  );
290 
291 /** solves the current NLP (or diving NLP if in diving mode) with given parameters
292  *
293  * Typical use is
294  *
295  * SCIP_NLPPARAM nlparam = { SCIP_NLPPARAM_DEFAULT(scip); }
296  * nlpparam.iterlimit = 42;
297  * SCIP_CALL( SCIPsolveNLPParam(scip, nlpparam) );
298  *
299  * or, in one line:
300  *
301  * SCIP_CALL( SCIPsolveNLPParam(scip, (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT(scip), .iterlimit = 42 }) );
302  *
303  * To get the latter, also \ref SCIPsolveNLP can be used.
304  *
305  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
306  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
307  *
308  * @pre This method can be called if SCIP is in one of the following stages:
309  * - \ref SCIP_STAGE_INITSOLVE
310  * - \ref SCIP_STAGE_SOLVING
311  */
312 SCIP_EXPORT
314  SCIP* scip, /**< SCIP data structure */
315  SCIP_NLPPARAM param /**< NLP solve parameters */
316  );
317 
318 /** solves the current NLP (or diving NLP if in diving mode) with non-default parameters given as optional arguments
319  *
320  * Typical use is
321  *
322  * SCIP_CALL( SCIPsolveNLP(scip) );
323  *
324  * to solve with default parameters.
325  * Additionally, one or several values of SCIP_NLPPARAM can be set:
326  *
327  * SCIP_CALL( SCIPsolveNLP(scip, .iterlimit = 42, .verblevel = 1) ); //lint !e666
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  */
336 /* 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
337  * for the same reason, we have the .caller argument, so that macro SCIP_VARARGS_REST will have at least one arg to return
338  */
339 #if !defined(_MSC_VER) || _MSC_VER >= 1800
340 #define SCIPsolveNLP(...) \
341  SCIPsolveNLPParam(SCIP_VARARGS_FIRST((__VA_ARGS__, ignored)), \
342  (SCIP_NLPPARAM){ SCIP_NLPPARAM_DEFAULT_INITS(SCIP_VARARGS_FIRST((__VA_ARGS__, ignored))), SCIP_VARARGS_REST(__VA_ARGS__, .caller = __FILE__) })
343 #else
344 /* very old MSVC doesn't support C99's designated initializers, so have a version of SCIPsolveNLP() that just ignores given parameters
345  * (compilation of scip_nlp.c will print a warning)
346  */
347 #define SCIPsolveNLP(...) \
348  SCIPsolveNLPParam(SCIP_VARARGS_FIRST((__VA_ARGS__, ignored)), SCIP_NLPPARAM_DEFAULT_STATIC)
349 #endif
350 
351 
352 /** gets solution status of current NLP
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  */
358 SCIP_EXPORT
360  SCIP* scip /**< SCIP data structure */
361  );
362 
363 /** gets termination status of last NLP solve
364  *
365  * @pre This method can be called if SCIP is in one of the following stages:
366  * - \ref SCIP_STAGE_INITSOLVE
367  * - \ref SCIP_STAGE_SOLVING
368  */
369 SCIP_EXPORT
371  SCIP* scip /**< SCIP data structure */
372  );
373 
374 /** gives statistics (number of iterations, solving time, ...) of last NLP solve
375  *
376  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
377  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
378  *
379  * @pre This method can be called if SCIP is in one of the following stages:
380  * - \ref SCIP_STAGE_INITSOLVE
381  * - \ref SCIP_STAGE_SOLVING
382  */
383 SCIP_EXPORT
385  SCIP* scip, /**< SCIP data structure */
386  SCIP_NLPSTATISTICS* statistics /**< pointer to store statistics */
387  );
388 
389 /** gets objective value of current NLP
390  *
391  * @pre This method can be called if SCIP is in one of the following stages:
392  * - \ref SCIP_STAGE_INITSOLVE
393  * - \ref SCIP_STAGE_SOLVING
394  */
395 SCIP_EXPORT
397  SCIP* scip /**< SCIP data structure */
398  );
399 
400 /** indicates whether a solution for the current NLP is available
401  *
402  * The solution may be optimal, feasible, or infeasible.
403  * Thus, returns whether the NLP solution status is at most \ref SCIP_NLPSOLSTAT_LOCINFEASIBLE.
404  *
405  * @pre This method can be called if SCIP is in one of the following stages:
406  * - \ref SCIP_STAGE_INITSOLVE
407  * - \ref SCIP_STAGE_SOLVING
408  */
409 SCIP_EXPORT
411  SCIP* scip /**< SCIP data structure */
412  );
413 
414 /** gets fractional variables of last NLP solution along with solution values and fractionalities
415  *
416  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
417  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
418  *
419  * @pre This method can be called if SCIP is in one of the following stages:
420  * - \ref SCIP_STAGE_INITSOLVE
421  * - \ref SCIP_STAGE_SOLVING
422  */
423 SCIP_EXPORT
425  SCIP* scip, /**< SCIP data structure */
426  SCIP_VAR*** fracvars, /**< pointer to store the array of NLP fractional variables, or NULL */
427  SCIP_Real** fracvarssol, /**< pointer to store the array of NLP fractional variables solution values, or NULL */
428  SCIP_Real** fracvarsfrac, /**< pointer to store the array of NLP fractional variables fractionalities, or NULL */
429  int* nfracvars, /**< pointer to store the number of NLP fractional variables , or NULL */
430  int* npriofracvars /**< pointer to store the number of NLP fractional variables with maximal branching priority, or NULL */
431  );
432 
433 /** writes current NLP to a file
434  *
435  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
436  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
437  *
438  * @pre This method can be called if SCIP is in one of the following stages:
439  * - \ref SCIP_STAGE_INITSOLVE
440  * - \ref SCIP_STAGE_SOLVING
441  */
442 SCIP_EXPORT
444  SCIP* scip, /**< SCIP data structure */
445  const char* filename /**< file name */
446  );
447 
448 /** gets the NLP interface and problem used by the SCIP NLP
449  *
450  * @warning With the NLPI and its problem, all methods defined in \ref scip_nlpi.h and \ref pub_nlpi.h can be used.
451  * It needs to be ensured that the full internal state of the NLPI does not change or is recovered completely
452  * after the end of the method that uses the NLPI. In particular, if the NLP or its solution is manipulated
453  * (e.g. by calling one of the SCIPaddNlpi...() or the SCIPsolveNlpi() method), one has to check in advance
454  * whether the NLP is currently solved. If this is the case, one has to make sure that the internal solution
455  * status is recovered completely again. Additionally one has to resolve the NLP with
456  * SCIPsolveNlpi() in order to reinstall the internal solution status.
457  *
458  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
459  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
460  *
461  * @pre This method can be called if SCIP is in one of the following stages:
462  * - \ref SCIP_STAGE_INITSOLVE
463  * - \ref SCIP_STAGE_SOLVING
464  */
465 SCIP_EXPORT
467  SCIP* scip, /**< SCIP data structure */
468  SCIP_NLPI** nlpi, /**< pointer to store the NLP solver interface */
469  SCIP_NLPIPROBLEM** nlpiproblem /**< pointer to store the NLP solver interface problem */
470  );
471 
472 /**@} */
473 
474 /**@addtogroup PublicNLPDiveMethods
475  *
476  * @{ */
477 
478 /** initiates NLP diving
479  *
480  * Makes functions SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP() and SCIPchgVarsBoundsDiveNLP() available.
481  * Further, SCIPsolveNLP() can be used to solve the diving NLP.
482  *
483  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
484  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
485  *
486  * @pre This method can be called if SCIP is in one of the following stages:
487  * - \ref SCIP_STAGE_INITSOLVE
488  * - \ref SCIP_STAGE_SOLVING
489  */
490 SCIP_EXPORT
492  SCIP* scip /**< SCIP data structure */
493  );
494 
495 /** ends NLP diving
496  *
497  * Resets changes made by SCIPchgVarObjDiveNLP(), SCIPchgVarBoundsDiveNLP(), and SCIPchgVarsBoundsDiveNLP().
498  *
499  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
500  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
501  *
502  * @pre This method can be called if SCIP is in one of the following stages:
503  * - \ref SCIP_STAGE_INITSOLVE
504  * - \ref SCIP_STAGE_SOLVING
505  */
506 SCIP_EXPORT
508  SCIP* scip /**< SCIP data structure */
509  );
510 
511 /** changes linear objective coefficient of a variable in diving NLP
512  *
513  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
514  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
515  *
516  * @pre This method can be called if SCIP is in one of the following stages:
517  * - \ref SCIP_STAGE_INITSOLVE
518  * - \ref SCIP_STAGE_SOLVING
519  */
520 SCIP_EXPORT
522  SCIP* scip, /**< SCIP data structure */
523  SCIP_VAR* var, /**< variable which coefficient to change */
524  SCIP_Real coef /**< new value for coefficient */
525  );
526 
527 /** changes bounds of a variable in diving NLP
528  *
529  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
530  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
531  *
532  * @pre This method can be called if SCIP is in one of the following stages:
533  * - \ref SCIP_STAGE_INITSOLVE
534  * - \ref SCIP_STAGE_SOLVING
535  */
536 SCIP_EXPORT
538  SCIP* scip, /**< SCIP data structure */
539  SCIP_VAR* var, /**< variable which bounds to change */
540  SCIP_Real lb, /**< new lower bound */
541  SCIP_Real ub /**< new upper bound */
542  );
543 
544 /** changes bounds of a set of variables in diving NLP
545  *
546  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
547  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
548  *
549  * @pre This method can be called if SCIP is in one of the following stages:
550  * - \ref SCIP_STAGE_INITSOLVE
551  * - \ref SCIP_STAGE_SOLVING
552  */
553 SCIP_EXPORT
555  SCIP* scip, /**< SCIP data structure */
556  int nvars, /**< number of variables which bounds to changes */
557  SCIP_VAR** vars, /**< variables which bounds to change */
558  SCIP_Real* lbs, /**< new lower bounds */
559  SCIP_Real* ubs /**< new upper bounds */
560  );
561 
562 /**@} */
563 
564 /**@addtogroup PublicNLRowMethods
565  *
566  * @{
567  */
568 
569 /** creates and captures a nonlinear row
570  *
571  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
572  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
573  *
574  * @pre This method can be called if SCIP is in one of the following stages:
575  * - \ref SCIP_STAGE_PRESOLVED
576  * - \ref SCIP_STAGE_INITSOLVE
577  * - \ref SCIP_STAGE_SOLVING
578  */
579 SCIP_EXPORT
581  SCIP* scip, /**< SCIP data structure */
582  SCIP_NLROW** nlrow, /**< buffer to store pointer to nonlinear row */
583  const char* name, /**< name of nonlinear row */
584  SCIP_Real constant, /**< constant */
585  int nlinvars, /**< number of linear variables */
586  SCIP_VAR** linvars, /**< linear variables, or NULL if nlinvars == 0 */
587  SCIP_Real* lincoefs, /**< linear coefficients, or NULL if nlinvars == 0 */
588  SCIP_EXPR* expr, /**< nonlinear expression, or NULL */
589  SCIP_Real lhs, /**< left hand side */
590  SCIP_Real rhs, /**< right hand side */
591  SCIP_EXPRCURV curvature /**< curvature of the nonlinear row */
592  );
593 
594 /** creates and captures a nonlinear row without any coefficients
595  *
596  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
597  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
598  *
599  * @pre This method can be called if SCIP is in one of the following stages:
600  * - \ref SCIP_STAGE_PRESOLVED
601  * - \ref SCIP_STAGE_INITSOLVE
602  * - \ref SCIP_STAGE_SOLVING
603  */
604 SCIP_EXPORT
606  SCIP* scip, /**< SCIP data structure */
607  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
608  const char* name, /**< name of nonlinear row */
609  SCIP_Real lhs, /**< left hand side */
610  SCIP_Real rhs /**< right hand side */
611  );
612 
613 /** creates and captures a nonlinear row from a linear row
614  *
615  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
616  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
617  *
618  * @pre This method can be called if SCIP is in one of the following stages:
619  * - \ref SCIP_STAGE_PRESOLVED
620  * - \ref SCIP_STAGE_INITSOLVE
621  * - \ref SCIP_STAGE_SOLVING
622  */
623 SCIP_EXPORT
625  SCIP* scip, /**< SCIP data structure */
626  SCIP_NLROW** nlrow, /**< pointer to nonlinear row */
627  SCIP_ROW* row /**< the linear row to copy */
628  );
629 
630 /** increases usage counter of a nonlinear row
631  *
632  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
633  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
634  *
635  * @pre This method can be called if SCIP is in one of the following stages:
636  * - \ref SCIP_STAGE_PRESOLVED
637  * - \ref SCIP_STAGE_INITSOLVE
638  * - \ref SCIP_STAGE_SOLVING
639  */
640 SCIP_EXPORT
642  SCIP* scip, /**< SCIP data structure */
643  SCIP_NLROW* nlrow /**< nonlinear row to capture */
644  );
645 
646 /** decreases usage counter of a nonlinear row, and frees memory if necessary
647  *
648  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
649  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
650  *
651  * @pre This method can be called if SCIP is in one of the following stages:
652  * - \ref SCIP_STAGE_PRESOLVED
653  * - \ref SCIP_STAGE_INITSOLVE
654  * - \ref SCIP_STAGE_SOLVING
655  * - \ref SCIP_STAGE_EXITSOLVE
656  */
657 SCIP_EXPORT
659  SCIP* scip, /**< SCIP data structure */
660  SCIP_NLROW** nlrow /**< pointer to nonlinear row */
661  );
662 
663 /** changes left hand side of a nonlinear row
664  *
665  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
666  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
667  *
668  * @pre This method can be called if SCIP is in one of the following stages:
669  * - \ref SCIP_STAGE_PRESOLVED
670  * - \ref SCIP_STAGE_INITSOLVE
671  * - \ref SCIP_STAGE_SOLVING
672  */
673 SCIP_EXPORT
675  SCIP* scip, /**< SCIP data structure */
676  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
677  SCIP_Real lhs /**< new left hand side */
678  );
679 
680 /** changes right hand side of a nonlinear row
681  *
682  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
683  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
684  *
685  * @pre This method can be called if SCIP is in one of the following stages:
686  * - \ref SCIP_STAGE_PRESOLVED
687  * - \ref SCIP_STAGE_INITSOLVE
688  * - \ref SCIP_STAGE_SOLVING
689  */
690 SCIP_EXPORT
692  SCIP* scip, /**< SCIP data structure */
693  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
694  SCIP_Real rhs /**< new right hand side */
695  );
696 
697 /** changes constant of a nonlinear row
698  *
699  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
700  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
701  *
702  * @pre This method can be called if SCIP is in one of the following stages:
703  * - \ref SCIP_STAGE_PRESOLVED
704  * - \ref SCIP_STAGE_INITSOLVE
705  * - \ref SCIP_STAGE_SOLVING
706  */
707 SCIP_EXPORT
709  SCIP* scip, /**< SCIP data structure */
710  SCIP_NLROW* nlrow, /**< NLP row */
711  SCIP_Real constant /**< new value for constant */
712  );
713 
714 /** adds variable with a linear coefficient to a nonlinear row
715  *
716  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
717  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
718  *
719  * @pre This method can be called if SCIP is in one of the following stages:
720  * - \ref SCIP_STAGE_PRESOLVED
721  * - \ref SCIP_STAGE_INITSOLVE
722  * - \ref SCIP_STAGE_SOLVING
723  */
724 SCIP_EXPORT
726  SCIP* scip, /**< SCIP data structure */
727  SCIP_NLROW* nlrow, /**< NLP row */
728  SCIP_VAR* var, /**< problem variable */
729  SCIP_Real val /**< value of coefficient in linear part of row */
730  );
731 
732 /** adds variables with linear coefficients to a row
733  *
734  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
735  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
736  *
737  * @pre This method can be called if SCIP is in one of the following stages:
738  * - \ref SCIP_STAGE_PRESOLVED
739  * - \ref SCIP_STAGE_INITSOLVE
740  * - \ref SCIP_STAGE_SOLVING
741  */
742 SCIP_EXPORT
744  SCIP* scip, /**< SCIP data structure */
745  SCIP_NLROW* nlrow, /**< NLP row */
746  int nvars, /**< number of variables to add to the row */
747  SCIP_VAR** vars, /**< problem variables to add */
748  SCIP_Real* vals /**< values of coefficients in linear part of row */
749  );
750 
751 /** changes linear coefficient of a variables in a nonlinear row
752  *
753  * Setting the coefficient to 0.0 means that it is removed from the row.
754  * The variable does not need to exists before.
755  *
756  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
757  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
758  *
759  * @pre This method can be called if SCIP is in one of the following stages:
760  * - \ref SCIP_STAGE_PRESOLVED
761  * - \ref SCIP_STAGE_INITSOLVE
762  * - \ref SCIP_STAGE_SOLVING
763  */
764 SCIP_EXPORT
766  SCIP* scip, /**< SCIP data structure */
767  SCIP_NLROW* nlrow, /**< NLP row */
768  SCIP_VAR* var, /**< variable */
769  SCIP_Real coef /**< new value of coefficient */
770  );
771 
772 /** sets or deletes expression in a nonlinear row
773  *
774  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
775  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
776  *
777  * @pre This method can be called if SCIP is in one of the following stages:
778  * - \ref SCIP_STAGE_PRESOLVED
779  * - \ref SCIP_STAGE_INITSOLVE
780  * - \ref SCIP_STAGE_SOLVING
781  */
782 SCIP_EXPORT
784  SCIP* scip, /**< SCIP data structure */
785  SCIP_NLROW* nlrow, /**< NLP row */
786  SCIP_EXPR* expr /**< expression, or NULL */
787  );
788 
789 /** recalculates the activity of a nonlinear row in the last NLP solution
790  *
791  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
792  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
793  *
794  * @pre This method can be called if SCIP is in one of the following stages:
795  * - \ref SCIP_STAGE_PRESOLVED
796  * - \ref SCIP_STAGE_INITSOLVE
797  * - \ref SCIP_STAGE_SOLVING
798  */
799 SCIP_EXPORT
801  SCIP* scip, /**< SCIP data structure */
802  SCIP_NLROW* nlrow /**< NLP nonlinear row */
803  );
804 
805 /** returns the activity of a nonlinear row in the last NLP solution
806  *
807  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
808  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
809  *
810  * @pre This method can be called if SCIP is in one of the following stages:
811  * - \ref SCIP_STAGE_INITSOLVE
812  * - \ref SCIP_STAGE_SOLVING
813  */
814 SCIP_EXPORT
816  SCIP* scip, /**< SCIP data structure */
817  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
818  SCIP_Real* activity /**< pointer to store activity value */
819  );
820 
821 /** gives the feasibility of a nonlinear row in the last NLP solution: negative value means infeasibility
822  *
823  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
824  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
825  *
826  * @pre This method can be called if SCIP is in one of the following stages:
827  * - \ref SCIP_STAGE_INITSOLVE
828  * - \ref SCIP_STAGE_SOLVING
829  */
830 SCIP_EXPORT
832  SCIP* scip, /**< SCIP data structure */
833  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
834  SCIP_Real* feasibility /**< pointer to store feasibility value */
835  );
836 
837 /** recalculates the activity of a nonlinear row for the current pseudo solution
838  *
839  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
840  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
841  *
842  * @pre This method can be called if SCIP is in one of the following stages:
843  * - \ref SCIP_STAGE_INITSOLVE
844  * - \ref SCIP_STAGE_SOLVING
845  */
846 SCIP_EXPORT
848  SCIP* scip, /**< SCIP data structure */
849  SCIP_NLROW* nlrow /**< NLP nonlinear row */
850  );
851 
852 /** gives the activity of a nonlinear row for the current pseudo solution
853  *
854  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
855  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
856  *
857  * @pre This method can be called if SCIP is in one of the following stages:
858  * - \ref SCIP_STAGE_INITSOLVE
859  * - \ref SCIP_STAGE_SOLVING
860  */
861 SCIP_EXPORT
863  SCIP* scip, /**< SCIP data structure */
864  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
865  SCIP_Real* pseudoactivity /**< pointer to store pseudo activity value */
866  );
867 
868 /** gives the feasibility of a nonlinear row for the current pseudo solution: negative value means infeasibility
869  *
870  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
871  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
872  *
873  * @pre This method can be called if SCIP is in one of the following stages:
874  * - \ref SCIP_STAGE_INITSOLVE
875  * - \ref SCIP_STAGE_SOLVING
876  */
877 SCIP_EXPORT
879  SCIP* scip, /**< SCIP data structure */
880  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
881  SCIP_Real* pseudofeasibility /**< pointer to store pseudo feasibility value */
882  );
883 
884 /** recalculates the activity of a nonlinear row in the last NLP or pseudo solution
885  *
886  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
887  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
888  *
889  * @pre This method can be called if SCIP is in one of the following stages:
890  * - \ref SCIP_STAGE_INITSOLVE
891  * - \ref SCIP_STAGE_SOLVING
892  */
893 SCIP_EXPORT
895  SCIP* scip, /**< SCIP data structure */
896  SCIP_NLROW* nlrow /**< NLP nonlinear row */
897  );
898 
899 /** gives the activity of a nonlinear row in the last NLP or pseudo solution
900  *
901  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
902  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
903  *
904  * @pre This method can be called if SCIP is in one of the following stages:
905  * - \ref SCIP_STAGE_INITSOLVE
906  * - \ref SCIP_STAGE_SOLVING
907  */
908 SCIP_EXPORT
910  SCIP* scip, /**< SCIP data structure */
911  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
912  SCIP_Real* activity /**< pointer to store activity value */
913  );
914 
915 /** gives the feasibility of a nonlinear row in the last NLP or pseudo solution
916  *
917  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
918  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
919  *
920  * @pre This method can be called if SCIP is in one of the following stages:
921  * - \ref SCIP_STAGE_INITSOLVE
922  * - \ref SCIP_STAGE_SOLVING
923  */
924 SCIP_EXPORT
926  SCIP* scip, /**< SCIP data structure */
927  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
928  SCIP_Real* feasibility /**< pointer to store feasibility value */
929  );
930 
931 /** gives the activity of a nonlinear row for the given primal solution or NLP solution or pseudo solution
932  *
933  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
934  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
935  *
936  * @pre This method can be called if SCIP is in one of the following stages:
937  * - \ref SCIP_STAGE_INITSOLVE
938  * - \ref SCIP_STAGE_SOLVING
939  */
940 SCIP_EXPORT
942  SCIP* scip, /**< SCIP data structure */
943  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
944  SCIP_SOL* sol, /**< primal CIP solution, or NULL for NLP solution of pseudo solution */
945  SCIP_Real* activity /**< pointer to store activity value */
946  );
947 
948 /** gives the feasibility of a nonlinear row for the given primal solution
949  *
950  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
951  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
952  *
953  * @pre This method can be called if SCIP is in one of the following stages:
954  * - \ref SCIP_STAGE_INITSOLVE
955  * - \ref SCIP_STAGE_SOLVING
956  */
957 SCIP_EXPORT
959  SCIP* scip, /**< SCIP data structure */
960  SCIP_NLROW* nlrow, /**< NLP nonlinear row */
961  SCIP_SOL* sol, /**< primal CIP solution */
962  SCIP_Real* feasibility /**< pointer to store feasibility value */
963  );
964 
965 /** gives the minimal and maximal activity of a nonlinear row w.r.t. the variable's bounds
966  *
967  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
968  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
969  *
970  * @pre This method can be called if SCIP is in one of the following stages:
971  * - \ref SCIP_STAGE_PRESOLVED
972  * - \ref SCIP_STAGE_INITSOLVE
973  * - \ref SCIP_STAGE_SOLVING
974  */
975 SCIP_EXPORT
977  SCIP* scip, /**< SCIP data structure */
978  SCIP_NLROW* nlrow, /**< NLP row */
979  SCIP_Real* minactivity, /**< buffer to store minimal activity, or NULL */
980  SCIP_Real* maxactivity /**< buffer to store maximal activity, or NULL */
981  );
982 
983 /** prints a nonlinear row to file stream
984  *
985  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
986  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
987  *
988  * @pre This method can be called if SCIP is in one of the following stages:
989  * - \ref SCIP_STAGE_PRESOLVED
990  * - \ref SCIP_STAGE_INITSOLVE
991  * - \ref SCIP_STAGE_SOLVING
992  */
993 SCIP_EXPORT
995  SCIP* scip, /**< SCIP data structure */
996  SCIP_NLROW* nlrow, /**< NLP row */
997  FILE* file /**< output file (or NULL for standard output) */
998  );
999 
1000 /**@} */
1001 
1002 #ifdef __cplusplus
1003 }
1004 #endif
1005 
1006 #endif
SCIP_RETCODE SCIPaddLinearCoefsToNlRow(SCIP *scip, SCIP_NLROW *nlrow, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_nlp.c:1140
int SCIPgetNNLPNlRows(SCIP *scip)
Definition: scip_nlp.c:341
SCIP_RETCODE SCIPgetNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudoactivity)
Definition: scip_nlp.c:1333
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:1070
SCIP_NLPSOLSTAT SCIPgetNLPSolstat(SCIP *scip)
Definition: scip_nlp.c:541
SCIP_RETCODE SCIPchgVarObjDiveNLP(SCIP *scip, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:823
SCIP_RETCODE SCIPchgNlRowLinearCoef(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real coef)
Definition: scip_nlp.c:1177
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:1463
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:415
SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
Definition: scip_nlp.c:1116
SCIP_RETCODE SCIPcreateNlRowFromRow(SCIP *scip, SCIP_NLROW **nlrow, SCIP_ROW *row)
Definition: scip_nlp.c:979
type definitions for LP management
int SCIPgetNNLPVars(SCIP *scip)
Definition: scip_nlp.c:201
SCIP_NLPTERMSTAT SCIPgetNLPTermstat(SCIP *scip)
Definition: scip_nlp.c:563
SCIP_RETCODE SCIPrecalcNlRowPseudoActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1312
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:363
SCIP_RETCODE SCIPwriteNLP(SCIP *scip, const char *filename)
Definition: scip_nlp.c:694
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:1025
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:853
SCIP_RETCODE SCIPgetNlRowActivityBounds(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *minactivity, SCIP_Real *maxactivity)
Definition: scip_nlp.c:1532
SCIP_Bool SCIPisNLPEnabled(SCIP *scip)
Definition: scip_nlp.c:74
SCIP_RETCODE SCIPsetNLPInitialGuess(SCIP *scip, SCIP_Real *initialguess)
Definition: scip_nlp.c:441
SCIP_RETCODE SCIPsetNLPInitialGuessSol(SCIP *scip, SCIP_SOL *sol)
Definition: scip_nlp.c:468
SCIP_RETCODE SCIPgetNLPI(SCIP *scip, SCIP_NLPI **nlpi, SCIP_NLPIPROBLEM **nlpiproblem)
Definition: scip_nlp.c:729
SCIP_RETCODE SCIPrecalcNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1377
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:1047
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:1434
#define SCIP_Bool
Definition: def.h:93
SCIP_RETCODE SCIPgetNLPStatistics(SCIP *scip, SCIP_NLPSTATISTICS *statistics)
Definition: scip_nlp.c:588
SCIP_RETCODE SCIPchgNlRowConstant(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real constant)
Definition: scip_nlp.c:1093
SCIP_RETCODE SCIPrecalcNlRowNLPActivity(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1229
SCIP_EXPRCURV
Definition: type_expr.h:57
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:884
SCIP_RETCODE SCIPgetNlRowPseudoFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *pseudofeasibility)
Definition: scip_nlp.c:1355
SCIP_RETCODE SCIPgetNlRowActivity(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *activity)
Definition: scip_nlp.c:1405
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:921
SCIP_RETCODE SCIPcreateEmptyNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real lhs, SCIP_Real rhs)
Definition: scip_nlp.c:953
SCIP_RETCODE SCIPcaptureNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:1002
type definitions for storing primal CIP solutions
SCIP_RETCODE SCIPsetNlRowExpr(SCIP *scip, SCIP_NLROW *nlrow, SCIP_EXPR *expr)
Definition: scip_nlp.c:1203
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
Definition: scip_nlp.c:391
void SCIPenableNLP(SCIP *scip)
Definition: scip_nlp.c:95
SCIP_RETCODE SCIPsolveNLPParam(SCIP *scip, SCIP_NLPPARAM param)
Definition: scip_nlp.c:512
SCIP_Bool SCIPhasNLPSolution(SCIP *scip)
Definition: scip_nlp.c:638
SCIP_RETCODE SCIPgetNlRowSolFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_SOL *sol, SCIP_Real *feasibility)
Definition: scip_nlp.c:1497
SCIP_RETCODE SCIPendDiveNLP(SCIP *scip)
Definition: scip_nlp.c:797
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:663
#define SCIP_Real
Definition: def.h:186
SCIP_RETCODE SCIPgetNlRowNLPFeasibility(SCIP *scip, SCIP_NLROW *nlrow, SCIP_Real *feasibility)
Definition: scip_nlp.c:1284
SCIP_RETCODE SCIPprintNlRow(SCIP *scip, SCIP_NLROW *nlrow, FILE *file)
Definition: scip_nlp.c:1556
SCIP_Real SCIPgetNLPObjval(SCIP *scip)
Definition: scip_nlp.c:612
SCIP_RETCODE SCIPstartDiveNLP(SCIP *scip)
Definition: scip_nlp.c:769
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:1256
SCIP_VAR ** SCIPgetNLPVars(SCIP *scip)
Definition: scip_nlp.c:179
type definitions for NLP solver interfaces