Scippy

SCIP

Solving Constraint Integer Programs

nlpi_ipopt_dummy.c
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-2014 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_dummy.c
17  * @brief dummy Ipopt NLP interface for the case that Ipopt is not available
18  * @author Stefan Vigerske
19  *
20  * This code has been separate from nlpi_ipopt.cpp, so the SCIP build system recognizes it as pure C code,
21  * thus the linker does not need to be changed to C++.
22  */
23 
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
25 
26 #include "scip/pub_message.h"
27 #include "nlpi/nlpi_ipopt.h"
28 
29 /** create solver interface for Ipopt solver */
31  BMS_BLKMEM* blkmem, /**< block memory data structure */
32  SCIP_NLPI** nlpi /**< pointer to buffer for nlpi address */
33  )
34 {
35  assert(nlpi != NULL);
36 
37  *nlpi = NULL;
38 
39  return SCIP_OKAY;
40 } /*lint !e715*/
41 
42 /** gets string that identifies Ipopt (version number) */
43 const char* SCIPgetSolverNameIpopt(void)
44 {
45  return "";
46 }
47 
48 /** gets string that describes Ipopt (version number) */
49 const char* SCIPgetSolverDescIpopt(void)
50 {
51  return "";
52 }
53 
54 /** returns whether Ipopt is available, i.e., whether it has been linked in */
56 {
57  return FALSE;
58 }
59 
60 /** gives a pointer to the IpoptApplication object stored in Ipopt-NLPI's NLPI problem data structure */
62  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
63  )
64 {
65  SCIPerrorMessage("Ipopt not available!\n");
66  SCIPABORT();
67  return NULL; /*lint !e527*/
68 } /*lint !e715*/
69 
70 /** gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure */
72  SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
73  )
74 {
75  SCIPerrorMessage("Ipopt not available!\n");
76  SCIPABORT();
77  return NULL; /*lint !e527*/
78 } /*lint !e715*/
79 
80 /** sets modified default settings that are used when setting up an Ipopt problem
81  *
82  * Do not forget to add a newline after the last option in optionsstring.
83  */
85  SCIP_NLPI* nlpi, /**< Ipopt NLP interface */
86  const char* optionsstring /**< string with options as in Ipopt options file */
87  )
88 {
89  SCIPerrorMessage("Ipopt not available!\n");
90  SCIPABORT();
91 } /*lint !e715*/
92 
93 /** Calls Lapacks Dsyev routine to compute eigenvalues and eigenvectors of a dense matrix.
94  * It's here, because Ipopt is linked against Lapack.
95  */
97  SCIP_Bool computeeigenvectors,/**< should also eigenvectors should be computed ? */
98  int N, /**< dimension */
99  SCIP_Real* a, /**< matrix data on input (size N*N); eigenvectors on output if computeeigenvectors == TRUE */
100  SCIP_Real* w /**< buffer to store eigenvalues (size N) */
101  )
102 {
103  SCIPerrorMessage("Ipopt not available, cannot use it's Lapack link!\n");
104  return SCIP_ERROR;
105 } /*lint !e715*/
106