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