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_prob.h
26   	 * @ingroup INTERNALAPI
27   	 * @brief  datastructures for storing and manipulating the main problem
28   	 * @author Tobias Achterberg
29   	 */
30   	
31   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32   	
33   	#ifndef __SCIP_STRUCT_PROB_H__
34   	#define __SCIP_STRUCT_PROB_H__
35   	
36   	
37   	#include "scip/def.h"
38   	#include "scip/type_misc.h"
39   	#include "scip/type_var.h"
40   	#include "scip/type_prob.h"
41   	#include "scip/type_cons.h"
42   	
43   	#ifdef __cplusplus
44   	extern "C" {
45   	#endif
46   	
47   	/** main problem to solve */
48   	struct SCIP_Prob
49   	{
50   	   SCIP_Real             objoffset;          /**< objective offset from bound shifting and fixing (fixed vars result) */
51   	   SCIP_Real             objscale;           /**< scalar applied to objective function; external objective value is
52   	                                              *   extobj = objsense * objscale * (intobj + objoffset) */
53   	   SCIP_Real             objlim;             /**< objective limit as external value (original problem space) */
54   	   SCIP_Real             dualbound;          /**< dual bound as external value (original problem space) which is given or update during presolving */
55   	   char*                 name;               /**< problem name */
56   	   SCIP_DECL_PROBCOPY    ((*probcopy));      /**< copies user data if you want to copy it to a subscip, or NULL */
57   	   SCIP_DECL_PROBDELORIG ((*probdelorig));   /**< frees user data of original problem */
58   	   SCIP_DECL_PROBTRANS   ((*probtrans));     /**< creates user data of transformed problem by transforming original user data */
59   	   SCIP_DECL_PROBDELTRANS((*probdeltrans));  /**< frees user data of transformed problem */
60   	   SCIP_DECL_PROBINITSOL ((*probinitsol));   /**< solving process initialization method of transformed data */
61   	   SCIP_DECL_PROBEXITSOL ((*probexitsol));   /**< solving process deinitialization method of transformed data */
62   	   SCIP_PROBDATA*        probdata;           /**< user problem data set by the reader */
63   	   SCIP_HASHTABLE*       varnames;           /**< hash table storing variable's names */
64   	   SCIP_VAR**            vars;               /**< array with active variables ordered binary, integer, implicit, continuous */
65   	   SCIP_VAR**            fixedvars;          /**< array with fixed and aggregated variables */
66   	   SCIP_VAR**            deletedvars;        /**< array to temporarily store deleted variables */
67   	   SCIP_HASHTABLE*       consnames;          /**< hash table storing constraints' names */
68   	   SCIP_CONS**           conss;              /**< array with constraints of the problem */
69   	   SCIP_CONS**           origcheckconss;     /**< array to store original constraints sorted w.r.t. check priority (or NULL) */
70   	   int                   varssize;           /**< available slots in vars array */
71   	   int                   nvars;              /**< number of active variables in the problem (used slots in vars array) */
72   	   int                   nbinvars;           /**< number of binary variables */
73   	   int                   nintvars;           /**< number of general integer variables */
74   	   int                   nimplvars;          /**< number of implicit integer variables */
75   	   int                   ncontvars;          /**< number of continuous variables */
76   	   int                   ncolvars;           /**< number of variables with attached column information */
77   	   int                   fixedvarssize;      /**< available slots in fixedvars array */
78   	   int                   nfixedvars;         /**< number of fixed and aggregated variables in the problem */
79   	   int                   deletedvarssize;    /**< available slots in deletedvars array */
80   	   int                   ndeletedvars;       /**< number of deleted variables in the problem */
81   	   int                   nobjvars;           /**< number of variables with a non-zero objective coefficient */
82   	   int                   consssize;          /**< available slots in conss array */
83   	   int                   nconss;             /**< number of constraints in the problem (number of used slots in conss array) */
84   	   int                   maxnconss;          /**< maximum number of constraints existing at the same time */
85   	   int                   startnvars;         /**< number of variables existing when problem solving started */
86   	   int                   startnconss;        /**< number of constraints existing when problem solving started */
87   	   SCIP_OBJSENSE         objsense;           /**< objective sense of the original problem */
88   	   SCIP_Bool             objisintegral;      /**< is objective value always integral for feasible solutions? */
89   	   SCIP_Bool             transformed;        /**< TRUE iff problem is the transformed problem */
90   	   SCIP_Bool             nlpenabled;         /**< marks whether an NLP relaxation should be constructed */
91   	   SCIP_Bool             permuted;           /**< TRUE iff the problem is already permuted */
92   	   SCIP_Bool             consschecksorted;   /**< TRUE if the constraints are sorted according to check priority */
93   	   SCIP_Bool             conscompression;    /**< TRUE for problems for which constraint compression on a set of fixed variables is desired */
94   	};
95   	
96   	#ifdef __cplusplus
97   	}
98   	#endif
99   	
100  	#endif
101