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-2014 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 };
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif
86