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-2024 Zuse Institute Berlin (ZIB) */
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_dummy.c
26 * @ingroup DEFPLUGINS_NLPI
27 * @brief dummy Ipopt NLP interface for the case that Ipopt is not available
28 * @author Stefan Vigerske
29 * @author Benjamin Müller
30 *
31 * This code has been separated from nlpi_ipopt.cpp, so the SCIP build system recognizes it as pure C code,
32 * thus the linker does not need to be changed to C++.
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#include "scip/pub_message.h"
38#include "scip/nlpi_ipopt.h"
40
41/** create solver interface for Ipopt solver and includes it into SCIP, if Ipopt is available */ /*lint -e{715}*/
43 SCIP* scip /**< SCIP data structure */
44 )
45{
46 return SCIP_OKAY;
47} /*lint !e715*/
48
49/** gets string that identifies Ipopt (version number) */
50const char* SCIPgetSolverNameIpopt(void)
51{
52 return "";
53}
54
55/** gets string that describes Ipopt */
56const char* SCIPgetSolverDescIpopt(void)
57{
58 return "";
59}
60
61/** returns whether Ipopt is available, i.e., whether it has been linked in */
63{
64 return FALSE;
65}
66
67/** gives a pointer to the NLPIORACLE object stored in Ipopt-NLPI's NLPI problem data structure */ /*lint -e715*/
69 SCIP_NLPIPROBLEM* nlpiproblem /**< NLP problem of Ipopt-NLPI */
70 )
71{
72 SCIPerrorMessage("Ipopt not available!\n");
73 SCIPABORT();
74 return NULL; /*lint !e527*/
75} /*lint !e715*/
76
78 SCIP_Bool computeeigenvectors,/**< should also eigenvectors should be computed ? */
79 int N, /**< dimension */
80 SCIP_Real* a, /**< matrix data on input (size N*N); eigenvectors on output if computeeigenvectors == TRUE */
81 SCIP_Real* w /**< buffer to store eigenvalues (size N) */
82 )
83{
84 SCIPerrorMessage("Ipopt not available, cannot use it's Lapack link!\n");
85 return SCIP_ERROR;
86} /*lint !e715*/
87
89 int N, /**< dimension */
90 SCIP_Real* A, /**< matrix data on input (size N*N); filled column-wise */
91 SCIP_Real* b, /**< right hand side vector (size N) */
92 SCIP_Real* x, /**< buffer to store solution (size N) */
93 SCIP_Bool* success /**< pointer to store if the solving routine was successful */
94 )
95{
96 SCIPerrorMessage("Ipopt not available, cannot use it's Lapack link!\n");
97 return SCIP_ERROR;
98} /*lint !e715*/
SCIP_VAR * w
Definition: circlepacking.c:67
SCIP_VAR * a
Definition: circlepacking.c:66
SCIP_VAR ** b
Definition: circlepacking.c:65
SCIP_VAR ** x
Definition: circlepacking.c:63
#define NULL
Definition: def.h:267
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:173
#define FALSE
Definition: def.h:94
#define SCIPABORT()
Definition: def.h:346
SCIP_RETCODE SCIPincludeNlpSolverIpopt(SCIP *scip)
const char * SCIPgetSolverNameIpopt(void)
SCIP_RETCODE SCIPcallLapackDsyevIpopt(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
SCIP_RETCODE SCIPsolveLinearEquationsIpopt(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
const char * SCIPgetSolverDescIpopt(void)
memory allocation routines
Ipopt NLP interface.
public methods for message output
#define SCIPerrorMessage
Definition: pub_message.h:64
@ SCIP_OKAY
Definition: type_retcode.h:42
@ SCIP_ERROR
Definition: type_retcode.h:43
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63