Scippy

    SCIP

    Solving Constraint Integer Programs

    struct_paramset.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_paramset.h
    26 * @ingroup INTERNALAPI
    27 * @brief datastructures for handling parameter settings
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 */
    31
    32/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    33
    34#ifndef __SCIP_STRUCT_PARAMSET_H__
    35#define __SCIP_STRUCT_PARAMSET_H__
    36
    37
    38#include "scip/def.h"
    39#include "scip/type_misc.h"
    40#include "scip/type_paramset.h"
    41
    42#ifdef __cplusplus
    43extern "C" {
    44#endif
    45
    46/** data for SCIP_Bool parameters */
    48{
    49 SCIP_Bool* valueptr; /**< pointer to store the current parameter value, or NULL */
    50 SCIP_Bool curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
    51 SCIP_Bool defaultvalue; /**< default value of the parameter */
    52};
    54
    55/** data for int parameters */
    57{
    58 int* valueptr; /**< pointer to store the current parameter value, or NULL */
    59 int curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
    60 int defaultvalue; /**< default value of the parameter */
    61 int minvalue; /**< minimum value for parameter */
    62 int maxvalue; /**< maximum value for parameter */
    63};
    65
    66/** data for SCIP_Longint parameters */
    68{
    69 SCIP_Longint curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
    70 SCIP_Longint defaultvalue; /**< default value of the parameter */
    71 SCIP_Longint minvalue; /**< minimum value for parameter */
    72 SCIP_Longint maxvalue; /**< maximum value for parameter */
    73 SCIP_Longint* valueptr; /**< pointer to store the current parameter value, or NULL */
    74};
    76
    77/** data for SCIP_Real parameters */
    79{
    80 SCIP_Real curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
    81 SCIP_Real defaultvalue; /**< default value of the parameter */
    82 SCIP_Real minvalue; /**< minimum value for parameter */
    83 SCIP_Real maxvalue; /**< maximum value for parameter */
    84 SCIP_Real* valueptr; /**< pointer to store the current parameter value, or NULL */
    85};
    87
    88/** data for char parameters */
    90{
    91 char* valueptr; /**< pointer to store the current parameter value, or NULL */
    92 char* allowedvalues; /**< array with possible parameter values, or NULL if not restricted */
    93 char curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
    94 char defaultvalue; /**< default value of the parameter */
    95};
    97
    98/** data for char* parameters */
    100{
    101 char** valueptr; /**< pointer to store the current parameter value, or NULL */
    102 char* curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
    103 char* defaultvalue; /**< default value of the parameter */
    104};
    106
    107/** single parameter */
    109{
    110 union
    111 {
    112 SCIP_BOOLPARAM boolparam; /**< data for SCIP_Bool parameters */
    113 SCIP_INTPARAM intparam; /**< data for int parameters */
    114 SCIP_LONGINTPARAM longintparam; /**< data for SCIP_Longint parameters */
    115 SCIP_REALPARAM realparam; /**< data for SCIP_Real parameters */
    116 SCIP_CHARPARAM charparam; /**< data for char parameters */
    117 SCIP_STRINGPARAM stringparam; /**< data for char* parameters */
    119 char* name; /**< name of the parameter */
    120 char* desc; /**< description of the parameter */
    121 SCIP_DECL_PARAMCHGD ((*paramchgd)); /**< change information method of parameter */
    122 SCIP_PARAMDATA* paramdata; /**< locally defined parameter specific data */
    123 unsigned int isadvanced:1; /**< is this parameter an advanced parameter? */
    124 unsigned int isfixed:1; /**< is this parameter fixed? */
    125 SCIP_PARAMTYPE paramtype; /**< type of this parameter */
    126};
    127
    128/** set of parameters */
    130{
    131 SCIP_HASHTABLE* hashtable; /**< hash table to store the parameters */
    132 SCIP_PARAM** params; /**< array with parameters */
    133 int nparams; /**< number of parameters */
    134 int paramssize; /**< size of params array */
    135};
    136
    137#ifdef __cplusplus
    138}
    139#endif
    140
    141#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Longint
    Definition: def.h:141
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    SCIP_Bool defaultvalue
    SCIP_Bool curvalue
    SCIP_Bool * valueptr
    SCIP_Longint * valueptr
    SCIP_Longint curvalue
    SCIP_Longint defaultvalue
    SCIP_Longint minvalue
    SCIP_Longint maxvalue
    SCIP_PARAM ** params
    SCIP_HASHTABLE * hashtable
    SCIP_PARAMTYPE paramtype
    SCIP_INTPARAM intparam
    SCIP_DECL_PARAMCHGD((*paramchgd))
    SCIP_STRINGPARAM stringparam
    SCIP_LONGINTPARAM longintparam
    SCIP_BOOLPARAM boolparam
    unsigned int isfixed
    SCIP_CHARPARAM charparam
    SCIP_REALPARAM realparam
    SCIP_PARAMDATA * paramdata
    unsigned int isadvanced
    union SCIP_Param::@19 data
    SCIP_Real defaultvalue
    SCIP_Real * valueptr
    SCIP_Real curvalue
    SCIP_Real maxvalue
    SCIP_Real minvalue
    type definitions for miscellaneous datastructures
    type definitions for handling parameter settings
    struct SCIP_ParamData SCIP_PARAMDATA
    Definition: type_paramset.h:87
    enum SCIP_ParamType SCIP_PARAMTYPE
    Definition: type_paramset.h:54