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