Scippy

SCIP

Solving Constraint Integer Programs

struct_prob.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 2002-2022 Zuse Institute Berlin */
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  int varssize; /**< available slots in vars array */
70  int nvars; /**< number of active variables in the problem (used slots in vars array) */
71  int nbinvars; /**< number of binary variables */
72  int nintvars; /**< number of general integer variables */
73  int nimplvars; /**< number of implicit integer variables */
74  int ncontvars; /**< number of continuous variables */
75  int ncolvars; /**< number of variables with attached column information */
76  int fixedvarssize; /**< available slots in fixedvars array */
77  int nfixedvars; /**< number of fixed and aggregated variables in the problem */
78  int deletedvarssize; /**< available slots in deletedvars array */
79  int ndeletedvars; /**< number of deleted variables in the problem */
80  int nobjvars; /**< number of variables with a non-zero objective coefficient */
81  int consssize; /**< available slots in conss array */
82  int nconss; /**< number of constraints in the problem (number of used slots in conss array) */
83  int maxnconss; /**< maximum number of constraints existing at the same time */
84  int startnvars; /**< number of variables existing when problem solving started */
85  int startnconss; /**< number of constraints existing when problem solving started */
86  SCIP_OBJSENSE objsense; /**< objective sense of the original problem */
87  SCIP_Bool objisintegral; /**< is objective value always integral for feasible solutions? */
88  SCIP_Bool transformed; /**< TRUE iff problem is the transformed problem */
89  SCIP_Bool nlpenabled; /**< marks whether an NLP relaxation should be constructed */
90  SCIP_Bool permuted; /**< TRUE iff the problem is already permuted */
91  SCIP_Bool conscompression; /**< TRUE for problems for which constraint compression on a set of fixed variables is desired */
92 };
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif
SCIP_HASHTABLE * varnames
Definition: struct_prob.h:63
type definitions for miscellaneous datastructures
int nintvars
Definition: struct_prob.h:72
int startnconss
Definition: struct_prob.h:85
SCIP_DECL_PROBEXITSOL((*probexitsol))
SCIP_Real objoffset
Definition: struct_prob.h:50
SCIP_VAR ** fixedvars
Definition: struct_prob.h:65
int nimplvars
Definition: struct_prob.h:73
SCIP_DECL_PROBDELTRANS((*probdeltrans))
SCIP_HASHTABLE * consnames
Definition: struct_prob.h:67
int nobjvars
Definition: struct_prob.h:80
SCIP_Real dualbound
Definition: struct_prob.h:54
int ndeletedvars
Definition: struct_prob.h:79
SCIP_Bool permuted
Definition: struct_prob.h:90
int varssize
Definition: struct_prob.h:69
SCIP_Bool objisintegral
Definition: struct_prob.h:87
SCIP_OBJSENSE objsense
Definition: struct_prob.h:86
SCIP_DECL_PROBINITSOL((*probinitsol))
char * name
Definition: struct_prob.h:55
type definitions for problem variables
SCIP_Bool conscompression
Definition: struct_prob.h:91
SCIP_PROBDATA * probdata
Definition: struct_prob.h:62
#define SCIP_Bool
Definition: def.h:93
SCIP_DECL_PROBDELORIG((*probdelorig))
int ncontvars
Definition: struct_prob.h:74
int nbinvars
Definition: struct_prob.h:71
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:50
SCIP_VAR ** deletedvars
Definition: struct_prob.h:66
SCIP_Bool transformed
Definition: struct_prob.h:88
int maxnconss
Definition: struct_prob.h:83
int nfixedvars
Definition: struct_prob.h:77
int ncolvars
Definition: struct_prob.h:75
type definitions for storing and manipulating the main problem
SCIP_Real objlim
Definition: struct_prob.h:53
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:53
SCIP_Bool nlpenabled
Definition: struct_prob.h:89
int fixedvarssize
Definition: struct_prob.h:76
int nconss
Definition: struct_prob.h:82
SCIP_DECL_PROBCOPY((*probcopy))
SCIP_DECL_PROBTRANS((*probtrans))
#define SCIP_Real
Definition: def.h:186
SCIP_VAR ** vars
Definition: struct_prob.h:64
int consssize
Definition: struct_prob.h:81
SCIP_CONS ** conss
Definition: struct_prob.h:68
common defines and data types used in all packages of SCIP
int startnvars
Definition: struct_prob.h:84
type definitions for constraints and constraint handlers
SCIP_Real objscale
Definition: struct_prob.h:51
int deletedvarssize
Definition: struct_prob.h:78