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 (C) 2002-2017 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 email to scip@zib.de. */
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
SCIP_HASHTABLE * varnames
Definition: struct_prob.h:54
type definitions for miscellaneous datastructures
int nintvars
Definition: struct_prob.h:63
int startnconss
Definition: struct_prob.h:76
SCIP_DECL_PROBEXITSOL((*probexitsol))
SCIP_Real objoffset
Definition: struct_prob.h:41
SCIP_VAR ** fixedvars
Definition: struct_prob.h:56
int nimplvars
Definition: struct_prob.h:64
SCIP_DECL_PROBDELTRANS((*probdeltrans))
SCIP_HASHTABLE * consnames
Definition: struct_prob.h:58
int nobjvars
Definition: struct_prob.h:71
SCIP_Real dualbound
Definition: struct_prob.h:45
int ndeletedvars
Definition: struct_prob.h:70
SCIP_Bool permuted
Definition: struct_prob.h:81
int varssize
Definition: struct_prob.h:60
SCIP_Bool objisintegral
Definition: struct_prob.h:78
SCIP_OBJSENSE objsense
Definition: struct_prob.h:77
SCIP_DECL_PROBINITSOL((*probinitsol))
char * name
Definition: struct_prob.h:46
type definitions for problem variables
SCIP_Bool conscompression
Definition: struct_prob.h:82
SCIP_PROBDATA * probdata
Definition: struct_prob.h:53
#define SCIP_Bool
Definition: def.h:61
SCIP_DECL_PROBDELORIG((*probdelorig))
int ncontvars
Definition: struct_prob.h:65
int nbinvars
Definition: struct_prob.h:62
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
SCIP_VAR ** deletedvars
Definition: struct_prob.h:57
SCIP_Bool transformed
Definition: struct_prob.h:79
int maxnconss
Definition: struct_prob.h:74
int nfixedvars
Definition: struct_prob.h:68
int ncolvars
Definition: struct_prob.h:66
type definitions for storing and manipulating the main problem
SCIP_Real objlim
Definition: struct_prob.h:44
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:44
SCIP_Bool nlpenabled
Definition: struct_prob.h:80
int fixedvarssize
Definition: struct_prob.h:67
int nconss
Definition: struct_prob.h:73
SCIP_DECL_PROBCOPY((*probcopy))
SCIP_DECL_PROBTRANS((*probtrans))
#define SCIP_Real
Definition: def.h:149
SCIP_VAR ** vars
Definition: struct_prob.h:55
int consssize
Definition: struct_prob.h:72
SCIP_CONS ** conss
Definition: struct_prob.h:59
common defines and data types used in all packages of SCIP
int startnvars
Definition: struct_prob.h:75
type definitions for constraints and constraint handlers
SCIP_Real objscale
Definition: struct_prob.h:42
int deletedvarssize
Definition: struct_prob.h:69