1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*  Copyright (c) 2002-2023 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   struct_nlpi.h
26   	 * @ingroup INTERNALAPI
27   	 * @brief  data definitions for an NLP solver interface
28   	 * @author Stefan Vigerske
29   	 * @author Thorsten Gellermann
30   	 */
31   	
32   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33   	
34   	#ifndef __SCIP_STRUCT_NLPI_H__
35   	#define __SCIP_STRUCT_NLPI_H__
36   	
37   	#include "scip/def.h"
38   	#include "scip/type_nlpi.h"
39   	#include "scip/type_clock.h"
40   	
41   	#ifdef __cplusplus
42   	extern "C" {
43   	#endif
44   	
45   	/** NLP interface data */
46   	struct SCIP_Nlpi
47   	{
48   	   char*                           name;                        /**< name of NLP solver */
49   	   char*                           description;                 /**< description of NLP solver */
50   	   int                             priority;                    /**< priority of NLP interface */
51   	   SCIP_DECL_NLPICOPY              ((*nlpicopy));               /**< copy an NLPI */
52   	   SCIP_DECL_NLPIFREE              ((*nlpifree));               /**< free NLPI user data */
53   	   SCIP_DECL_NLPIGETSOLVERPOINTER  ((*nlpigetsolverpointer));   /**< get solver pointer */
54   	   SCIP_DECL_NLPICREATEPROBLEM     ((*nlpicreateproblem));      /**< create a new problem instance */
55   	   SCIP_DECL_NLPIFREEPROBLEM       ((*nlpifreeproblem));        /**< free a problem instance */
56   	   SCIP_DECL_NLPIGETPROBLEMPOINTER ((*nlpigetproblempointer));  /**< get problem pointer */
57   	   SCIP_DECL_NLPIADDVARS           ((*nlpiaddvars));            /**< add variables to a problem */
58   	   SCIP_DECL_NLPIADDCONSTRAINTS    ((*nlpiaddconstraints));     /**< add constraints to a problem  */
59   	   SCIP_DECL_NLPISETOBJECTIVE      ((*nlpisetobjective));       /**< set objective of a problem  */
60   	   SCIP_DECL_NLPICHGVARBOUNDS      ((*nlpichgvarbounds));       /**< change variable bounds in a problem  */
61   	   SCIP_DECL_NLPICHGCONSSIDES      ((*nlpichgconssides));       /**< change constraint sides in a problem  */
62   	   SCIP_DECL_NLPIDELVARSET         ((*nlpidelvarset));          /**< delete a set of variables from a problem  */
63   	   SCIP_DECL_NLPIDELCONSSET        ((*nlpidelconsset));         /**< delete a set of constraints from a problem */
64   	   SCIP_DECL_NLPICHGLINEARCOEFS    ((*nlpichglinearcoefs));     /**< change coefficients in linear part of a constraint or objective */
65   	   SCIP_DECL_NLPICHGEXPR           ((*nlpichgexpr));            /**< change nonlinear expression a constraint or objective */
66   	   SCIP_DECL_NLPICHGOBJCONSTANT    ((*nlpichgobjconstant));     /**< change the constant offset in the objective */
67   	   SCIP_DECL_NLPISETINITIALGUESS   ((*nlpisetinitialguess));    /**< set initial guess */
68   	   SCIP_DECL_NLPISOLVE             ((*nlpisolve));              /**< solve a problem */
69   	   SCIP_DECL_NLPIGETSOLSTAT        ((*nlpigetsolstat));         /**< get solution status for a problem  */
70   	   SCIP_DECL_NLPIGETTERMSTAT       ((*nlpigettermstat));        /**< get termination status for a problem  */
71   	   SCIP_DECL_NLPIGETSOLUTION       ((*nlpigetsolution));        /**< get solution of a problem  */
72   	   SCIP_DECL_NLPIGETSTATISTICS     ((*nlpigetstatistics));      /**< get solve statistics for a problem  */
73   	   SCIP_NLPIDATA*                  nlpidata;                    /**< NLP interface local data */
74   	
75   	   /* statistics */
76   	   int                             nproblems;                   /**< number of problems created */
77   	   int                             nsolves;                     /**< number of solves */
78   	   SCIP_CLOCK*                     problemtime;                 /**< time spend in problem setup and modification */
79   	   SCIP_Real                       solvetime;                   /**< time spend in solve as reported by solver */
80   	   SCIP_Real                       evaltime;                    /**< time spend in function evaluation during solve */
81   	   SCIP_Longint                    niter;                       /**< total number of iterations */
82   	   int                             ntermstat[SCIP_NLPTERMSTAT_OTHER+1]; /**< number of times a specific termination status occurred */
83   	   int                             nsolstat[SCIP_NLPSOLSTAT_UNKNOWN+1]; /**< number of times a specific solution status occurred */
84   	};
85   	
86   	#ifdef __cplusplus
87   	}
88   	#endif
89   	
90   	#endif /* __SCIP_STRUCT_NLPI_H__ */
91