Scippy

SCIP

Solving Constraint Integer Programs

nlpi_ipopt.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 2002-2022 Zuse Institute Berlin */
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 nlpi_ipopt.h
26  * @brief Ipopt NLP interface
27  * @ingroup NLPIS
28  * @author Stefan Vigerske
29  * @author Benjamin Müller
30  */
31 
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #ifndef __SCIP_NLPI_IPOPT_H__
35 #define __SCIP_NLPI_IPOPT_H__
36 
37 #include "scip/type_nlpi.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /** create solver interface for Ipopt solver and includes it into SCIP, if Ipopt is available
44  *
45  * @ingroup NLPIIncludes
46  */
47 SCIP_EXPORT
49  SCIP* scip /**< SCIP data structure */
50  );
51 
52 /**@addtogroup NLPIS
53  *
54  * @{
55  */
56 
57 /** gets string that identifies Ipopt (version number) */
58 SCIP_EXPORT
59 const char* SCIPgetSolverNameIpopt(void);
60 
61 /** gets string that describes Ipopt */
62 SCIP_EXPORT
63 const char* SCIPgetSolverDescIpopt(void);
64 
65 /** returns whether Ipopt is available, i.e., whether it has been linked in */
66 SCIP_EXPORT
68 
69 /** gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure */
70 SCIP_EXPORT
72  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
73  );
74 
75 /** Calls Lapacks Dsyev routine to compute eigenvalues and eigenvectors of a dense matrix.
76  *
77  * It's here, because we use Ipopt's C interface to Lapack.
78  */
79 SCIP_EXPORT
81  SCIP_Bool computeeigenvectors,/**< should also eigenvectors should be computed ? */
82  int N, /**< dimension */
83  SCIP_Real* a, /**< matrix data on input (size N*N); eigenvectors on output if computeeigenvectors == TRUE */
84  SCIP_Real* w /**< buffer to store eigenvalues (size N) */
85  );
86 
87 /** solves a linear problem of the form Ax = b for a regular matrix A
88  *
89  * Calls Lapacks DGETRF routine to calculate a LU factorization and uses this factorization to solve
90  * the linear problem Ax = b.
91  *
92  * It's here, because we use Ipopt's C interface to Lapack.
93  */
94 SCIP_EXPORT
96  int N, /**< dimension */
97  SCIP_Real* A, /**< matrix data on input (size N*N); filled column-wise */
98  SCIP_Real* b, /**< right hand side vector (size N) */
99  SCIP_Real* x, /**< buffer to store solution (size N) */
100  SCIP_Bool* success /**< pointer to store if the solving routine was successful */
101  );
102 
103 /** @} */
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif /* __SCIP_NLPI_IPOPT_H__ */
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
SCIP_RETCODE SCIPincludeNlpSolverIpopt(SCIP *scip)
SCIP_RETCODE SCIPcallLapackDsyevIpopt(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_VAR ** x
Definition: circlepacking.c:63
SCIP_VAR * w
Definition: circlepacking.c:67
const char * SCIPgetSolverNameIpopt(void)
SCIP_RETCODE SCIPsolveLinearEquationsIpopt(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
#define SCIP_Bool
Definition: def.h:93
SCIP_VAR ** b
Definition: circlepacking.c:65
SCIP_VAR * a
Definition: circlepacking.c:66
const char * SCIPgetSolverDescIpopt(void)
#define SCIP_Real
Definition: def.h:186
type definitions for NLP solver interfaces