Scippy

    SCIP

    Solving Constraint Integer Programs

    symmetry_orbital.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 symmetry_orbital.c
    26 * @ingroup OTHER_CFILES
    27 * @brief methods for handling symmetries based on orbits
    28 * @author Jasper van Doornmalen
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#ifndef __SCIP_SYMMETRY_ORBITAL_H__
    34#define __SCIP_SYMMETRY_ORBITAL_H__
    35
    36#include "scip/def.h"
    37#include "scip/type_retcode.h"
    38#include "scip/type_scip.h"
    39#include "scip/type_var.h"
    40#include "scip/type_event.h"
    41
    42#ifdef __cplusplus
    43extern "C" {
    44#endif
    45
    46/*
    47 * Data structures
    48 */
    49
    50/** data for orbital reduction propagator */
    51struct SCIP_OrbitalReductionData;
    52typedef struct SCIP_OrbitalReductionData SCIP_ORBITALREDDATA; /**< data for orbital reduction propagator */
    53
    54/*
    55 * Interface methods
    56 */
    57
    58/** prints orbital reduction data */
    59SCIP_EXPORT
    61 SCIP* scip, /**< SCIP data structure */
    62 SCIP_ORBITALREDDATA* orbireddata, /**< orbital reduction data structure */
    63 int* nred, /**< pointer to store the total number of reductions applied */
    64 int* ncutoff /**< pointer to store the total number of cutoffs applied */
    65 );
    66
    67
    68/** prints orbital reduction data */
    69SCIP_EXPORT
    71 SCIP* scip, /**< SCIP data structure */
    72 SCIP_ORBITALREDDATA* orbireddata /**< orbital reduction data structure */
    73 );
    74
    75
    76/** propagates orbital reduction */
    77SCIP_EXPORT
    79 SCIP* scip, /**< SCIP data structure */
    80 SCIP_ORBITALREDDATA* orbireddata, /**< orbital reduction data structure */
    81 SCIP_Bool* infeasible, /**< pointer to store whether infeasibility is found */
    82 int* nred, /**< pointer to store the number of domain reductions */
    83 SCIP_Bool* didrun /**< a global pointer maintaining if any symmetry propagator has run
    84 * only set this to TRUE when a reduction is found, never set to FALSE */
    85 );
    86
    87
    88/** adds component for orbital reduction */
    89SCIP_EXPORT
    91 SCIP* scip, /**< SCIP data structure */
    92 SCIP_ORBITALREDDATA* orbireddata, /**< orbital reduction data structure */
    93 SCIP_VAR** permvars, /**< variable array of the permutation */
    94 int npermvars, /**< number of variables in that array */
    95 int** perms, /**< permutations in the component */
    96 int nperms, /**< number of permutations in the component */
    97 SCIP_Bool* success /**< to store whether the component is successfully added */
    98 );
    99
    100
    101/** resets orbital reduction data structure (clears all components) */
    102SCIP_EXPORT
    104 SCIP* scip, /**< SCIP data structure */
    105 SCIP_ORBITALREDDATA* orbireddata /**< orbital reduction data structure */
    106 );
    107
    108
    109/** frees orbital reduction data */
    110SCIP_EXPORT
    112 SCIP* scip, /**< SCIP data structure */
    113 SCIP_ORBITALREDDATA** orbireddata /**< orbital reduction data structure */
    114 );
    115
    116
    117/** initializes structures needed for orbital reduction
    118 *
    119 * This is only done exactly once.
    120 */
    121SCIP_EXPORT
    123 SCIP* scip, /**< SCIP data structure */
    124 SCIP_ORBITALREDDATA** orbireddata, /**< pointer to orbital reduction data structure to populate */
    125 SCIP_EVENTHDLR* shadowtreeeventhdlr /**< pointer to the shadow tree eventhdlr */
    126 );
    127
    128#ifdef __cplusplus
    129}
    130#endif
    131
    132#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Bool
    Definition: def.h:91
    SCIP_RETCODE SCIPorbitalReductionFree(SCIP *scip, SCIP_ORBITALREDDATA **orbireddata)
    SCIP_RETCODE SCIPorbitalReductionGetStatistics(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata, int *nred, int *ncutoff)
    SCIP_RETCODE SCIPincludeOrbitalReduction(SCIP *scip, SCIP_ORBITALREDDATA **orbireddata, SCIP_EVENTHDLR *shadowtreeeventhdlr)
    SCIP_RETCODE SCIPorbitalReductionPrintStatistics(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata)
    SCIP_RETCODE SCIPorbitalReductionAddComponent(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata, SCIP_VAR **permvars, int npermvars, int **perms, int nperms, SCIP_Bool *success)
    SCIP_RETCODE SCIPorbitalReductionReset(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata)
    struct SCIP_OrbitalReductionData SCIP_ORBITALREDDATA
    SCIP_RETCODE SCIPorbitalReductionPropagate(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
    type definitions for managing events
    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