Scippy

SCIP

Solving Constraint Integer Programs

struct_nlpi.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 struct_nlpi.h
17  * @brief data definitions for an NLP solver interface
18  * @author Stefan Vigerske
19  * @author Thorsten Gellermann
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_STRUCT_NLPI_H__
25 #define __SCIP_STRUCT_NLPI_H__
26 
27 #include "scip/def.h"
28 #include "nlpi/type_nlpi.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /** NLP interface data */
35 struct SCIP_Nlpi
36 {
37  char* name; /**< name of NLP solver */
38  char* description; /**< description of NLP solver */
39  int priority; /**< priority of NLP interface */
40  SCIP_DECL_NLPICOPY ((*nlpicopy)); /**< copy an NLPI */
41  SCIP_DECL_NLPIFREE ((*nlpifree)); /**< free NLPI user data */
42  SCIP_DECL_NLPIGETSOLVERPOINTER ((*nlpigetsolverpointer)); /**< get solver pointer */
43  SCIP_DECL_NLPICREATEPROBLEM ((*nlpicreateproblem)); /**< create a new problem instance */
44  SCIP_DECL_NLPIFREEPROBLEM ((*nlpifreeproblem)); /**< free a problem instance */
45  SCIP_DECL_NLPIGETPROBLEMPOINTER ((*nlpigetproblempointer)); /**< get problem pointer */
46  SCIP_DECL_NLPIADDVARS ((*nlpiaddvars)); /**< add variables to a problem */
47  SCIP_DECL_NLPIADDCONSTRAINTS ((*nlpiaddconstraints)); /**< add constraints to a problem */
48  SCIP_DECL_NLPISETOBJECTIVE ((*nlpisetobjective)); /**< set objective of a problem */
49  SCIP_DECL_NLPICHGVARBOUNDS ((*nlpichgvarbounds)); /**< change variable bounds in a problem */
50  SCIP_DECL_NLPICHGCONSSIDES ((*nlpichgconssides)); /**< change constraint sides in a problem */
51  SCIP_DECL_NLPIDELVARSET ((*nlpidelvarset)); /**< delete a set of variables from a problem */
52  SCIP_DECL_NLPIDELCONSSET ((*nlpidelconsset)); /**< delete a set of constraints from a problem */
53  SCIP_DECL_NLPICHGLINEARCOEFS ((*nlpichglinearcoefs)); /**< change coefficients in linear part of a constraint or objective */
54  SCIP_DECL_NLPICHGQUADCOEFS ((*nlpichgquadcoefs)); /**< change coefficients in quadratic part of a constraint or objective */
55  SCIP_DECL_NLPICHGEXPRTREE ((*nlpichgexprtree)); /**< change nonlinear expression a constraint or objective */
56  SCIP_DECL_NLPICHGNONLINCOEF ((*nlpichgnonlincoef)); /**< change one parameter in nonlinear expressions of a constraint or objective */
57  SCIP_DECL_NLPICHGOBJCONSTANT ((*nlpichgobjconstant)); /**< change the constant offset in the objective */
58  SCIP_DECL_NLPISETINITIALGUESS ((*nlpisetinitialguess)); /**< set initial guess for primal variables in a problem */
59  SCIP_DECL_NLPISOLVE ((*nlpisolve)); /**< solve a problem */
60  SCIP_DECL_NLPIGETSOLSTAT ((*nlpigetsolstat)); /**< get solution status for a problem */
61  SCIP_DECL_NLPIGETTERMSTAT ((*nlpigettermstat)); /**< get termination status for a problem */
62  SCIP_DECL_NLPIGETSOLUTION ((*nlpigetsolution)); /**< get solution of a problem */
63  SCIP_DECL_NLPIGETSTATISTICS ((*nlpigetstatistics)); /**< get solve statistics for a problem */
64  SCIP_DECL_NLPIGETWARMSTARTSIZE ((*nlpigetwarmstartsize)); /**< get size for warmstart object buffer for a problem */
65  SCIP_DECL_NLPIGETWARMSTARTMEMO ((*nlpigetwarmstartmemo)); /**< get warmstart object for a problem */
66  SCIP_DECL_NLPISETWARMSTARTMEMO ((*nlpisetwarmstartmemo)); /**< set warmstart object for a problem */
67  SCIP_DECL_NLPIGETINTPAR ((*nlpigetintpar)); /**< get value of integer parameter in a problem */
68  SCIP_DECL_NLPISETINTPAR ((*nlpisetintpar)); /**< set value of integer parameter in a problem */
69  SCIP_DECL_NLPIGETREALPAR ((*nlpigetrealpar)); /**< get value of floating point parameter in a problem */
70  SCIP_DECL_NLPISETREALPAR ((*nlpisetrealpar)); /**< set value of floating point parameter in a problem */
71  SCIP_DECL_NLPIGETSTRINGPAR ((*nlpigetstringpar)); /**< get value of string parameter in a problem */
72  SCIP_DECL_NLPISETSTRINGPAR ((*nlpisetstringpar)); /**< set value of string parameter in a problem */
73  SCIP_DECL_NLPISETMESSAGEHDLR ((*nlpisetmessagehdlr)); /**< set message handler */
74  SCIP_NLPIDATA* nlpidata; /**< NLP interface local data */
75 };
76 
77 /** Statistics from an NLP solve */
79 {
80  int niterations; /**< number of iterations the NLP solver spend in the last solve command */
81  SCIP_Real totaltime; /**< total time in CPU sections the NLP solver spend in the last solve command */
82 };
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif /* __SCIP_STRUCT_NLPI_H__ */
char * name
Definition: struct_nlpi.h:37
SCIP_DECL_NLPIGETSOLUTION((*nlpigetsolution))
SCIP_DECL_NLPIFREE((*nlpifree))
SCIP_DECL_NLPICHGQUADCOEFS((*nlpichgquadcoefs))
SCIP_DECL_NLPIFREEPROBLEM((*nlpifreeproblem))
SCIP_DECL_NLPISETOBJECTIVE((*nlpisetobjective))
SCIP_DECL_NLPISETSTRINGPAR((*nlpisetstringpar))
SCIP_DECL_NLPISETINTPAR((*nlpisetintpar))
SCIP_DECL_NLPIGETTERMSTAT((*nlpigettermstat))
SCIP_DECL_NLPICREATEPROBLEM((*nlpicreateproblem))
SCIP_DECL_NLPIGETWARMSTARTSIZE((*nlpigetwarmstartsize))
SCIP_DECL_NLPICHGCONSSIDES((*nlpichgconssides))
SCIP_DECL_NLPIADDVARS((*nlpiaddvars))
SCIP_DECL_NLPICHGNONLINCOEF((*nlpichgnonlincoef))
struct SCIP_NlpiData SCIP_NLPIDATA
Definition: type_nlpi.h:38
SCIP_Real totaltime
Definition: struct_nlpi.h:81
SCIP_DECL_NLPICHGEXPRTREE((*nlpichgexprtree))
SCIP_DECL_NLPIGETSOLVERPOINTER((*nlpigetsolverpointer))
SCIP_DECL_NLPIGETSTRINGPAR((*nlpigetstringpar))
SCIP_DECL_NLPICHGOBJCONSTANT((*nlpichgobjconstant))
SCIP_DECL_NLPIGETREALPAR((*nlpigetrealpar))
SCIP_DECL_NLPIGETPROBLEMPOINTER((*nlpigetproblempointer))
SCIP_DECL_NLPIGETINTPAR((*nlpigetintpar))
SCIP_DECL_NLPISETREALPAR((*nlpisetrealpar))
SCIP_DECL_NLPIDELCONSSET((*nlpidelconsset))
SCIP_DECL_NLPIADDCONSTRAINTS((*nlpiaddconstraints))
SCIP_DECL_NLPISETWARMSTARTMEMO((*nlpisetwarmstartmemo))
SCIP_DECL_NLPIGETSTATISTICS((*nlpigetstatistics))
SCIP_NLPIDATA * nlpidata
Definition: struct_nlpi.h:74
#define SCIP_Real
Definition: def.h:150
SCIP_DECL_NLPICHGLINEARCOEFS((*nlpichglinearcoefs))
SCIP_DECL_NLPISETMESSAGEHDLR((*nlpisetmessagehdlr))
int priority
Definition: struct_nlpi.h:39
SCIP_DECL_NLPICHGVARBOUNDS((*nlpichgvarbounds))
SCIP_DECL_NLPISOLVE((*nlpisolve))
char * description
Definition: struct_nlpi.h:38
common defines and data types used in all packages of SCIP
SCIP_DECL_NLPICOPY((*nlpicopy))
SCIP_DECL_NLPIGETSOLSTAT((*nlpigetsolstat))
SCIP_DECL_NLPIGETWARMSTARTMEMO((*nlpigetwarmstartmemo))
SCIP_DECL_NLPISETINITIALGUESS((*nlpisetinitialguess))
SCIP_DECL_NLPIDELVARSET((*nlpidelvarset))
type definitions for specific NLP solver interfaces