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