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-2025 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_RATIONAL* objoffsetexact; /**< exact objective offset from bound shifting and fixing (fixed vars result) */
    54 SCIP_RATIONAL* objscaleexact; /**< exact scalar applied to objective function; external objective value is
    55 * extobjexact = objsense * objscaleexact * (intobjexact + objoffsetexact) */
    56 SCIP_Real objlim; /**< objective limit as external value (original problem space) */
    57 SCIP_Real dualbound; /**< dual bound as external value (original problem space) which is given or update during presolving */
    58 char* name; /**< problem name */
    59 SCIP_DECL_PROBCOPY ((*probcopy)); /**< copies user data if you want to copy it to a subscip, or NULL */
    60 SCIP_DECL_PROBDELORIG ((*probdelorig)); /**< frees user data of original problem */
    61 SCIP_DECL_PROBTRANS ((*probtrans)); /**< creates user data of transformed problem by transforming original user data */
    62 SCIP_DECL_PROBDELTRANS((*probdeltrans)); /**< frees user data of transformed problem */
    63 SCIP_DECL_PROBINITSOL ((*probinitsol)); /**< solving process initialization method of transformed data */
    64 SCIP_DECL_PROBEXITSOL ((*probexitsol)); /**< solving process deinitialization method of transformed data */
    65 SCIP_PROBDATA* probdata; /**< user problem data set by the reader */
    66 SCIP_HASHTABLE* varnames; /**< hash table storing variable's names */
    67 SCIP_VAR** vars; /**< array with active variables ordered binary, integer, implicit, continuous */
    68 SCIP_VAR** fixedvars; /**< array with fixed and aggregated variables */
    69 SCIP_VAR** deletedvars; /**< array to temporarily store deleted variables */
    70 SCIP_HASHTABLE* consnames; /**< hash table storing constraints' names */
    71 SCIP_CONS** conss; /**< array with constraints of the problem */
    72 SCIP_CONS** origcheckconss; /**< array to store original constraints sorted w.r.t. check priority (or NULL) */
    73 int varssize; /**< available slots in vars array */
    74 int nvars; /**< number of active variables in the problem (used slots in vars array) */
    75 int nbinvars; /**< number of binary variables */
    76 int nintvars; /**< number of general integer variables */
    77 int nbinimplvars; /**< number of binary implicit integer variables */
    78 int nintimplvars; /**< number of integer implicit integer variables */
    79 int ncontimplvars; /**< number of continuous implicit integer variables */
    80 int ncontvars; /**< number of continuous variables */
    81 int ncolvars; /**< number of variables with attached column information */
    82 int fixedvarssize; /**< available slots in fixedvars array */
    83 int nfixedvars; /**< number of fixed and aggregated variables in the problem */
    84 int deletedvarssize; /**< available slots in deletedvars array */
    85 int ndeletedvars; /**< number of deleted variables in the problem */
    86 int nobjvars; /**< number of variables with a non-zero objective coefficient */
    87 int consssize; /**< available slots in conss array */
    88 int nconss; /**< number of constraints in the problem (number of used slots in conss array) */
    89 int maxnconss; /**< maximum number of constraints existing at the same time */
    90 int startnvars; /**< number of variables existing when problem solving started */
    91 int startnconss; /**< number of constraints existing when problem solving started */
    92 SCIP_OBJSENSE objsense; /**< objective sense of the original problem */
    93 SCIP_Bool objisintegral; /**< is objective value always integral for feasible solutions? */
    94 SCIP_Bool transformed; /**< TRUE iff problem is the transformed problem */
    95 SCIP_Bool nlpenabled; /**< marks whether an NLP relaxation should be constructed */
    96 SCIP_Bool permuted; /**< TRUE iff the problem is already permuted */
    97 SCIP_Bool consschecksorted; /**< TRUE if the constraints are sorted according to check priority */
    98 SCIP_Bool conscompression; /**< TRUE for problems for which constraint compression on a set of fixed variables is desired */
    99};
    100
    101#ifdef __cplusplus
    102}
    103#endif
    104
    105#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:156
    int ncontimplvars
    Definition: struct_prob.h:79
    int deletedvarssize
    Definition: struct_prob.h:84
    SCIP_DECL_PROBCOPY((*probcopy))
    SCIP_VAR ** fixedvars
    Definition: struct_prob.h:68
    int consssize
    Definition: struct_prob.h:87
    int ncolvars
    Definition: struct_prob.h:81
    SCIP_Real objoffset
    Definition: struct_prob.h:50
    SCIP_Bool consschecksorted
    Definition: struct_prob.h:97
    SCIP_Bool permuted
    Definition: struct_prob.h:96
    SCIP_Bool nlpenabled
    Definition: struct_prob.h:95
    int startnconss
    Definition: struct_prob.h:91
    SCIP_DECL_PROBTRANS((*probtrans))
    SCIP_RATIONAL * objoffsetexact
    Definition: struct_prob.h:53
    SCIP_Bool transformed
    Definition: struct_prob.h:94
    int fixedvarssize
    Definition: struct_prob.h:82
    SCIP_DECL_PROBEXITSOL((*probexitsol))
    int ncontvars
    Definition: struct_prob.h:80
    SCIP_DECL_PROBINITSOL((*probinitsol))
    int ndeletedvars
    Definition: struct_prob.h:85
    SCIP_CONS ** origcheckconss
    Definition: struct_prob.h:72
    SCIP_RATIONAL * objscaleexact
    Definition: struct_prob.h:54
    SCIP_Real dualbound
    Definition: struct_prob.h:57
    SCIP_PROBDATA * probdata
    Definition: struct_prob.h:65
    int nfixedvars
    Definition: struct_prob.h:83
    int startnvars
    Definition: struct_prob.h:90
    SCIP_DECL_PROBDELORIG((*probdelorig))
    SCIP_OBJSENSE objsense
    Definition: struct_prob.h:92
    SCIP_CONS ** conss
    Definition: struct_prob.h:71
    int nbinimplvars
    Definition: struct_prob.h:77
    int nobjvars
    Definition: struct_prob.h:86
    SCIP_Bool objisintegral
    Definition: struct_prob.h:93
    SCIP_Real objscale
    Definition: struct_prob.h:51
    SCIP_HASHTABLE * consnames
    Definition: struct_prob.h:70
    int nintimplvars
    Definition: struct_prob.h:78
    SCIP_Bool conscompression
    Definition: struct_prob.h:98
    SCIP_VAR ** vars
    Definition: struct_prob.h:67
    int varssize
    Definition: struct_prob.h:73
    SCIP_DECL_PROBDELTRANS((*probdeltrans))
    SCIP_Real objlim
    Definition: struct_prob.h:56
    char * name
    Definition: struct_prob.h:58
    int nintvars
    Definition: struct_prob.h:76
    int nconss
    Definition: struct_prob.h:88
    SCIP_HASHTABLE * varnames
    Definition: struct_prob.h:66
    int maxnconss
    Definition: struct_prob.h:89
    SCIP_VAR ** deletedvars
    Definition: struct_prob.h:69
    int nbinvars
    Definition: struct_prob.h:75
    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