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-2016 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 email to 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 /** create solver interface for Ipopt solver
35  * sets *nlpi to NULL if Ipopt is not available
36  */
37 extern
39  BMS_BLKMEM* blkmem, /**< block memory data structure */
40  SCIP_NLPI** nlpi /**< pointer to buffer for nlpi address */
41  );
42 
43 /** gets string that identifies Ipopt (version number) */
44 extern
45 const char* SCIPgetSolverNameIpopt(void);
46 
47 /** gets string that describes Ipopt (version number) */
48 extern
49 const char* SCIPgetSolverDescIpopt(void);
50 
51 /** returns whether Ipopt is available, i.e., whether it has been linked in */
52 extern
54 
55 /** gives a pointer to the IpoptApplication object stored in Ipopt-NLPI's NLPI problem data structure */
56 extern
58  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
59  );
60 
61 /** gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure */
62 extern
64  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
65  );
66 
67 /** sets modified default settings that are used when setting up an Ipopt problem
68  *
69  * Do not forget to add a newline after the last option in optionsstring.
70  */
71 extern
73  SCIP_NLPI* nlpi, /**< Ipopt NLP interface */
74  const char* optionsstring /**< string with options as in Ipopt options file */
75  );
76 
77 /** Calls Lapacks Dsyev routine to compute eigenvalues and eigenvectors of a dense matrix.
78  * It's here, because Ipopt is linked against Lapack.
79  */
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 IpLapackDgetrf routine to calculate a LU factorization and uses this factorization to solve
90  * the linear problem Ax = b.
91  * It's here, because Ipopt is linked against Lapack.
92  */
94  int N, /**< dimension */
95  SCIP_Real* A, /**< matrix data on input (size N*N); filled column-wise */
96  SCIP_Real* b, /**< right hand side vector (size N) */
97  SCIP_Real* x, /**< buffer to store solution (size N) */
98  SCIP_Bool* success /**< pointer to store if the solving routine was successful */
99  );
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif /* __SCIP_NLPI_IPOPT_H__ */
SCIP_RETCODE SCIPsolveLinearProb(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
struct SCIP_Nlpi SCIP_NLPI
Definition: type_nlpi.h:37
void * SCIPgetIpoptApplicationPointerIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
struct SCIP_NlpiProblem SCIP_NLPIPROBLEM
Definition: type_nlpi.h:39
const char * SCIPgetSolverDescIpopt(void)
const char * SCIPgetSolverNameIpopt(void)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
#define SCIP_Bool
Definition: def.h:53
SCIP_RETCODE LapackDsyev(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
void SCIPsetModifiedDefaultSettingsIpopt(SCIP_NLPI *nlpi, const char *optionsstring)
#define SCIP_Real
Definition: def.h:127
SCIP_RETCODE SCIPcreateNlpSolverIpopt(BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi)
type definitions for specific NLP solver interfaces