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 (C) 2002-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file nlpi_ipopt.h
17  * @brief Ipopt NLP interface
18  * @ingroup NLPIS
19  * @author Stefan Vigerske
20  * @author Benjamin Müller
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_NLPI_IPOPT_H__
26 #define __SCIP_NLPI_IPOPT_H__
27 
28 #include "scip/type_nlpi.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /** create solver interface for Ipopt solver and includes it into SCIP, if Ipopt is available
35  *
36  * @ingroup NLPIIncludes
37  */
38 SCIP_EXPORT
40  SCIP* scip /**< SCIP data structure */
41  );
42 
43 /**@addtogroup NLPIS
44  *
45  * @{
46  */
47 
48 /** gets string that identifies Ipopt (version number) */
49 SCIP_EXPORT
50 const char* SCIPgetSolverNameIpopt(void);
51 
52 /** gets string that describes Ipopt */
53 SCIP_EXPORT
54 const char* SCIPgetSolverDescIpopt(void);
55 
56 /** returns whether Ipopt is available, i.e., whether it has been linked in */
57 SCIP_EXPORT
59 
60 /** gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure */
61 SCIP_EXPORT
63  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
64  );
65 
66 /** Calls Lapacks Dsyev routine to compute eigenvalues and eigenvectors of a dense matrix.
67  *
68  * It's here, because we use Ipopt's C interface to Lapack.
69  */
70 SCIP_EXPORT
72  SCIP_Bool computeeigenvectors,/**< should also eigenvectors should be computed ? */
73  int N, /**< dimension */
74  SCIP_Real* a, /**< matrix data on input (size N*N); eigenvectors on output if computeeigenvectors == TRUE */
75  SCIP_Real* w /**< buffer to store eigenvalues (size N) */
76  );
77 
78 /** solves a linear problem of the form Ax = b for a regular matrix A
79  *
80  * Calls Lapacks DGETRF routine to calculate a LU factorization and uses this factorization to solve
81  * the linear problem Ax = b.
82  *
83  * It's here, because we use Ipopt's C interface to Lapack.
84  */
85 SCIP_EXPORT
87  int N, /**< dimension */
88  SCIP_Real* A, /**< matrix data on input (size N*N); filled column-wise */
89  SCIP_Real* b, /**< right hand side vector (size N) */
90  SCIP_Real* x, /**< buffer to store solution (size N) */
91  SCIP_Bool* success /**< pointer to store if the solving routine was successful */
92  );
93 
94 /** @} */
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #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:54
SCIP_VAR ** x
Definition: circlepacking.c:54
SCIP_VAR * w
Definition: circlepacking.c:58
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:84
SCIP_VAR ** b
Definition: circlepacking.c:56
SCIP_VAR * a
Definition: circlepacking.c:57
const char * SCIPgetSolverDescIpopt(void)
#define SCIP_Real
Definition: def.h:177
type definitions for NLP solver interfaces