Scippy

    SCIP

    Solving Constraint Integer Programs

    reader_sto.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 reader_sto.h
    26 * @ingroup FILEREADERS
    27 * @brief STO file reader - the stochastic information of an instance in SMPS format
    28 * @author Stephen J. Maher
    29 *
    30 * This is a reader for the stochastic information of a stochastic programming instance in SMPS format.
    31 * The three files that must be read are:
    32 * - .cor
    33 * - .tim
    34 * - .sto
    35 *
    36 * Alternatively, it is possible to create a .smps file with the relative path to the .cor, .tim and .sto files.
    37 * A file reader is available for the .smps file.
    38 *
    39 * Details regarding the SMPS file format can be found at:
    40 * Birge, J. R.; Dempster, M. A.; Gassmann, H. I.; Gunn, E.; King, A. J. & Wallace, S. W.
    41 * A standard input format for multiperiod stochastic linear programs
    42 * IIASA, Laxenburg, Austria, WP-87-118, 1987
    43 *
    44 */
    45
    46/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    47
    48#ifndef __SCIP_READER_STO_H__
    49#define __SCIP_READER_STO_H__
    50
    51#include "scip/def.h"
    52#include "scip/type_cons.h"
    53#include "scip/type_prob.h"
    54#include "scip/type_result.h"
    55#include "scip/type_retcode.h"
    56#include "scip/type_scip.h"
    57#include "scip/type_var.h"
    58
    59#ifdef __cplusplus
    60extern "C" {
    61#endif
    62
    63/** includes the sto file reader into SCIP
    64 *
    65 * @ingroup FileReaderIncludes
    66 */
    67SCIP_EXPORT
    69 SCIP* scip /**< SCIP data structure */
    70 );
    71
    72/**@addtogroup FILEREADERS
    73 *
    74 * @{
    75 */
    76
    77/** reads the stochastic information for a stochastic program that is in SMPS format */
    78SCIP_EXPORT
    80 SCIP* scip, /**< SCIP data structure */
    81 const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
    82 SCIP_RESULT* result /**< pointer to store the result of the file reading call */
    83 );
    84
    85/** returns the total number of scenarios added to the problem */
    86SCIP_EXPORT
    88 SCIP* scip /**< SCIP data structure */
    89 );
    90
    91/** frees the STO reader data */
    92SCIP_EXPORT
    94 SCIP* scip /**< the SCIP data structure */
    95 );
    96
    97/** @} */
    98
    99#ifdef __cplusplus
    100}
    101#endif
    102
    103#endif
    common defines and data types used in all packages of SCIP
    int SCIPstoGetNScenarios(SCIP *scip)
    Definition: reader_sto.c:2861
    SCIP_RETCODE SCIPfreeReaderdataSto(SCIP *scip)
    Definition: reader_sto.c:2880
    SCIP_RETCODE SCIPreadSto(SCIP *scip, const char *filename, SCIP_RESULT *result)
    Definition: reader_sto.c:2822
    SCIP_RETCODE SCIPincludeReaderSto(SCIP *scip)
    Definition: reader_sto.c:2790
    type definitions for constraints and constraint handlers
    type definitions for storing and manipulating the main problem
    result codes for SCIP callback methods
    enum SCIP_Result SCIP_RESULT
    Definition: type_result.h:61
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    type definitions for SCIP's main datastructure
    type definitions for problem variables