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-2018 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 scip.zib.de. */
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 "nlpi/type_nlpi.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /**@addtogroup NLPIS
35  *
36  * @{
37  */
38 
39 /** create solver interface for Ipopt solver
40  * sets *nlpi to NULL if Ipopt is not available
41  */
42 extern
44  BMS_BLKMEM* blkmem, /**< block memory data structure */
45  SCIP_NLPI** nlpi /**< pointer to buffer for nlpi address */
46  );
47 
48 /** gets string that identifies Ipopt (version number) */
49 extern
50 const char* SCIPgetSolverNameIpopt(void);
51 
52 /** gets string that describes Ipopt */
53 extern
54 const char* SCIPgetSolverDescIpopt(void);
55 
56 /** returns whether Ipopt is available, i.e., whether it has been linked in */
57 extern
59 
60 /** gives a pointer to the IpoptApplication object stored in Ipopt-NLPI's NLPI problem data structure */
61 extern
63  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
64  );
65 
66 /** gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure */
67 extern
69  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
70  );
71 
72 /** sets modified default settings that are used when setting up an Ipopt problem
73  *
74  * Do not forget to add a newline after the last option in optionsstring.
75  */
76 extern
78  SCIP_NLPI* nlpi, /**< Ipopt NLP interface */
79  const char* optionsstring /**< string with options as in Ipopt options file */
80  );
81 
82 /** Calls Lapacks Dsyev routine to compute eigenvalues and eigenvectors of a dense matrix.
83  * It's here, because Ipopt is linked against Lapack.
84  */
86  SCIP_Bool computeeigenvectors,/**< should also eigenvectors should be computed ? */
87  int N, /**< dimension */
88  SCIP_Real* a, /**< matrix data on input (size N*N); eigenvectors on output if computeeigenvectors == TRUE */
89  SCIP_Real* w /**< buffer to store eigenvalues (size N) */
90  );
91 
92 /** solves a linear problem of the form Ax = b for a regular matrix A
93  *
94  * Calls Lapacks IpLapackDgetrf routine to calculate a LU factorization and uses this factorization to solve
95  * the linear problem Ax = b.
96  * It's here, because Ipopt is linked against Lapack.
97  */
99  int N, /**< dimension */
100  SCIP_Real* A, /**< matrix data on input (size N*N); filled column-wise */
101  SCIP_Real* b, /**< right hand side vector (size N) */
102  SCIP_Real* x, /**< buffer to store solution (size N) */
103  SCIP_Bool* success /**< pointer to store if the solving routine was successful */
104  );
105 
106 /* @} */
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif /* __SCIP_NLPI_IPOPT_H__ */
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
void SCIPsetModifiedDefaultSettingsIpopt(SCIP_NLPI *nlpi, const char *optionsstring)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_VAR ** x
Definition: circlepacking.c:54
SCIP_VAR * w
Definition: circlepacking.c:58
const char * SCIPgetSolverNameIpopt(void)
SCIP_RETCODE LapackDsyev(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
#define SCIP_Bool
Definition: def.h:62
SCIP_RETCODE SCIPcreateNlpSolverIpopt(BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi)
SCIP_VAR ** b
Definition: circlepacking.c:56
SCIP_RETCODE SCIPsolveLinearProb(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
void * SCIPgetIpoptApplicationPointerIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
SCIP_VAR * a
Definition: circlepacking.c:57
const char * SCIPgetSolverDescIpopt(void)
#define SCIP_Real
Definition: def.h:150
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:419
type definitions for specific NLP solver interfaces