Skip to content
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file cons_xor.h
* @ingroup CONSHDLRS
* @brief Constraint handler for XOR constraints, \f$rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n\f$
* @author Tobias Achterberg
* @author Stefan Heinz
* @author Michael Winkler
*
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_CONS_XOR_H__
#define __SCIP_CONS_XOR_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the handler for xor constraints and includes it in SCIP
*
* @ingroup ConshdlrIncludes
* */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeConshdlrXor(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup CONSHDLRS
*
* @{
*
* @name XOR Constraints
*
* @{
*
* This constraint handler deals with "xor" constraint. These are constraint of the form:
*
* \f[
* rhs = x_1 \oplus x_2 \oplus \dots \oplus x_n
* \f]
*
* where \f$x_i\f$ is a binary variable for all \f$i\f$ and \f$rhs\f$ is bool. The variables \f$x\f$'s are called
* operators. This constraint is satisfied if \f$rhs\f$ is TRUE and an odd number of the operators are TRUE or if the
* \f$rhs\f$ is FALSE and a even number of operators are TRUE. Hence, if the sum of \f$rhs\f$ and operators is even.
*/
/** creates and captures an xor constraint
*
* @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcreateConsXor(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS** cons, /**< pointer to hold the created constraint */
const char* name, /**< name of constraint */
SCIP_Bool rhs, /**< right hand side of the constraint */
int nvars, /**< number of operator variables in the constraint */
SCIP_VAR** vars, /**< array with operator variables of constraint */
SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
* Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
SCIP_Bool separate, /**< should the constraint be separated during LP processing?
* Usually set to TRUE. */
SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
* TRUE for model constraints, FALSE for additional, redundant constraints. */
SCIP_Bool check, /**< should the constraint be checked for feasibility?
* TRUE for model constraints, FALSE for additional, redundant constraints. */
SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
* Usually set to TRUE. */
SCIP_Bool local, /**< is constraint only valid locally?
* Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
* Usually set to FALSE. In column generation applications, set to TRUE if pricing
* adds coefficients to this constraint. */
SCIP_Bool dynamic, /**< is constraint subject to aging?
* Usually set to FALSE. Set to TRUE for own cuts which
* are separated as constraints. */
SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
* Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
* if it may be moved to a more global node?
* Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
);
/** creates and captures an xor constraint
* in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
* method SCIPcreateConsXor(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
*
* @see SCIPcreateConsXor() for information about the basic constraint flag configuration
*
* @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcreateConsBasicXor(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS** cons, /**< pointer to hold the created constraint */
const char* name, /**< name of constraint */
SCIP_Bool rhs, /**< right hand side of the constraint */
int nvars, /**< number of operator variables in the constraint */
SCIP_VAR** vars /**< array with operator variables of constraint */
);
/** gets number of variables in xor constraint */
SCIP_EXPORT
int SCIPgetNVarsXor(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS* cons /**< constraint data */
);
/** gets array of variables in xor constraint */
SCIP_EXPORT
SCIP_VAR** SCIPgetVarsXor(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS* cons /**< constraint data */
);
/** gets integer variable in xor constraint */
SCIP_EXPORT
SCIP_VAR* SCIPgetIntVarXor(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS* cons /**< constraint data */
);
/** gets the right hand side of the xor constraint */
SCIP_EXPORT
SCIP_Bool SCIPgetRhsXor(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS* cons /**< constraint data */
);
/** @} */
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file cons_xyz.h
* @ingroup CONSHDLRS
* @brief constraint handler for xyz constraints
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_CONS_XYZ_H__
#define __SCIP_CONS_XYZ_H__
#include "scip/scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the handler for xyz constraints and includes it in SCIP
*
* @ingroup ConshdlrIncludes
* */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeConshdlrXyz(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup CONSHDLRS
*
* @{
*
* @name Xyz Constraints
*
* @{
*/
/** creates and captures a xyz constraint
*
* @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcreateConsXyz(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS** cons, /**< pointer to hold the created constraint */
const char* name, /**< name of constraint */
int nvars, /**< number of variables in the constraint */
SCIP_VAR** vars, /**< array with variables of constraint entries */
SCIP_Real* coefs, /**< array with coefficients of constraint entries */
SCIP_Real lhs, /**< left hand side of constraint */
SCIP_Real rhs, /**< right hand side of constraint */
SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
* Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
SCIP_Bool separate, /**< should the constraint be separated during LP processing?
* Usually set to TRUE. */
SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
* TRUE for model constraints, FALSE for additional, redundant constraints. */
SCIP_Bool check, /**< should the constraint be checked for feasibility?
* TRUE for model constraints, FALSE for additional, redundant constraints. */
SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
* Usually set to TRUE. */
SCIP_Bool local, /**< is constraint only valid locally?
* Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
* Usually set to FALSE. In column generation applications, set to TRUE if pricing
* adds coefficients to this constraint. */
SCIP_Bool dynamic, /**< is constraint subject to aging?
* Usually set to FALSE. Set to TRUE for own cuts which
* are separated as constraints. */
SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
* Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
* if it may be moved to a more global node?
* Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
);
/** creates and captures a xyz constraint with all its constraint flags set to their
* default values
*
* @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcreateConsBasicXyz(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS** cons, /**< pointer to hold the created constraint */
const char* name, /**< name of constraint */
int nvars, /**< number of variables in the constraint */
SCIP_VAR** vars, /**< array with variables of constraint entries */
SCIP_Real* coefs, /**< array with coefficients of constraint entries */
SCIP_Real lhs, /**< left hand side of constraint */
SCIP_Real rhs /**< right hand side of constraint */
);
/** @} */
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file cutpool.h
* @ingroup INTERNALAPI
* @brief internal methods for storing cuts in a cut pool
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_CUTPOOL_H__
#define __SCIP_CUTPOOL_H__
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_event.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_sol.h"
#include "scip/type_stat.h"
#include "scip/type_lp.h"
#include "scip/type_sepastore.h"
#include "scip/type_cutpool.h"
#include "scip/pub_cutpool.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates cut pool */
SCIP_RETCODE SCIPcutpoolCreate(
SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
int agelimit, /**< maximum age a cut can reach before it is deleted from the pool */
SCIP_Bool globalcutpool /**< is this the global cut pool of SCIP? */
);
/** frees cut pool */
SCIP_RETCODE SCIPcutpoolFree(
SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_LP* lp /**< current LP data */
);
/** removes all rows from the cut pool */
SCIP_RETCODE SCIPcutpoolClear(
SCIP_CUTPOOL* cutpool, /**< cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_LP* lp /**< current LP data */
);
/** checks if cut is already existing */
SCIP_Bool SCIPcutpoolIsCutNew(
SCIP_CUTPOOL* cutpool, /**< cut pool */
SCIP_SET* set, /**< global SCIP settings */
SCIP_ROW* row /**< cutting plane to add */
);
/** if not already existing, adds row to cut pool and captures it */
SCIP_RETCODE SCIPcutpoolAddRow(
SCIP_CUTPOOL* cutpool, /**< cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_STAT* stat, /**< problem statistics data */
SCIP_LP* lp, /**< current LP data */
SCIP_ROW* row /**< cutting plane to add */
);
/** adds row to cut pool and captures it; doesn't check for multiple cuts */
SCIP_RETCODE SCIPcutpoolAddNewRow(
SCIP_CUTPOOL* cutpool, /**< cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_STAT* stat, /**< problem statistics data */
SCIP_LP* lp, /**< current LP data */
SCIP_ROW* row /**< cutting plane to add */
);
/** removes the LP row from the cut pool */
SCIP_RETCODE SCIPcutpoolDelRow(
SCIP_CUTPOOL* cutpool, /**< cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_STAT* stat, /**< problem statistics data */
SCIP_LP* lp, /**< current LP data */
SCIP_ROW* row /**< row to remove */
);
/** separates cuts of the cut pool */
SCIP_RETCODE SCIPcutpoolSeparate(
SCIP_CUTPOOL* cutpool, /**< cut pool */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_STAT* stat, /**< problem statistics data */
SCIP_EVENTQUEUE* eventqueue, /**< event queue */
SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
SCIP_LP* lp, /**< current LP data */
SCIP_SEPASTORE* sepastore, /**< separation storage */
SCIP_SOL* sol, /**< solution to be separated (or NULL for LP-solution) */
SCIP_Bool cutpoolisdelayed, /**< is the cutpool delayed (count cuts found)? */
SCIP_Bool root, /**< are we at the root node? */
SCIP_RESULT* result /**< pointer to store the result of the separation call */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file cuts.h
* @ingroup PUBLICCOREAPI
* @brief methods for the aggregation rows
* @author Jakob Witzig
* @author Leona Gottwald
*
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_CUTS_H__
#define __SCIP_CUTS_H__
#include "scip/def.h"
#include "scip/struct_cuts.h"
#include "scip/type_cuts.h"
#include "scip/type_lp.h"
#include "scip/type_misc.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_sol.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/**@addtogroup PublicCutMethods
*
* @{
*/
/** perform activity based coefficient tigthening on the given cut; returns TRUE if the cut was detected
* to be redundant due to acitvity bounds
*/
SCIP_EXPORT
SCIP_Bool SCIPcutsTightenCoefficients(
SCIP* scip, /**< SCIP data structure */
SCIP_Bool cutislocal, /**< is the cut local? */
SCIP_Real* cutcoefs, /**< array of the non-zero coefficients in the cut */
SCIP_Real* cutrhs, /**< the right hand side of the cut */
int* cutinds, /**< array of the problem indices of variables with a non-zero coefficient in the cut */
int* cutnnz, /**< the number of non-zeros in the cut */
int* nchgcoefs /**< number of changed coefficients */
);
/** create an empty the aggregation row */
SCIP_EXPORT
SCIP_RETCODE SCIPaggrRowCreate(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW** aggrrow /**< pointer to return the aggregation row */
);
/** free a the aggregation row */
SCIP_EXPORT
void SCIPaggrRowFree(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW** aggrrow /**< pointer to the aggregation row that should be freed */
);
/** output aggregation row to file stream */
SCIP_EXPORT
void SCIPaggrRowPrint(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow, /**< pointer to return aggregation row */
FILE* file /**< output file (or NULL for standard output) */
);
/** copy the aggregation row */
SCIP_EXPORT
SCIP_RETCODE SCIPaggrRowCopy(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW** aggrrow, /**< pointer to return the aggregation row */
SCIP_AGGRROW* source /**< source the aggregation row */
);
/** add weighted row to the aggregation row */
SCIP_EXPORT
SCIP_RETCODE SCIPaggrRowAddRow(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_ROW* row, /**< row to add to the aggregation row */
SCIP_Real weight, /**< scale for adding given row to the aggregation row */
int sidetype /**< specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) */
);
/** Removes a given variable @p var from position @p pos the aggregation row and updates the right-hand side according
* to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
*
* @note: The choice of global or local bounds depend on the validity (global or local) of the aggregation row.
*
* @note: The list of non-zero indices will be updated by swapping the last non-zero index to @p pos.
*/
SCIP_EXPORT
void SCIPaggrRowCancelVarWithBound(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_VAR* var, /**< variable that should be removed */
int pos, /**< position of the variable in the aggregation row */
SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
);
/** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row */
SCIP_EXPORT
SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_Real rhs, /**< right-hand side of the artificial row */
SCIP_Real scale /**< scalar */
);
/** add weighted constraint to the aggregation row */
SCIP_EXPORT
SCIP_RETCODE SCIPaggrRowAddCustomCons(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
int* inds, /**< variable problem indices in constraint to add to the aggregation row */
SCIP_Real* vals, /**< values of constraint to add to the aggregation row */
int len, /**< length of constraint to add to the aggregation row */
SCIP_Real rhs, /**< right hand side of constraint to add to the aggregation row */
SCIP_Real weight, /**< (positive) scale for adding given constraint to the aggregation row */
int rank, /**< rank to use for given constraint */
SCIP_Bool local /**< is constraint only valid locally */
);
/** calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
*
* @return the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
*/
SCIP_EXPORT
SCIP_Real SCIPaggrRowCalcEfficacyNorm(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** clear all entries in the aggregation row but do not free the internal memory */
SCIP_EXPORT
void SCIPaggrRowClear(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** aggregate rows using the given weights; the current content of the aggregation
* row, \p aggrrow, gets overwritten
*/
SCIP_EXPORT
SCIP_RETCODE SCIPaggrRowSumRows(
SCIP* scip, /**< SCIP data structure */
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_Real* weights, /**< row weights in row summation */
int* rowinds, /**< array to store indices of non-zero entries of the weights array, or NULL */
int nrowinds, /**< number of non-zero entries in weights array, -1 if rowinds is NULL */
SCIP_Bool sidetypebasis, /**< choose sidetypes of row (lhs/rhs) based on basis information? */
SCIP_Bool allowlocal, /**< should local rows be used? */
int negslack, /**< should negative slack variables be used? (0: no, 1: only for integral rows, 2: yes) */
int maxaggrlen, /**< maximal number of non-zeros in the aggregation row */
SCIP_Bool* valid /**< is the aggregation valid */
);
/** removes all (close enough to) zero entries in the aggregation row */
SCIP_EXPORT
void SCIPaggrRowRemoveZeros(
SCIP* scip, /**< SCIP datastructure */
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_Bool useglbbounds, /**< consider global bound although the cut is local? */
SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
);
/** get array with lp positions of aggregated rows */
SCIP_EXPORT
int* SCIPaggrRowGetRowInds(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** get array with weights of aggregated rows */
SCIP_EXPORT
SCIP_Real* SCIPaggrRowGetRowWeights(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** checks whether a given row has been added to the aggregation row */
SCIP_EXPORT
SCIP_Bool SCIPaggrRowHasRowBeenAdded(
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_ROW* row /**< row for which it is checked whether it has been added to the aggregation */
);
/** gets the min and max absolute value of the weights used to aggregate the rows;
* must not be called for empty aggregation rows
*/
SCIP_EXPORT
void SCIPaggrRowGetAbsWeightRange(
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
SCIP_Real* minabsrowweight, /**< pointer to store smallest absolute value of weights used for aggregating rows */
SCIP_Real* maxabsrowweight /**< pointer to store largest absolute value of weights used for aggregating rows */
);
/** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
SCIP_EXPORT
int* SCIPaggrRowGetInds(
SCIP_AGGRROW* aggrrow
);
/** gets the number of non-zeros in the aggregation row */
SCIP_EXPORT
int SCIPaggrRowGetNNz(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** gets the non-zero value for the given non-zero index */
static INLINE
SCIP_Real SCIPaggrRowGetValue(
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
int i /**< non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 */
)
{
SCIP_Real QUAD(val);
QUAD_ARRAY_LOAD(val, aggrrow->vals, aggrrow->inds[i]);
return QUAD_TO_DBL(val);
}
/** gets the non-zero value for the given problem index of a variable */
static INLINE
SCIP_Real SCIPaggrRowGetProbvarValue(
SCIP_AGGRROW* aggrrow, /**< the aggregation row */
int probindex /**< problem index of variable; must be between 0 and SCIPgetNVars(scip) - 1 */
)
{
SCIP_Real QUAD(val);
QUAD_ARRAY_LOAD(val, aggrrow->vals, probindex);
return QUAD_TO_DBL(val);
}
/** gets the rank of the aggregation row */
SCIP_EXPORT
int SCIPaggrRowGetRank(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** checks if the aggregation row is only valid locally */
SCIP_EXPORT
SCIP_Bool SCIPaggrRowIsLocal(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** gets the right hand side of the aggregation row */
SCIP_EXPORT
SCIP_Real SCIPaggrRowGetRhs(
SCIP_AGGRROW* aggrrow /**< the aggregation row */
);
/** gets the number of row aggregations */
SCIP_EXPORT
int SCIPaggrRowGetNRows(
SCIP_AGGRROW* aggrrow /**< aggregation row */
);
/** perform a cut selection algorithm for the given array of cuts; the array is partitioned
* so that the selected cuts come first and the remaining ones are at the end of the array
*/
SCIP_EXPORT
SCIP_RETCODE SCIPselectCuts(
SCIP* scip, /**< SCIP data structure */
SCIP_ROW** cuts, /**< array with cuts to perform selection algorithm */
SCIP_RANDNUMGEN* randnumgen, /**< random number generator for tie-breaking, or NULL */
SCIP_Real goodscorefac, /**< factor of best score among the given cuts to consider a cut good
* and filter with less strict settings of the maximum parallelism */
SCIP_Real badscorefac, /**< factor of best score among the given cuts to consider a cut bad
* and discard it regardless of its parallelism to other cuts */
SCIP_Real goodmaxparall, /**< maximum parallelism for good cuts */
SCIP_Real maxparall, /**< maximum parallelism for non-good cuts */
SCIP_Real dircutoffdistweight,/**< weight of directed cutoff distance in score calculation */
SCIP_Real efficacyweight, /**< weight of efficacy (shortest cutoff distance) in score calculation */
SCIP_Real objparalweight, /**< weight of objective parallelism in score calculation */
SCIP_Real intsupportweight, /**< weight of integral support in score calculation */
int ncuts, /**< number of cuts in given array */
int nforcedcuts, /**< number of forced cuts at start of given array */
int maxselectedcuts, /**< maximal number of cuts to select */
int* nselectedcuts /**< pointer to return number of selected cuts */
);
/** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
* aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
* participate in an MIR cut.
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
*
* @pre This method can be called if @p scip is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
*
* See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcalcMIR(
SCIP* scip, /**< SCIP data structure */
SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
* -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
* NULL for using closest bound for all variables */
SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
* NULL for using closest bound for all variables */
SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
SCIP_Real scale, /**< additional scaling factor multiplied to the aggrrow; must be positive */
SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute an MIR cut for */
SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
int* cutrank, /**< pointer to return rank of generated cut */
SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
SCIP_Bool* success /**< pointer to store whether the returned coefficients are a valid MIR cut */
);
/** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
* aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
* participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
* factors and complementations of the variables to improve the cut's efficacy.
* For further details we refer to:
*
* Marchand, H., & Wolsey, L. A. (2001). Aggregation and mixed integer rounding to solve MIPs.
* Operations research, 49(3), 363-371.
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
*
* @pre This method can be called if @p scip is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
*
* See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(
SCIP* scip, /**< SCIP data structure */
SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
int maxtestdelta, /**< maximum number of deltas to test */
int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
* -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
* NULL for using closest bound for all variables */
SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
* NULL for using closest bound for all variables */
SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute MIR cut for */
SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
SCIP_Real* cutefficacy, /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
* this efficacy on input to this function are returned */
int* cutrank, /**< pointer to return rank of generated cut */
SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
SCIP_Bool* success /**< pointer to store whether a valid and efficacious cut was returned */
);
/** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
* aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
* participate in an MIR cut.
* For further details we refer to:
*
* Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
* Mathematical Programming, 85(3), 439-467.
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
*
* @pre This method can be called if @p scip is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
*
* See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcalcFlowCover(
SCIP* scip, /**< SCIP data structure */
SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
int* cutrank, /**< pointer to return rank of generated cut */
SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
);
/** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
* aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
* participate in a strongcg cut
*
* @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
* SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
*
* @pre This method can be called if @p scip is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
*
* See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
*/
SCIP_EXPORT
SCIP_RETCODE SCIPcalcStrongCG(
SCIP* scip, /**< SCIP data structure */
SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
SCIP_Real minfrac, /**< minimal fractionality of rhs to produce strong CG cut for */
SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce strong CG cut for */
SCIP_Real scale, /**< additional scaling factor multiplied to all rows */
SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute a strong CG cut for */
SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
int* cutrank, /**< pointer to return rank of generated cut */
SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file dbldblarith.h
* @brief defines macros for basic operations in double-double arithmetic giving roughly twice the precision of a double
* @author Leona Gottwald
*
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef _SCIP_DBLDBL_ARITH_
#define _SCIP_DBLDBL_ARITH_
#include "math.h"
#ifndef DISABLE_QUADPREC
/* smaller epsilon value for use with quadprecision */
#define QUAD_EPSILON 1e-12
/* convenience macros for nicer usage of double double arithmetic */
#define QUAD_HI(x) x ## hi
#define QUAD_LO(x) x ## lo
#define QUAD(x) QUAD_HI(x), QUAD_LO(x)
#define QUAD_MEMBER(x) QUAD_HI(x); QUAD_LO(x)
#define QUAD_TO_DBL(x) ( QUAD_HI(x) + QUAD_LO(x) )
#define QUAD_SCALE(x, a) do { QUAD_HI(x) *= (a); QUAD_LO(x) *= (a); } while(0)
#define QUAD_ASSIGN(a, constant) do { QUAD_HI(a) = (constant); QUAD_LO(a) = 0.0; } while(0)
#define QUAD_ASSIGN_Q(a, b) do { QUAD_HI(a) = QUAD_HI(b); QUAD_LO(a) = QUAD_LO(b); } while(0)
#define QUAD_ARRAY_SIZE(size) ((size)*2)
#define QUAD_ARRAY_LOAD(r, a, idx) do { QUAD_HI(r) = (a)[2*(idx)]; QUAD_LO(r) = (a)[2*(idx) + 1]; } while(0)
#define QUAD_ARRAY_STORE(a, idx, x) do { (a)[2*(idx)] = QUAD_HI(x); (a)[2*(idx) + 1] = QUAD_LO(x); } while(0)
/* define all the SCIPquadprec... macros such that they use the SCIPdbldbl... macros that expands the quad precision arguments using the above macros */
#define SCIPquadprecProdDD(r, a, b) SCIPdbldblProd(QUAD_HI(r), QUAD_LO(r), a, b)
#define SCIPquadprecSquareD(r, a) SCIPdbldblSquare(QUAD_HI(r), QUAD_LO(r), a)
#define SCIPquadprecSumDD(r, a, b) SCIPdbldblSum(QUAD_HI(r), QUAD_LO(r), a, b)
#define SCIPquadprecDivDD(r, a, b) SCIPdbldblDiv(QUAD_HI(r), QUAD_LO(r), a, b)
#define SCIPquadprecSumQD(r, a, b) SCIPdbldblSum21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)
#define SCIPquadprecProdQD(r, a, b) SCIPdbldblProd21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)
#define SCIPquadprecDivDQ(r, a, b) SCIPdbldblDiv12(QUAD_HI(r), QUAD_LO(r), a, QUAD_HI(b), QUAD_LO(b))
#define SCIPquadprecDivQD(r, a, b) SCIPdbldblDiv21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)
#define SCIPquadprecProdQQ(r, a, b) SCIPdbldblProd22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b))
#define SCIPquadprecSumQQ(r, a, b) SCIPdbldblSum22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b))
#define SCIPquadprecSquareQ(r, a) SCIPdbldblSquare2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
#define SCIPquadprecDivQQ(r, a, b) SCIPdbldblDiv22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b))
#define SCIPquadprecSqrtD(r, a) SCIPdbldblSqrt(QUAD_HI(r), QUAD_LO(r), a)
#define SCIPquadprecSqrtQ(r, a) SCIPdbldblSqrt2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
#define SCIPquadprecAbsQ(r, a) SCIPdbldblAbs2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
#define SCIPquadprecFloorQ(r, a) SCIPdbldblFloor2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
#define SCIPquadprecCeilQ(r, a) SCIPdbldblCeil2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
#define SCIPquadprecEpsFloorQ(r, a, eps) SCIPdbldblEpsFloor2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), eps)
#define SCIPquadprecEpsCeilQ(r, a, eps) SCIPdbldblEpsCeil2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), eps)
#else
/* normal epsilon value if quadprecision is disabled */
#define QUAD_EPSILON 1e-9
/* dummy macros that use normal arithmetic */
#define QUAD_HI(x) x
#define QUAD_LO(x) 0.0
#define QUAD(x) x
#define QUAD_MEMBER(x) x
#define QUAD_TO_DBL(x) (x)
#define QUAD_SCALE(x, a) do { (x) *= (a); } while(0)
#define QUAD_ASSIGN(a, constant) do { (a) = constant; } while(0)
#define QUAD_ASSIGN_Q(a, b) do { (a) = (b); } while(0)
#define QUAD_ARRAY_SIZE(size) (size)
#define QUAD_ARRAY_LOAD(r, a, idx) do { r = (a)[(idx)]; } while(0)
#define QUAD_ARRAY_STORE(a, idx, x) do { (a)[(idx)] = (x); } while(0)
#define SCIPquadprecProdDD(r, a, b) do { (r) = (a) * (b); } while(0)
#define SCIPquadprecSquareD(r, a) do { (r) = (a) * (a); } while(0)
#define SCIPquadprecSumDD(r, a, b) do { (r) = (a) + (b); } while(0)
#define SCIPquadprecDivDD(r, a, b) do { (r) = (a) / (b); } while(0)
#define SCIPquadprecSumQD(r, a, b) do { (r) = (a) + (b); } while(0)
#define SCIPquadprecProdQD(r, a, b) do { (r) = (a) * (b); } while(0)
#define SCIPquadprecDivDQ(r, a, b) do { (r) = (a) / (b); } while(0)
#define SCIPquadprecDivQD(r, a, b) do { (r) = (a) / (b); } while(0)
#define SCIPquadprecProdQQ(r, a, b) do { (r) = (a) * (b); } while(0)
#define SCIPquadprecSumQQ(r, a, b) do { (r) = (a) + (b); } while(0)
#define SCIPquadprecSquareQ(r, a) do { (r) = (a) * (a); } while(0)
#define SCIPquadprecDivQQ(r, a, b) do { (r) = (a) / (b); } while(0)
#define SCIPquadprecSqrtD(r, a) do { (r) = sqrt(a); } while(0)
#define SCIPquadprecSqrtQ(r, a) do { (r) = sqrt(a); } while(0)
#define SCIPquadprecAbsQ(r, a) do { (r) = fabs(a); } while(0)
#define SCIPquadprecFloorQ(r, a) do { (r) = floor(a); } while(0)
#define SCIPquadprecCeilQ(r, a) do { (r) = ceil(a); } while(0)
#define SCIPquadprecEpsFloorQ(r, a, eps) do { (r) = floor((a) + (eps)); } while(0)
#define SCIPquadprecEpsCeilQ(r, a, eps) do { (r) = ceil((a) - (eps)); } while(0)
#endif
#define __SCIPdbldblSplit(rhi, rlo, x) \
do { \
const double __tmp_split_dbl = 134217729.0 * (x); \
(rhi) = __tmp_split_dbl - (__tmp_split_dbl - (x)); \
(rlo) = (x) - (rhi);\
} while(0)
/** multiply two floating point numbers, both given by one double, and return the result as two doubles. */
#define SCIPdbldblProd(rhi, rlo, a, b) \
do { \
double __tmp_dbldbl_prod_ahi; \
double __tmp_dbldbl_prod_alo; \
double __tmp_dbldbl_prod_bhi; \
double __tmp_dbldbl_prod_blo; \
__SCIPdbldblSplit(__tmp_dbldbl_prod_ahi, __tmp_dbldbl_prod_alo, a); \
__SCIPdbldblSplit(__tmp_dbldbl_prod_bhi, __tmp_dbldbl_prod_blo, b); \
(rhi) = (a) * (b); \
(rlo) = __tmp_dbldbl_prod_alo * __tmp_dbldbl_prod_blo - \
((((rhi) - __tmp_dbldbl_prod_ahi * __tmp_dbldbl_prod_bhi) \
- __tmp_dbldbl_prod_alo * __tmp_dbldbl_prod_bhi) \
- __tmp_dbldbl_prod_ahi * __tmp_dbldbl_prod_blo); \
} while(0)
/** square a floating point number given by one double and return the result as two doubles. */
#define SCIPdbldblSquare(rhi, rlo, a) \
do { \
double __tmp_dbldbl_square_ahi; \
double __tmp_dbldbl_square_alo; \
__SCIPdbldblSplit(__tmp_dbldbl_square_ahi, __tmp_dbldbl_square_alo, a); \
(rhi) = (a) * (a); \
(rlo) = __tmp_dbldbl_square_alo * __tmp_dbldbl_square_alo - \
((((rhi) - __tmp_dbldbl_square_ahi * __tmp_dbldbl_square_ahi) \
- 2.0 * __tmp_dbldbl_square_alo * __tmp_dbldbl_square_ahi)); \
} while(0)
/** add two floating point numbers, both given by one double, and return the result as two doubles. */
#define SCIPdbldblSum(rhi, rlo, a, b) \
do { \
double __tmp1_dbldbl_sum; \
double __tmp2_dbldbl_sum; \
__tmp2_dbldbl_sum = (a) + (b); \
__tmp1_dbldbl_sum = __tmp2_dbldbl_sum - (a); \
(rlo) = ((a) - (__tmp2_dbldbl_sum - __tmp1_dbldbl_sum)) + ((b) - __tmp1_dbldbl_sum); \
(rhi) = __tmp2_dbldbl_sum; \
} while(0)
/** divide two floating point numbers, both given by one double, and return the result as two doubles. */
#define SCIPdbldblDiv(rhi, rlo, a, b) \
do { \
double __tmp_dbldbl_div_hi; \
double __tmp_dbldbl_div_lo; \
double __estim_dbldbl_div = (a)/(b); \
SCIPdbldblProd(__tmp_dbldbl_div_hi, __tmp_dbldbl_div_lo, b, __estim_dbldbl_div); \
SCIPdbldblSum21(__tmp_dbldbl_div_hi, __tmp_dbldbl_div_lo, __tmp_dbldbl_div_hi, __tmp_dbldbl_div_lo, -(a)); \
__tmp_dbldbl_div_hi /= (b); \
__tmp_dbldbl_div_lo /= (b); \
SCIPdbldblSum21(rhi, rlo, -__tmp_dbldbl_div_hi, -__tmp_dbldbl_div_lo, __estim_dbldbl_div); \
} while(0)
/** add two floating point numbers, the first is given by two doubles, the second is given by one double,
* and return the result as two doubles.
*/
#define SCIPdbldblSum21(rhi, rlo, ahi, alo, b) \
do { \
double __tmp_dbldbl_sum21_hi; \
double __tmp_dbldbl_sum21_lo; \
SCIPdbldblSum(__tmp_dbldbl_sum21_hi, __tmp_dbldbl_sum21_lo, ahi, b); \
(rlo) = __tmp_dbldbl_sum21_lo + (alo); \
(rhi) = __tmp_dbldbl_sum21_hi; \
} while(0)
/** multiply two floating point numbers, the first is given by two doubles, the second is given by one double,
* and return the result as two doubles.
*/
#define SCIPdbldblProd21(rhi, rlo, ahi, alo, b) \
do { \
double __tmp_dbldbl_prod21_hi; \
double __tmp_dbldbl_prod21_lo; \
SCIPdbldblProd(__tmp_dbldbl_prod21_hi, __tmp_dbldbl_prod21_lo, ahi, b); \
(rlo) = (alo) * (b) + __tmp_dbldbl_prod21_lo; \
(rhi) = __tmp_dbldbl_prod21_hi; \
} while(0)
/** divide two floating point numbers, the first is given by one double, the second is given by two doubles,
* and return the result as two doubles.
*/
#define SCIPdbldblDiv12(rhi, rlo, a, bhi, blo) \
do { \
double __tmp_dbldbl_div12_hi; \
double __tmp_dbldbl_div12_lo; \
double __estim_dbldbl_div12 = (a)/(bhi); \
SCIPdbldblProd21(__tmp_dbldbl_div12_hi, __tmp_dbldbl_div12_lo, bhi, blo, __estim_dbldbl_div12); \
SCIPdbldblSum21(__tmp_dbldbl_div12_hi, __tmp_dbldbl_div12_lo, __tmp_dbldbl_div12_hi, __tmp_dbldbl_div12_lo, -(a)); \
__tmp_dbldbl_div12_hi /= (bhi); \
__tmp_dbldbl_div12_lo /= (bhi); \
SCIPdbldblSum21(rhi, rlo, -__tmp_dbldbl_div12_hi, -__tmp_dbldbl_div12_lo, __estim_dbldbl_div12); \
} while(0)
/** divide two floating point numbers, the first is given by two doubles, the second is given by one double,
* and return the result as two doubles.
*/
#define SCIPdbldblDiv21(rhi, rlo, ahi, alo, b) \
do { \
double __tmp_dbldbl_div21_hi; \
double __tmp_dbldbl_div21_lo; \
double __estim_dbldbl_div21_hi; \
double __estim_dbldbl_div21_lo; \
__estim_dbldbl_div21_hi = (ahi)/(b); \
__estim_dbldbl_div21_lo = (alo)/(b); \
SCIPdbldblProd21(__tmp_dbldbl_div21_hi, __tmp_dbldbl_div21_lo, __estim_dbldbl_div21_hi, __estim_dbldbl_div21_lo, b); \
SCIPdbldblSum22(__tmp_dbldbl_div21_hi, __tmp_dbldbl_div21_lo, __tmp_dbldbl_div21_hi, __tmp_dbldbl_div21_lo, -(ahi), -(alo)); \
__tmp_dbldbl_div21_hi /= (b); \
__tmp_dbldbl_div21_lo /= (b); \
SCIPdbldblSum22(rhi, rlo, __estim_dbldbl_div21_hi, __estim_dbldbl_div21_lo, -__tmp_dbldbl_div21_hi, -__tmp_dbldbl_div21_lo); \
} while(0)
/** multiply two floating point numbers, both given by two doubles, and return the result as two doubles. */
#define SCIPdbldblProd22(rhi, rlo, ahi, alo, bhi, blo) \
do { \
double __tmp_dbldbl_prod22_hi; \
double __tmp_dbldbl_prod22_lo; \
SCIPdbldblProd(__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, ahi, bhi); \
SCIPdbldblSum21(__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, \
__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, (alo) * (bhi)); \
SCIPdbldblSum21(rhi, rlo, \
__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, (ahi) * (blo)); \
} while(0)
/** add two floating point numbers, both given by two doubles, and return the result as two doubles. */
#define SCIPdbldblSum22(rhi, rlo, ahi, alo, bhi, blo) \
do { \
double __tmp_dbldbl_sum22_hi; \
double __tmp_dbldbl_sum22_lo; \
SCIPdbldblSum21(__tmp_dbldbl_sum22_hi, __tmp_dbldbl_sum22_lo, ahi, alo, bhi); \
SCIPdbldblSum21(rhi, rlo, __tmp_dbldbl_sum22_hi, __tmp_dbldbl_sum22_lo, blo); \
} while(0)
/** square a floating point number given by two doubles and return the result as two doubles. */
#define SCIPdbldblSquare2(rhi, rlo, ahi, alo) \
do { \
double __tmp_dbldbl_square2_hi; \
double __tmp_dbldbl_square2_lo; \
SCIPdbldblSquare(__tmp_dbldbl_square2_hi, __tmp_dbldbl_square2_lo, (ahi)); \
SCIPdbldblSum21(rhi, rlo, __tmp_dbldbl_square2_hi, __tmp_dbldbl_square2_lo, 2 * (ahi) * (alo)); \
} while(0)
/** divide two floating point numbers, both given by two doubles, and return the result as two doubles. */
#define SCIPdbldblDiv22(rhi, rlo, ahi, alo, bhi, blo) \
do { \
double __tmp_dbldbl_div22_hi; \
double __tmp_dbldbl_div22_lo; \
double __estim_dbldbl_div22_hi = (ahi) / (bhi); \
double __estim_dbldbl_div22_lo = (alo) / (bhi); \
SCIPdbldblProd22(__tmp_dbldbl_div22_hi, __tmp_dbldbl_div22_lo, \
bhi, blo, __estim_dbldbl_div22_hi, __estim_dbldbl_div22_lo); \
SCIPdbldblSum22(__tmp_dbldbl_div22_hi, __tmp_dbldbl_div22_lo, \
__tmp_dbldbl_div22_hi, __tmp_dbldbl_div22_lo, -(ahi), -(alo)); \
__tmp_dbldbl_div22_hi /= (bhi); \
__tmp_dbldbl_div22_lo /= (bhi); \
SCIPdbldblSum22(rhi, rlo, __estim_dbldbl_div22_hi, __estim_dbldbl_div22_lo, \
-__tmp_dbldbl_div22_hi, -__tmp_dbldbl_div22_lo); \
} while(0)
/** take the square root of a floating point number given by one double and return the result as two doubles. */
#define SCIPdbldblSqrt(rhi, rlo, a) \
do { \
double __estim_dbldbl_sqrt = sqrt(a); \
SCIPdbldblDiv(rhi, rlo, a, __estim_dbldbl_sqrt); \
SCIPdbldblSum21(rhi, rlo, rhi, rlo, __estim_dbldbl_sqrt); \
(rhi) *= 0.5; \
(rlo) *= 0.5; \
} while(0)
/** take the square root of a floating point number given by two doubles and return the result as two doubles. */
#define SCIPdbldblSqrt2(rhi, rlo, ahi, alo) \
do { \
double __estim_dbldbl_sqrt2 = sqrt(ahi); \
SCIPdbldblDiv21(rhi, rlo, ahi, alo, __estim_dbldbl_sqrt2); \
SCIPdbldblSum21(rhi, rlo, rhi, rlo, __estim_dbldbl_sqrt2); \
(rhi) *= 0.5; \
(rlo) *= 0.5; \
} while(0)
/** compute the absolute value of the floating point number given by two doubles */
#define SCIPdbldblAbs2(rhi, rlo, ahi, alo) \
do { \
if( ahi < 0.0 ) \
{ \
(rhi) = -(ahi); \
(rlo) = -(alo); \
} \
else \
{ \
(rhi) = (ahi); \
(rlo) = (alo); \
} \
} while(0)
/** compute the floored value of the floating point number given by two doubles */
#define SCIPdbldblFloor2(rhi, rlo, ahi, alo) \
do { \
double __tmp_dbldbl_floor; \
__tmp_dbldbl_floor = floor((ahi) + (alo)); \
SCIPdbldblSum21(rhi, rlo, ahi, alo, -__tmp_dbldbl_floor); \
if( ((rhi) - 1.0) + (rlo) < 0.0 && (rhi) + (rlo) >= 0.0 ) \
{ \
/* floor in double precision was fine */ \
(rhi) = __tmp_dbldbl_floor; \
(rlo) = 0.0; \
} \
else \
{ \
/* floor in double precision needs to be corrected */ \
double __tmp2_dbldbl_floor = floor((rhi) + (rlo)); \
SCIPdbldblSum(rhi, rlo, __tmp_dbldbl_floor, __tmp2_dbldbl_floor); \
} \
} while(0)
/** compute the ceiled value of the floating point number given by two doubles */
#define SCIPdbldblCeil2(rhi, rlo, ahi, alo) \
do { \
double __tmp_dbldbl_ceil; \
__tmp_dbldbl_ceil = ceil((ahi) + (alo)); \
SCIPdbldblSum21(rhi, rlo, -(ahi), -(alo), __tmp_dbldbl_ceil); \
if( ((rhi) - 1.0) + (rlo) < 0.0 && (rhi) + (rlo) >= 0.0 ) \
{ \
/* ceil in double precision was fine */ \
(rhi) = __tmp_dbldbl_ceil; \
(rlo) = 0.0; \
} \
else \
{ \
/* ceil in double precision needs to be corrected */ \
double __tmp2_dbldbl_ceil = floor((rhi) + (rlo)); \
SCIPdbldblSum(rhi, rlo, __tmp_dbldbl_ceil, -__tmp2_dbldbl_ceil); \
} \
} while(0)
/** compute the floored value of the floating point number given by two doubles, add epsilon first for safety */
#define SCIPdbldblEpsFloor2(rhi, rlo, ahi, alo, eps) SCIPdbldblFloor2(rhi, rlo, ahi, (alo) + (eps))
/** compute the ceiled value of the floating point number given by two doubles, subtract epsilon first for safety */
#define SCIPdbldblEpsCeil2(rhi, rlo, ahi, alo, eps) SCIPdbldblCeil2(rhi, rlo, ahi, (alo) - (eps))
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file dcmp.h
* @ingroup INTERNALAPI
* @brief internal methods for decompositions and the decomposition store
* @author Gregor Hendel
*
* @todo get a decomposition score, and compute other stuff that may be important
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef SRC_SCIP_DECOMP_H_
#define SRC_SCIP_DECOMP_H_
#include "scip/type_dcmp.h"
#include "scip/type_var.h"
#include "scip/type_cons.h"
#include "blockmemshell/memory.h"
#ifdef __cplusplus
extern "C" {
#endif
#define SCIP_DECOMPSTORE_CAPA 10 /**< hardcoded maximum capacity of decomposition store */
/** creates a decomposition storage */
SCIP_RETCODE SCIPdecompstoreCreate(
SCIP_DECOMPSTORE** decompstore, /**< pointer to store decomposition storage */
BMS_BLKMEM* blkmem, /**< block memory data structure */
int nslots /**< maximum number of decomposition slots in storage */
);
/** frees a decomposition storage */
void SCIPdecompstoreFree(
SCIP_DECOMPSTORE** decompstore, /**< pointer to free decomposition storage */
BMS_BLKMEM* blkmem /**< block memory data structure */
);
/** adds decomposition to storage */
SCIP_RETCODE SCIPdecompstoreAdd(
SCIP_DECOMPSTORE* decompstore, /**< decomposition storage */
SCIP_DECOMP* decomp /**< decomposition to add */
);
/** transforms all available original decompositions into transformed space */
SCIP_RETCODE SCIPtransformDecompstore(
SCIP* scip /**< SCIP data structure */
);
/** frees all decompositions in transformed space */
void SCIPexitSolveDecompstore(
SCIP* scip /**< SCIP data structure */
);
/** gets decompositions from storage */
SCIP_DECOMP** SCIPdecompstoreGetDecomps(
SCIP_DECOMPSTORE* decompstore /**< decomposition storage */
);
/** gets number of decompositions in storage */
int SCIPdecompstoreGetNDecomps(
SCIP_DECOMPSTORE* decompstore /**< decomposition storage */
);
/** gets decompositions in original space from storage */
SCIP_DECOMP** SCIPdecompstoreGetOrigDecomps(
SCIP_DECOMPSTORE* decompstore /**< decomposition storage */
);
/** gets number of decompositions in original space in storage */
int SCIPdecompstoreGetNOrigDecomps(
SCIP_DECOMPSTORE* decompstore /**< decomposition storage */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file debug.h
* @ingroup INTERNALAPI
* @brief methods for debugging
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DEBUG_H__
#define __SCIP_DEBUG_H__
/** uncomment this define to activate debugging the LP interface */
/* #define SCIP_DEBUG_LP_INTERFACE */
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef WITH_DEBUG_SOLUTION
#include "blockmemshell/memory.h"
#include "scip/type_cons.h"
#include "scip/type_lp.h"
#include "scip/type_misc.h"
#include "scip/type_set.h"
#include "scip/type_sol.h"
#include "scip/type_tree.h"
#include "scip/type_var.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** solution data for debugging purposes */
typedef struct SCIP_DebugSolData SCIP_DEBUGSOLDATA;
#ifdef WITH_DEBUG_SOLUTION
/** creates debug solution data */
SCIP_RETCODE SCIPdebugSolDataCreate(
SCIP_DEBUGSOLDATA** debugsoldata /**< pointer to debug solution data */
);
/** frees the debug solution */
SCIP_RETCODE SCIPdebugFreeSol(
SCIP_SET* set
);
/** resets the data structure after restart */
SCIP_RETCODE SCIPdebugReset(
SCIP_SET* set
);
/** frees debugging data */
SCIP_RETCODE SCIPdebugFreeDebugData(
SCIP_SET* set /**< global SCIP settings */
);
/** checks for validity of the debugging solution in given constraints */
SCIP_RETCODE SCIPdebugCheckConss(
SCIP* scip, /**< SCIP data structure */
SCIP_CONS** conss, /**< constraints to check for validity */
int nconss /**< number of given constraints */
);
/** checks whether given row is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckRow(
SCIP_SET* set, /**< global SCIP settings */
SCIP_ROW* row /**< row to check for validity */
);
/** checks whether given global lower bound is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckLbGlobal(
SCIP* scip, /**< SCIP data structure */
SCIP_VAR* var, /**< problem variable */
SCIP_Real lb /**< lower bound */
);
/** checks whether given global upper bound is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckUbGlobal(
SCIP* scip, /**< SCIP data structure */
SCIP_VAR* var, /**< problem variable */
SCIP_Real ub /**< upper bound */
);
/** checks whether given local bound implication is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckInference(
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_NODE* node, /**< local node where this bound change was applied */
SCIP_VAR* var, /**< problem variable */
SCIP_Real newbound, /**< new value for bound */
SCIP_BOUNDTYPE boundtype /**< type of bound: lower or upper bound */
);
/** informs solution debugger, that the given node will be freed */
SCIP_RETCODE SCIPdebugRemoveNode(
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_NODE* node /**< node that will be freed */
);
/** checks whether given variable bound is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckVbound(
SCIP_SET* set, /**< global SCIP settings */
SCIP_VAR* var, /**< problem variable x in x <= b*z + d or x >= b*z + d */
SCIP_BOUNDTYPE vbtype, /**< type of variable bound (LOWER or UPPER) */
SCIP_VAR* vbvar, /**< variable z in x <= b*z + d or x >= b*z + d */
SCIP_Real vbcoef, /**< coefficient b in x <= b*z + d or x >= b*z + d */
SCIP_Real vbconstant /**< constant d in x <= b*z + d or x >= b*z + d */
);
/** checks whether given implication is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckImplic(
SCIP_SET* set, /**< global SCIP settings */
SCIP_VAR* var, /**< problem variable */
SCIP_Bool varfixing, /**< FALSE if y should be added in implications for x == 0, TRUE for x == 1 */
SCIP_VAR* implvar, /**< variable y in implication y <= b or y >= b */
SCIP_BOUNDTYPE impltype, /**< type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) */
SCIP_Real implbound /**< bound b in implication y <= b or y >= b */
);
/** checks whether given (multi)-aggregation is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckAggregation(
SCIP_SET* set, /**< global SCIP settings */
SCIP_VAR* var, /**< problem variable */
SCIP_VAR** aggrvars, /**< variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
SCIP_Real* scalars, /**< multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
SCIP_Real constant, /**< constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
int naggrvars /**< number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
);
/** check whether given clique is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckClique(
SCIP_SET* set, /**< global SCIP settings */
SCIP_VAR** vars, /**< binary variables in the clique: at most one can be set to the given value */
SCIP_Bool* values, /**< values of the variables in the clique; NULL to use TRUE for all vars */
int nvars /**< number of variables in the clique */
);
/** checks whether given conflict is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckConflict(
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_NODE* node, /**< node where the conflict clause is added */
SCIP_BDCHGINFO** bdchginfos, /**< bound change informations of the conflict set */
SCIP_Real* relaxedbds, /**< array with relaxed bounds which are efficient to create a valid conflict */
int nbdchginfos /**< number of bound changes in the conflict set */
);
/** checks whether given conflict graph frontier is valid for the debugging solution */
SCIP_RETCODE SCIPdebugCheckConflictFrontier(
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_SET* set, /**< global SCIP settings */
SCIP_NODE* node, /**< node where the conflict clause is added */
SCIP_BDCHGINFO* bdchginfo, /**< bound change info which got resolved, or NULL */
SCIP_BDCHGINFO** bdchginfos, /**< bound change informations of the conflict set */
SCIP_Real* relaxedbds, /**< array with relaxed bounds which are efficient to create a valid conflict */
int nbdchginfos, /**< number of bound changes in the conflict set */
SCIP_PQUEUE* bdchgqueue, /**< unprocessed conflict bound changes */
SCIP_PQUEUE* forcedbdchgqueue /**< unprocessed conflict bound changes that must be resolved */
);
/** creates the debugging propagator and includes it in SCIP */
SCIP_RETCODE SCIPdebugIncludeProp(
SCIP* scip /**< SCIP data structure */
);
/** adds a solution value for a new variable in the transformed problem that has no original counterpart
* a value can only be set if no value has been set for this variable before
*/
SCIP_RETCODE SCIPdebugAddSolVal(
SCIP* scip, /**< SCIP data structure */
SCIP_VAR* var, /**< variable for which to add a value */
SCIP_Real val /**< solution value for variable */
);
/** gets pointer to the debug solution */
SCIP_RETCODE SCIPdebugGetSol(
SCIP* scip, /**< SCIP data structure */
SCIP_SOL** sol /**< buffer to store pointer to the debug solution */
);
/** gets value for a variable in the debug solution
*
* if no value is stored for the variable, gives 0.0
*/
SCIP_RETCODE SCIPdebugGetSolVal(
SCIP* scip, /**< SCIP data structure */
SCIP_VAR* var, /**< variable for which to get the value */
SCIP_Real* val /**< buffer to store solution value */
);
/** check whether the debugging solution is valid in the current node */
SCIP_RETCODE SCIPdebugSolIsValidInSubtree(
SCIP* scip, /**< SCIP data structure */
SCIP_Bool* isvalidinsubtree /**< pointer to store whether the solution is valid in the current
* subtree
*/
);
/** checks whether SCIP data structure is the main SCIP (the one for which debugging is enabled) */
SCIP_Bool SCIPdebugIsMainscip(
SCIP* scip /**< SCIP data structure */
);
/** enabling solution debugging mechanism */
void SCIPdebugSolEnable(
SCIP* scip /**< SCIP data structure */
);
/** disabling solution debugging mechanism */
void SCIPdebugSolDisable(
SCIP* scip /**< SCIP data structure */
);
/** check if solution debugging mechanism is enabled */
SCIP_Bool SCIPdebugSolIsEnabled(
SCIP* scip /**< SCIP data structure */
);
#else
#define SCIPdebugSolDataCreate(debugsoldata) SCIP_OKAY
#define SCIPdebugFreeSol(set) SCIP_OKAY
#define SCIPdebugReset(set) SCIP_OKAY
#define SCIPdebugFreeDebugData(set) SCIP_OKAY
#define SCIPdebugCheckConss(scip,conss,nconss) SCIP_OKAY
#define SCIPdebugCheckRow(set,row) SCIP_OKAY
#define SCIPdebugCheckLbGlobal(scip,var,lb) SCIP_OKAY
#define SCIPdebugCheckUbGlobal(scip,var,ub) SCIP_OKAY
#define SCIPdebugCheckInference(blkmem,set,node,var,newbound,boundtype) SCIP_OKAY
#define SCIPdebugRemoveNode(blkmem,set,node) SCIP_OKAY
#define SCIPdebugCheckVbound(set,var,vbtype,vbvar,vbcoef,vbconstant) SCIP_OKAY
#define SCIPdebugCheckImplic(set,var,varfixing,implvar,impltype,implbound) SCIP_OKAY
#define SCIPdebugCheckAggregation(set,var,aggrvars,scalars,constant,naggrvars) SCIP_OKAY
#define SCIPdebugCheckClique(set,vars,values,nvars) SCIP_OKAY
#define SCIPdebugCheckConflict(blkmem,set,node,bdchginfos,relaxedbds,nliterals) SCIP_OKAY
#define SCIPdebugCheckConflictFrontier(blkmem,set,node,bdchginfo,bdchginfos,relaxedbds,nliterals,bdchgqueue,forcedbdchgqueue) SCIP_OKAY
#define SCIPdebugIncludeProp(scip) SCIP_OKAY
#define SCIPdebugAddSolVal(scip,var,val) SCIP_OKAY
#define SCIPdebugGetSolVal(scip,var,val) SCIP_OKAY
#define SCIPdebugSolIsValidInSubtree(scip,isvalidinsubtree) SCIP_OKAY
#define SCIPdebugSolEnable(scip) /**/
#define SCIPdebugSolDisable(scip) /**/
#define SCIPdebugSolIsEnabled(scip) FALSE
#endif
/*
* debug method for LP interface, to check if the LP interface works correct
*/
#ifdef SCIP_DEBUG_LP_INTERFACE
/* check if the coef is the r-th line of the inverse matrix B^-1; this is
* the case if (coef * B) is the r-th unit vector */
SCIP_RETCODE SCIPdebugCheckBInvRow(
SCIP* scip, /**< SCIP data structure */
int r, /**< row number */
SCIP_Real* coef /**< pointer to store the coefficients of the row */
);
#else
#define SCIPdebugCheckBInvRow(scip,r,coef) SCIP_OKAY
#endif
/** checks, if SCIP is in one of the feasible stages */
#ifndef NDEBUG
SCIP_RETCODE SCIPcheckStage(
SCIP* scip, /**< SCIP data structure */
const char* method, /**< method that was called */
SCIP_Bool init, /**< may method be called in the INIT stage? */
SCIP_Bool problem, /**< may method be called in the PROBLEM stage? */
SCIP_Bool transforming, /**< may method be called in the TRANSFORMING stage? */
SCIP_Bool transformed, /**< may method be called in the TRANSFORMED stage? */
SCIP_Bool initpresolve, /**< may method be called in the INITPRESOLVE stage? */
SCIP_Bool presolving, /**< may method be called in the PRESOLVING stage? */
SCIP_Bool exitpresolve, /**< may method be called in the EXITPRESOLE stage? */
SCIP_Bool presolved, /**< may method be called in the PRESOLVED stage? */
SCIP_Bool initsolve, /**< may method be called in the INITSOLVE stage? */
SCIP_Bool solving, /**< may method be called in the SOLVING stage? */
SCIP_Bool solved, /**< may method be called in the SOLVED stage? */
SCIP_Bool exitsolve, /**< may method be called in the EXITSOLVE stage? */
SCIP_Bool freetrans, /**< may method be called in the FREETRANS stage? */
SCIP_Bool freescip /**< may method be called in the FREE stage? */
);
#else
#define SCIPcheckStage(scip,method,init,problem,transforming,transformed,initpresolve,presolving,exitpresolve,presolved, \
initsolve,solving,solved,exitsolve,freetrans,freescip) SCIP_OKAY
#endif
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file def.h
* @ingroup INTERNALAPI
* @brief common defines and data types used in all packages of SCIP
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DEF_H__
#define __SCIP_DEF_H__
#ifdef __cplusplus
#define __STDC_LIMIT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
/*
* include build configuration flags
*/
#ifndef NO_CONFIG_HEADER
#include "scip/config.h"
#include "scip/scip_export.h"
#endif
/*
* GNU COMPILER VERSION define
*/
#ifdef __GNUC__
#ifndef GCC_VERSION
#define GCC_VERSION (__GNUC__ * 100 \
+ __GNUC_MINOR__ * 10 \
+ __GNUC_PATCHLEVEL__)
#endif
#endif
/*
* define whether compiler allows variadic macros
*/
#if defined(_MSC_VER) || ( __STDC_VERSION__ >= 199901L )
#define SCIP_HAVE_VARIADIC_MACROS 1
#endif
/*
* Boolean values
*/
#ifndef SCIP_Bool
#define SCIP_Bool unsigned int /**< type used for Boolean values */
#ifndef TRUE
#define TRUE 1 /**< Boolean value TRUE */
#define FALSE 0 /**< Boolean value FALSE */
#endif
#endif
#ifndef SCIP_Shortbool
#define SCIP_Shortbool uint8_t /**< type used for Boolean values with less space */
#endif
/*
* Add some macros for differing functions on Windows
*/
#if defined(_WIN32) || defined(_WIN64)
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define getcwd _getcwd
#endif
/*
* Define the marco SCIP_EXPORT if it is not included from the generated header
*/
#ifndef SCIP_EXPORT
#if defined(_WIN32) || defined(_WIN64)
#define SCIP_EXPORT __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
#define SCIP_EXPORT __attribute__((__visibility__("default")))
#else
#define SCIP_EXPORT
#endif
#endif
/* define INLINE */
#ifndef INLINE
#if defined(_WIN32) || defined(__STDC__)
#define INLINE __inline
#else
#define INLINE inline
#endif
#endif
#include "scip/type_retcode.h"
#include "scip/type_message.h"
#include "scip/pub_message.h"
#ifdef __cplusplus
extern "C" {
#endif
#define SCIP_VERSION 701 /**< SCIP version number (multiplied by 100 to get integer number) */
#define SCIP_SUBVERSION 0 /**< SCIP sub version number */
#define SCIP_APIVERSION 68 /**< SCIP API version number */
#define SCIP_COPYRIGHT "Copyright (C) 2002-2020 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)"
/*
* CIP format variable characters
*/
#define SCIP_VARTYPE_BINARY_CHAR 'B'
#define SCIP_VARTYPE_INTEGER_CHAR 'I'
#define SCIP_VARTYPE_IMPLINT_CHAR 'M'
#define SCIP_VARTYPE_CONTINUOUS_CHAR 'C'
/*
* Long Integer values
*/
#ifndef LLONG_MAX
#define LLONG_MAX 9223372036854775807LL
#define LLONG_MIN (-LLONG_MAX - 1LL)
#endif
#define SCIP_Longint long long /**< type used for long integer values */
#define SCIP_LONGINT_MAX LLONG_MAX
#define SCIP_LONGINT_MIN LLONG_MIN
#ifndef SCIP_LONGINT_FORMAT
#if defined(_WIN32) || defined(_WIN64)
#define SCIP_LONGINT_FORMAT "I64d"
#else
#define SCIP_LONGINT_FORMAT "lld"
#endif
#endif
/*
* Floating point values
*/
#define SCIP_Real double /**< type used for floating point values */
#define SCIP_REAL_MAX (SCIP_Real)DBL_MAX
#define SCIP_REAL_MIN -(SCIP_Real)DBL_MAX
#define SCIP_REAL_FORMAT "lf"
#define SCIP_DEFAULT_INFINITY 1e+20 /**< default value considered to be infinity */
#define SCIP_DEFAULT_EPSILON 1e-09 /**< default upper bound for floating points to be considered zero */
#define SCIP_DEFAULT_SUMEPSILON 1e-06 /**< default upper bound for sums of floating points to be considered zero */
#define SCIP_DEFAULT_FEASTOL 1e-06 /**< default feasibility tolerance for constraints */
#define SCIP_DEFAULT_CHECKFEASTOLFAC 1.0 /**< default factor to change the feasibility tolerance when testing the best solution for feasibility (after solving process) */
#define SCIP_DEFAULT_LPFEASTOLFACTOR 1.0 /**< default factor w.r.t. primal feasibility tolerance that determines default (and maximal) primal feasibility tolerance of LP solver */
#define SCIP_DEFAULT_DUALFEASTOL 1e-07 /**< default feasibility tolerance for reduced costs */
#define SCIP_DEFAULT_BARRIERCONVTOL 1e-10 /**< default convergence tolerance used in barrier algorithm */
#define SCIP_DEFAULT_BOUNDSTREPS 0.05 /**< default minimal relative improve for strengthening bounds */
#define SCIP_DEFAULT_PSEUDOCOSTEPS 1e-01 /**< default minimal variable distance value to use for pseudo cost updates */
#define SCIP_DEFAULT_PSEUDOCOSTDELTA 1e-04 /**< default minimal objective distance value to use for pseudo cost updates */
#define SCIP_DEFAULT_RECOMPFAC 1e+07 /**< default minimal decrease factor that causes the recomputation of a value (e.g., pseudo objective) instead of an update */
#define SCIP_DEFAULT_HUGEVAL 1e+15 /**< values larger than this are considered huge and should be handled separately (e.g., in activity computation) */
#define SCIP_MAXEPSILON 1e-03 /**< maximum value for any numerical epsilon */
#define SCIP_MINEPSILON 1e-20 /**< minimum value for any numerical epsilon */
#define SCIP_INVALID (double)1e+99 /**< floating point value is not valid */
#define SCIP_UNKNOWN (double)1e+98 /**< floating point value is not known (in primal solution) */
#define REALABS(x) (fabs(x))
#define EPSEQ(x,y,eps) (REALABS((x)-(y)) <= (eps))
#define EPSLT(x,y,eps) ((x)-(y) < -(eps))
#define EPSLE(x,y,eps) ((x)-(y) <= (eps))
#define EPSGT(x,y,eps) ((x)-(y) > (eps))
#define EPSGE(x,y,eps) ((x)-(y) >= -(eps))
#define EPSZ(x,eps) (REALABS(x) <= (eps))
#define EPSP(x,eps) ((x) > (eps))
#define EPSN(x,eps) ((x) < -(eps))
#define EPSFLOOR(x,eps) (floor((x)+(eps)))
#define EPSCEIL(x,eps) (ceil((x)-(eps)))
#define EPSROUND(x,eps) (ceil((x)-0.5+(eps)))
#define EPSFRAC(x,eps) ((x)-EPSFLOOR(x,eps))
#define EPSISINT(x,eps) (EPSFRAC(x,eps) <= (eps))
#ifndef SQR
#define SQR(x) ((x)*(x))
#define SQRT(x) (sqrt(x))
#endif
#ifndef LOG2
#if defined(_MSC_VER) && (_MSC_VER < 1800)
#define LOG2(x) (log(x) / log(2.0))
#else
#define LOG2(x) log2(x)
#endif
#endif
#ifndef ABS
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#endif
#ifndef MAX
#define MAX(x,y) ((x) >= (y) ? (x) : (y)) /**< returns maximum of x and y */
#define MIN(x,y) ((x) <= (y) ? (x) : (y)) /**< returns minimum of x and y */
#endif
#ifndef MAX3
#define MAX3(x,y,z) ((x) >= (y) ? MAX(x,z) : MAX(y,z)) /**< returns maximum of x, y, and z */
#define MIN3(x,y,z) ((x) <= (y) ? MIN(x,z) : MIN(y,z)) /**< returns minimum of x, y, and z */
#endif
/* platform-dependent specification of the log1p, which is numerically more stable around x = 0.0 */
#ifndef LOG1P
#if defined(_WIN32) || defined(_WIN64)
#define LOG1P(x) (log(1.0+x))
#else
#define LOG1P(x) (log1p(x))
#endif
#endif
#ifndef COPYSIGN
#if defined(_MSC_VER) && (_MSC_VER < 1800)
#define COPYSIGN _copysign
#else
#define COPYSIGN copysign
#endif
#endif
/*
* Pointers
*/
#ifndef NULL
#define NULL ((void*)0) /**< zero pointer */
#endif
#ifndef RESTRICT
#if defined(_MSC_VER)
#define RESTRICT __restrict
#else
#ifdef __cplusplus
#define RESTRICT __restrict__
#elif __STDC_VERSION__ >= 199901L
#define RESTRICT restrict
#else
#define RESTRICT
#endif
#endif
#endif
/*
* Strings
*/
#define SCIP_MAXSTRLEN 1024 /**< maximum string length in SCIP */
/*
* Memory settings
*/
/* we use SIZE_MAX / 2 to detect negative sizes which got a very large value when casting to size_t */
#define SCIP_MAXMEMSIZE (SIZE_MAX/2) /**< maximum size of allocated memory (array) */
#define SCIP_HASHSIZE_PARAMS 2048 /**< size of hash table in parameter name tables */
#define SCIP_HASHSIZE_NAMES 500 /**< size of hash table in name tables */
#define SCIP_HASHSIZE_CUTPOOLS 500 /**< size of hash table in cut pools */
#define SCIP_HASHSIZE_CLIQUES 500 /**< size of hash table in clique tables */
#define SCIP_HASHSIZE_NAMES_SMALL 100 /**< size of hash table in name tables for small problems */
#define SCIP_HASHSIZE_CUTPOOLS_SMALL 100 /**< size of hash table in cut pools for small problems */
#define SCIP_HASHSIZE_CLIQUES_SMALL 100 /**< size of hash table in clique tables for small problems */
#define SCIP_HASHSIZE_VBC 500 /**< size of hash map for node -> nodenum mapping used for VBC output */
#define SCIP_DEFAULT_MEM_ARRAYGROWFAC 1.2 /**< memory growing factor for dynamically allocated arrays */
#define SCIP_DEFAULT_MEM_ARRAYGROWINIT 4 /**< initial size of dynamically allocated arrays */
#define SCIP_MEM_NOLIMIT (SCIP_Longint)SCIP_LONGINT_MAX/1048576.0/**< initial size of dynamically allocated arrays */
/*
* Tree settings
*/
#define SCIP_MAXTREEDEPTH 65534 /**< maximal allowed depth of the branch-and-bound tree */
/*
* Probing scoring settings
*/
#define SCIP_PROBINGSCORE_PENALTYRATIO 2 /**< ratio for penalizing too small fractionalities in diving heuristics.
* if the fractional part of a variable is smaller than a given threshold
* the corresponding score gets penalized. due to numerical troubles
* we will flip a coin whenever SCIPisEQ(scip, fractionality, threshold)
* evaluates to true. this parameter defines the chance that this results
* in penalizing the score, i.e., there is 1:2 chance for penalizing.
*/
/*
* Global debugging settings
*/
/*#define DEBUG*/
/*
* Defines for handling SCIP return codes
*/
/** this macro is used to stop SCIP in debug mode such that errors can be debugged;
*
* @note In optimized mode this macro has no effect. That means, in case of an error it has to be ensured that code
* terminates with an error code or continues safely.
*/
#define SCIPABORT() assert(FALSE) /*lint --e{527} */
#define SCIP_CALL_ABORT_QUIET(x) do { if( (x) != SCIP_OKAY ) SCIPABORT(); } while( FALSE )
#define SCIP_CALL_QUIET(x) do { SCIP_RETCODE _restat_; if( (_restat_ = (x)) != SCIP_OKAY ) return _restat_; } while( FALSE )
#define SCIP_ALLOC_ABORT_QUIET(x) do { if( NULL == (x) ) SCIPABORT(); } while( FALSE )
#define SCIP_ALLOC_QUIET(x) do { if( NULL == (x) ) return SCIP_NOMEMORY; } while( FALSE )
#define SCIP_CALL_ABORT(x) do \
{ \
SCIP_RETCODE _restat_; /*lint -e{506,774}*/ \
if( (_restat_ = (x)) != SCIP_OKAY ) \
{ \
SCIPerrorMessage("Error <%d> in function call\n", _restat_); \
SCIPABORT(); \
} \
} \
while( FALSE )
#define SCIP_ALLOC_ABORT(x) do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n", __FILE__, __LINE__); \
SCIPABORT(); \
} \
} \
while( FALSE )
#define SCIP_CALL(x) do \
{ \
SCIP_RETCODE _restat_; /*lint -e{506,774}*/ \
if( (_restat_ = (x)) != SCIP_OKAY ) \
{ \
SCIPerrorMessage("Error <%d> in function call\n", _restat_); \
return _restat_; \
} \
} \
while( FALSE )
#define SCIP_ALLOC(x) do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n"); \
return SCIP_NOMEMORY; \
} \
} \
while( FALSE )
#define SCIP_CALL_TERMINATE(retcode, x, TERM) do \
{ \
if( ((retcode) = (x)) != SCIP_OKAY ) \
{ \
SCIPerrorMessage("Error <%d> in function call\n", retcode); \
goto TERM; \
} \
} \
while( FALSE )
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM) do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n"); \
retcode = SCIP_NOMEMORY; \
goto TERM; \
} \
} \
while( FALSE )
#define SCIP_CALL_FINALLY(x, y) do \
{ \
SCIP_RETCODE _restat_; \
if( (_restat_ = (x)) != SCIP_OKAY ) \
{ \
SCIPerrorMessage("Error <%d> in function call\n", _restat_); \
(y); \
return _restat_; \
} \
} \
while( FALSE )
#define SCIP_UNUSED(x) ((void) (x))
/*
* Define to mark deprecated API functions
*/
#ifndef SCIP_DEPRECATED
#if defined(_MSC_VER)
# define SCIP_DEPRECATED __declspec(deprecated)
#elif defined(__GNUC__)
# define SCIP_DEPRECATED __attribute__ ((deprecated))
#else
# define SCIP_DEPRECATED
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file dialog.h
* @ingroup INTERNALAPI
* @brief internal methods for user interface dialog
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DIALOG_H__
#define __SCIP_DIALOG_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_set.h"
#include "scip/type_dialog.h"
#include "scip/pub_dialog.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* dialog handler
*/
/** copies the given dialog to a new scip */
SCIP_RETCODE SCIPdialogCopyInclude(
SCIP_DIALOG* dialog, /**< dialog */
SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
);
/** creates a dialog handler */
SCIP_RETCODE SCIPdialoghdlrCreate(
SCIP_SET* set, /**< global SCIP settings */
SCIP_DIALOGHDLR** dialoghdlr /**< pointer to store dialog handler */
);
/** frees a dialog handler and it's dialog tree */
SCIP_RETCODE SCIPdialoghdlrFree(
SCIP* scip, /**< SCIP data structure */
SCIP_DIALOGHDLR** dialoghdlr /**< pointer to dialog handler */
);
/** executes the root dialog of the dialog handler */
SCIP_RETCODE SCIPdialoghdlrExec(
SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
SCIP_SET* set /**< global SCIP settings */
);
/** makes given dialog the root dialog of dialog handler; captures dialog and releases former root dialog */
SCIP_RETCODE SCIPdialoghdlrSetRoot(
SCIP* scip, /**< SCIP data structure */
SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
SCIP_DIALOG* dialog /**< dialog to be the root */
);
/*
* dialog
*/
/** creates and captures a user interface dialog */
SCIP_RETCODE SCIPdialogCreate(
SCIP_DIALOG** dialog, /**< pointer to store the dialog */
SCIP_DECL_DIALOGCOPY ((*dialogcopy)), /**< copy method of dialog or NULL if you don't want to copy your plugin into sub-SCIPs */
SCIP_DECL_DIALOGEXEC ((*dialogexec)), /**< execution method of dialog */
SCIP_DECL_DIALOGDESC ((*dialogdesc)), /**< description output method of dialog, or NULL */
SCIP_DECL_DIALOGFREE ((*dialogfree)), /**< destructor of dialog to free user data, or NULL */
const char* name, /**< name of dialog: command name appearing in parent's dialog menu */
const char* desc, /**< description of dialog used if description output method is NULL */
SCIP_Bool issubmenu, /**< is the dialog a sub-menu? */
SCIP_DIALOGDATA* dialogdata /**< user defined dialog data */
);
/** captures a dialog */
void SCIPdialogCapture(
SCIP_DIALOG* dialog /**< dialog */
);
/** releases a dialog */
SCIP_RETCODE SCIPdialogRelease(
SCIP* scip, /**< SCIP data structure */
SCIP_DIALOG** dialog /**< pointer to dialog */
);
/** executes dialog */
SCIP_RETCODE SCIPdialogExec(
SCIP_DIALOG* dialog, /**< dialog */
SCIP_SET* set, /**< global SCIP settings */
SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
SCIP_DIALOG** nextdialog /**< pointer to store the next dialog to process */
);
/** adds a sub-dialog to the given dialog as menu entry and captures the sub-dialog */
SCIP_RETCODE SCIPdialogAddEntry(
SCIP_DIALOG* dialog, /**< dialog */
SCIP_SET* set, /**< global SCIP settings */
SCIP_DIALOG* subdialog /**< sub-dialog to add as menu entry in dialog */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file dialog_default.h
* @ingroup DIALOGS
* @brief default user interface dialog
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DIALOG_DEFAULT_H__
#define __SCIP_DIALOG_DEFAULT_H__
#include "scip/def.h"
#include "scip/type_dialog.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/**@addtogroup DIALOGS
*
* @{
*/
/** standard menu dialog execution method, that displays it's help screen if the remaining command line is empty */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecMenu);
/** standard menu dialog execution method, that doesn't display it's help screen */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecMenuLazy);
/** dialog execution method for the change add constraint */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeAddCons);
/** dialog execution method for the change bounds command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeBounds);
/** dialog execution method for the freetransproblem command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeFreetransproblem);
/** dialog execution method for the changing the objective sense */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeObjSense);
/** dialog execution method for the checksol command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecChecksol);
/** dialog execution method for the cliquegraph command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecCliquegraph);
/** dialog execution method for the display benders command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayBenders);
/** dialog execution method for the display branching command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayBranching);
/** dialog execution method for the display compression command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayCompression);
/** dialog execution method for the display conflict command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayConflict);
/** dialog execution method for the display conshdlrs command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayConshdlrs);
/** dialog execution method for the display displaycols command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayDisplaycols);
/** dialog execution method for the display heuristics command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayHeuristics);
/** dialog execution method for the display memory command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayMemory);
/** dialog execution method for the display nodeselectors command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayNodeselectors);
/** dialog execution method for the display nlpi command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayNlpi);
/** dialog execution method for the display parameters command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayParameters);
/** dialog execution method for the display presolvers command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayPresolvers);
/** dialog execution method for the display pricer command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayPricers);
/** dialog execution method for the display problem command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayProblem);
/** dialog execution method for the display propagators command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayPropagators);
/** dialog execution method for the display readers command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayReaders);
/** dialog execution method for the display relaxators command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayRelaxators);
/** dialog execution method for the display separators command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySeparators);
/** dialog execution method for the display solution command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySolution);
/** dialog execution method for the display finitesolution command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayFiniteSolution);
/** dialog execution method for the display dual solution command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayDualSolution);
/** dialog execution method for the display of solutions in the pool command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySolutionPool);
/** dialog execution method for the display subproblem command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySubproblem);
/** dialog execution method for the display subsolution command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySubSolution);
/** dialog execution method for the display statistics command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayStatistics);
/** dialog execution method for the display reoptstatistics command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayReoptStatistics);
/** dialog execution method for the display transproblem command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayTransproblem);
/** dialog execution method for the display value command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayValue);
/** dialog execution method for the display varbranchstatistics command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayVarbranchstatistics);
/** dialog execution method for the display LP solution quality command */
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayLPSolutionQuality);
/** dialog execution method for the display transsolution command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayTranssolution);
/** dialog execution method for the help command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecHelp);
/** dialog execution method for the free command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecFree);
/** dialog execution method for the newstart command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecNewstart);
/** dialog execution method for the transform command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecTransform);
/** dialog execution method for the optimize command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecOptimize);
/** dialog execution method for the parallelopt command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecConcurrentOpt);
/** dialog execution method for the presolve command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecPresolve);
/** dialog execution method for the quit command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecQuit);
/** dialog execution method for the read command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecRead);
/** dialog execution method for the set default command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetDefault);
/** dialog execution method for the set load command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetLoad);
/** dialog execution method for the set save command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSave);
/** dialog execution method for the set diffsave command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetDiffsave);
/** dialog execution method for the set parameter command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetParam);
/** dialog description method for the set parameter command */
SCIP_EXPORT
SCIP_DECL_DIALOGDESC(SCIPdialogDescSetParam);
/** dialog execution method for the fix parameter command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecFixParam);
/** dialog description method for the fix parameter command */
SCIP_EXPORT
SCIP_DECL_DIALOGDESC(SCIPdialogDescFixParam);
/** dialog execution method for the set branching direction command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetBranchingDirection);
/** dialog execution method for the set branching priority command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetBranchingPriority);
/** dialog execution method for the set heuristics aggressive command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsAggressive);
/** dialog execution method for the set heuristics default command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsDefault);
/** dialog execution method for the set heuristics fast command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsFast);
/** dialog execution method for the set heuristics off command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsOff);
/** dialog execution method for the set presolving aggressive command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingAggressive);
/** dialog execution method for the set presolving default command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingDefault);
/** dialog execution method for the set presolving fast command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingFast);
/** dialog execution method for the set presolving off command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingOff);
/** dialog execution method for the set separating aggressive command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingAggressive);
/** dialog execution method for the set separating default command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingDefault);
/** dialog execution method for the set separating fast command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingFast);
/** dialog execution method for the set separating off command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingOff);
/** dialog execution method for the set emphasis counter command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisCounter);
/** dialog execution method for the set emphasis cpsolver command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisCpsolver);
/** dialog execution method for the set emphasis easy CIP command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisEasycip);
/** dialog execution method for the set emphasis feasibility command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisFeasibility);
/** dialog execution method for the set emphasis hard LP command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisHardlp);
/** dialog execution method for the set emphasis optimality command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisOptimality);
/** dialog execution method for the set emphasis numerics command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisNumerics);
/** dialog execution method for the set limits objective command */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetLimitsObjective);
/** dialog execution method for linear constraint type classification */
SCIP_EXPORT
SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayLinearConsClassification);
/** creates a root dialog */
SCIP_EXPORT
SCIP_RETCODE SCIPcreateRootDialog(
SCIP* scip, /**< SCIP data structure */
SCIP_DIALOG** root /**< pointer to store the root dialog */
);
/** @} */
/**@addtogroup DialogIncludes
*
* @{
*/
/** includes or updates the default dialog menus in SCIP */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeDialogDefault(
SCIP* scip /**< SCIP data structure */
);
/** includes or updates the "set" menu for each available parameter setting */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeDialogDefaultSet(
SCIP* scip /**< SCIP data structure */
);
/** includes or updates the "fix" menu for each available parameter setting */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeDialogDefaultFix(
SCIP* scip /**< SCIP data structure */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file dialog_xyz.h
* @ingroup DIALOGS
* @brief xyz user interface dialog
* @author Kati Wolter
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DIALOG_XYZ_H__
#define __SCIP_DIALOG_XYZ_H__
#include "scip/scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the xyz dialog and includes it in SCIP
*
* @ingroup DialogIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeDialogXyz(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup DIALOGS
*
* @{
*/
/** TODO: add further methods to this group for documentation purposes */
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file disp.h
* @ingroup INTERNALAPI
* @brief internal methods for displaying runtime statistics
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DISP_H__
#define __SCIP_DISP_H__
#include <stdio.h>
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_set.h"
#include "scip/type_stat.h"
#include "scip/type_disp.h"
#include "scip/type_paramset.h"
#include "scip/pub_disp.h"
#ifdef __cplusplus
extern "C" {
#endif
/** parameter change information method to autoselect display columns again */
SCIP_DECL_PARAMCHGD(SCIPparamChgdDispActive);
/** copies the given display to a new scip */
SCIP_RETCODE SCIPdispCopyInclude(
SCIP_DISP* disp, /**< display column */
SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
);
/** creates a display column */
SCIP_RETCODE SCIPdispCreate(
SCIP_DISP** disp, /**< pointer to store display column */
SCIP_SET* set, /**< global SCIP settings */
SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
const char* name, /**< name of display column */
const char* desc, /**< description of display column */
const char* header, /**< head line of display column */
SCIP_DISPSTATUS dispstatus, /**< display activation status of display column */
SCIP_DECL_DISPCOPY ((*dispcopy)), /**< copy method of display column or NULL if you don't want to copy your plugin into sub-SCIPs */
SCIP_DECL_DISPFREE ((*dispfree)), /**< destructor of display column */
SCIP_DECL_DISPINIT ((*dispinit)), /**< initialize display column */
SCIP_DECL_DISPEXIT ((*dispexit)), /**< deinitialize display column */
SCIP_DECL_DISPINITSOL ((*dispinitsol)), /**< solving process initialization method of display column */
SCIP_DECL_DISPEXITSOL ((*dispexitsol)), /**< solving process deinitialization method of display column */
SCIP_DECL_DISPOUTPUT ((*dispoutput)), /**< output method */
SCIP_DISPDATA* dispdata, /**< display column data */
int width, /**< width of display column (no. of chars used) */
int priority, /**< priority of display column */
int position, /**< relative position of display column */
SCIP_Bool stripline /**< should the column be separated with a line from its right neighbor? */
);
/** frees memory of display column */
SCIP_RETCODE SCIPdispFree(
SCIP_DISP** disp, /**< pointer to display column data structure */
SCIP_SET* set /**< global SCIP settings */
);
/** initializes display column */
SCIP_RETCODE SCIPdispInit(
SCIP_DISP* disp, /**< display column */
SCIP_SET* set /**< global SCIP settings */
);
/** deinitializes display column */
SCIP_RETCODE SCIPdispExit(
SCIP_DISP* disp, /**< display column */
SCIP_SET* set /**< global SCIP settings */
);
/** informs display column that the branch and bound process is being started */
SCIP_RETCODE SCIPdispInitsol(
SCIP_DISP* disp, /**< display column */
SCIP_SET* set /**< global SCIP settings */
);
/** informs display column that the branch and bound process data is being freed */
SCIP_RETCODE SCIPdispExitsol(
SCIP_DISP* disp, /**< display column */
SCIP_SET* set /**< global SCIP settings */
);
/** output display column to screen */
SCIP_RETCODE SCIPdispOutput(
SCIP_DISP* disp, /**< display column */
SCIP_SET* set, /**< global SCIP settings */
FILE* file /**< output file (or NULL for standard output) */
);
/** prints one line of output with the active display columns */
SCIP_RETCODE SCIPdispPrintLine(
SCIP_SET* set, /**< global SCIP settings */
SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
SCIP_STAT* stat, /**< problem statistics data */
FILE* file, /**< output file (or NULL for standard output) */
SCIP_Bool forcedisplay, /**< should the line be printed without regarding frequency? */
SCIP_Bool endline /**< should the line be terminated with a newline symbol? */
);
/** activates all display lines fitting in the display w.r. to priority */
SCIP_RETCODE SCIPdispAutoActivate(
SCIP_SET* set /**< global SCIP settings */
);
/** changes the display column mode */
void SCIPdispChgMode(
SCIP_DISP* disp, /**< display column */
SCIP_DISPMODE mode /**< the display column mode */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file disp_default.h
* @ingroup DISPLAYS
* @brief default display columns
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DISP_DEFAULT_H__
#define __SCIP_DISP_DEFAULT_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the default display columns in SCIP
*
* @ingroup DisplayIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeDispDefault(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file disp_xyz.h
* @ingroup DISPLAYS
* @brief xyz display column
* @author Kati Wolter
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_DISP_XYZ_H__
#define __SCIP_DISP_XYZ_H__
#include "scip/scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the xyz display column and includes it in SCIP
*
* @ingroup DisplayIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeDispXyz(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup DISPLAYS
*
* @{
*/
/** TODO add further methods to this group for documentation purposes */
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file event.h
* @brief internal methods for managing events
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_EVENT_H__
#define __SCIP_EVENT_H__
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_set.h"
#include "scip/type_event.h"
#include "scip/type_lp.h"
#include "scip/type_var.h"
#include "scip/type_sol.h"
#include "scip/type_primal.h"
#include "scip/type_branch.h"
#include "scip/pub_event.h"
/* In optimized mode, some function calls are overwritten by defines to reduce the number of function calls and
* speed up the algorithms. For this, we need to include struct_event.h.
*/
#ifdef NDEBUG
#include "scip/struct_event.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Event handler methods
*/
/** copies the given event handler to a new scip */
SCIP_RETCODE SCIPeventhdlrCopyInclude(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
);
/** creates an event handler */
SCIP_RETCODE SCIPeventhdlrCreate(
SCIP_EVENTHDLR** eventhdlr, /**< pointer to event handler data structure */
SCIP_SET* set, /**< global SCIP settings */
const char* name, /**< name of event handler */
const char* desc, /**< description of event handler */
SCIP_DECL_EVENTCOPY ((*eventcopy)), /**< copy method of event handler or NULL if you don't want to copy your plugin into sub-SCIPs */
SCIP_DECL_EVENTFREE ((*eventfree)), /**< destructor of event handler */
SCIP_DECL_EVENTINIT ((*eventinit)), /**< initialize event handler */
SCIP_DECL_EVENTEXIT ((*eventexit)), /**< deinitialize event handler */
SCIP_DECL_EVENTINITSOL((*eventinitsol)), /**< solving process initialization method of event handler */
SCIP_DECL_EVENTEXITSOL((*eventexitsol)), /**< solving process deinitialization method of event handler */
SCIP_DECL_EVENTDELETE ((*eventdelete)), /**< free specific event data */
SCIP_DECL_EVENTEXEC ((*eventexec)), /**< execute event handler */
SCIP_EVENTHDLRDATA* eventhdlrdata /**< event handler data */
);
/** calls destructor and frees memory of event handler */
SCIP_RETCODE SCIPeventhdlrFree(
SCIP_EVENTHDLR** eventhdlr, /**< pointer to event handler data structure */
SCIP_SET* set /**< global SCIP settings */
);
/** initializes event handler */
SCIP_RETCODE SCIPeventhdlrInit(
SCIP_EVENTHDLR* eventhdlr, /**< event handler for this event */
SCIP_SET* set /**< global SCIP settings */
);
/** calls exit method of event handler */
SCIP_RETCODE SCIPeventhdlrExit(
SCIP_EVENTHDLR* eventhdlr, /**< event handler for this event */
SCIP_SET* set /**< global SCIP settings */
);
/** informs event handler that the branch and bound process is being started */
SCIP_RETCODE SCIPeventhdlrInitsol(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_SET* set /**< global SCIP settings */
);
/** informs event handler that the branch and bound process data is being freed */
SCIP_RETCODE SCIPeventhdlrExitsol(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_SET* set /**< global SCIP settings */
);
/** calls execution method of event handler */
SCIP_RETCODE SCIPeventhdlrExec(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_SET* set, /**< global SCIP settings */
SCIP_EVENT* event, /**< event to call event handler with */
SCIP_EVENTDATA* eventdata /**< user data for the issued event */
);
/**
* callback setter methods of event handlers
*/
/** sets copy callback for all events of this event handler */
void SCIPeventhdlrSetCopy(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTCOPY ((*eventcopy)) /**< copy callback for events */
);
/** sets destructor callback of this event handler */
void SCIPeventhdlrSetFree(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTFREE ((*eventfree)) /**< destructor callback of event handler */
);
/** sets initialization callback of this event handler */
void SCIPeventhdlrSetInit(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTINIT ((*eventinit)) /**< initialization callback of event handler */
);
/** sets deinitialization callback of this event handler */
void SCIPeventhdlrSetExit(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTEXIT ((*eventexit)) /**< deinitialization callback of event handler */
);
/** sets solving process initialization callback of this event handler */
void SCIPeventhdlrSetInitsol(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTINITSOL((*eventinitsol)) /**< solving process initialization callback of event handler */
);
/** sets solving process deinitialization callback of this event handler */
void SCIPeventhdlrSetExitsol(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTEXITSOL((*eventexitsol)) /**< solving process deinitialization callback of event handler */
);
/** sets callback to free specific event data */
void SCIPeventhdlrSetDelete(
SCIP_EVENTHDLR* eventhdlr, /**< event handler */
SCIP_DECL_EVENTDELETE ((*eventdelete)) /**< callback to free specific event data */
);
/** enables or disables all clocks of \p eventhdlr, depending on the value of the flag */
void SCIPeventhdlrEnableOrDisableClocks(
SCIP_EVENTHDLR* eventhdlr, /**< the event handler for which all clocks should be enabled or disabled */
SCIP_Bool enable /**< should the clocks of the event handler be enabled? */
);
/*
* Event methods
*/
/** creates a synchronization event */
SCIP_RETCODE SCIPeventCreateSync(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem /**< block memory */
);
/** creates an event for an addition of a variable to the problem */
SCIP_RETCODE SCIPeventCreateVarAdded(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var /**< variable that was added to the problem */
);
/** creates an event for a deletion of a variable from the problem */
SCIP_RETCODE SCIPeventCreateVarDeleted(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var /**< variable that is to be deleted from the problem */
);
/** creates an event for a fixing of a variable */
SCIP_RETCODE SCIPeventCreateVarFixed(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var /**< variable that was fixed */
);
/** creates an event for a change in the number of locks of a variable down to zero or one */
SCIP_RETCODE SCIPeventCreateVarUnlocked(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var /**< variable that changed the number of locks */
);
/** creates an event for a change in the objective value of a variable */
SCIP_RETCODE SCIPeventCreateObjChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose objective value changed */
SCIP_Real oldobj, /**< old objective value before value changed */
SCIP_Real newobj /**< new objective value after value changed */
);
/** creates an event for a change in the global lower bound of a variable */
SCIP_RETCODE SCIPeventCreateGlbChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real oldbound, /**< old bound before bound changed */
SCIP_Real newbound /**< new bound after bound changed */
);
/** creates an event for a change in the global upper bound of a variable */
SCIP_RETCODE SCIPeventCreateGubChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real oldbound, /**< old bound before bound changed */
SCIP_Real newbound /**< new bound after bound changed */
);
/** creates an event for a change in the lower bound of a variable */
SCIP_RETCODE SCIPeventCreateLbChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real oldbound, /**< old bound before bound changed */
SCIP_Real newbound /**< new bound after bound changed */
);
/** creates an event for a change in the upper bound of a variable */
SCIP_RETCODE SCIPeventCreateUbChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real oldbound, /**< old bound before bound changed */
SCIP_Real newbound /**< new bound after bound changed */
);
/** creates an event for an addition of a global domain hole to a variable */
SCIP_RETCODE SCIPeventCreateGholeAdded(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real left, /**< left bound of open interval in new hole */
SCIP_Real right /**< right bound of open interval in new hole */
);
/** creates an event for removing a global domain hole of a variable */
SCIP_RETCODE SCIPeventCreateGholeRemoved(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real left, /**< left bound of open interval in hole */
SCIP_Real right /**< right bound of open interval in hole */
);
/** creates an event for an addition of a local domain hole to a variable */
SCIP_RETCODE SCIPeventCreateLholeAdded(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real left, /**< left bound of open interval in new hole */
SCIP_Real right /**< right bound of open interval in new hole */
);
/** creates an event for removing a local domain hole of a variable */
SCIP_RETCODE SCIPeventCreateLholeRemoved(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose bound changed */
SCIP_Real left, /**< left bound of open interval in hole */
SCIP_Real right /**< right bound of open interval in hole */
);
/** creates an event for an addition to the variable's implications list, clique or variable bounds information */
SCIP_RETCODE SCIPeventCreateImplAdded(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var /**< variable that was fixed */
);
/** creates an event for a changeing the type of a variable */
SCIP_RETCODE SCIPeventCreateTypeChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_VAR* var, /**< variable whose objective value changed */
SCIP_VARTYPE oldtype, /**< old variable type */
SCIP_VARTYPE newtype /**< new variable type */
);
/** creates an event for the addition of a linear row to the separation storage */
SCIP_RETCODE SCIPeventCreateRowAddedSepa(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row /**< row that was added to the separation storage*/
);
/** creates an event for the deletion of a linear row from the separation storage */
SCIP_RETCODE SCIPeventCreateRowDeletedSepa(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row /**< row that was deleted from the separation storage */
);
/** creates an event for the addition of a linear row to the LP */
SCIP_RETCODE SCIPeventCreateRowAddedLP(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row /**< row that was added to the LP */
);
/** creates an event for the deletion of a linear row from the LP */
SCIP_RETCODE SCIPeventCreateRowDeletedLP(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row /**< row that was deleted from the LP */
);
/** creates an event for the change of a coefficient in a linear row */
SCIP_RETCODE SCIPeventCreateRowCoefChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row, /**< row in which a coefficient changed */
SCIP_COL* col, /**< column which coefficient changed */
SCIP_Real oldval, /**< old value of coefficient */
SCIP_Real newval /**< new value of coefficient */
);
/** creates an event for the change of a constant in a linear row */
SCIP_RETCODE SCIPeventCreateRowConstChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row, /**< row in which the constant changed */
SCIP_Real oldval, /**< old value of constant */
SCIP_Real newval /**< new value of constant */
);
/** creates an event for the change of a side of a linear row */
SCIP_RETCODE SCIPeventCreateRowSideChanged(
SCIP_EVENT** event, /**< pointer to store the event */
BMS_BLKMEM* blkmem, /**< block memory */
SCIP_ROW* row, /**< row which side has changed */
SCIP_SIDETYPE side, /**< which side has changed */
SCIP_Real oldval, /**< old value of side */
SCIP_Real newval /**< new value of side */
);
/** frees an event */
SCIP_RETCODE SCIPeventFree(
SCIP_EVENT** event, /**< event to free */
BMS_BLKMEM* blkmem /**< block memory buffer */
);
/** sets type of event */
SCIP_RETCODE SCIPeventChgType(
SCIP_EVENT* event, /**< event */
SCIP_EVENTTYPE eventtype /**< new event type */
);
/** sets variable for a variable event */
SCIP_RETCODE SCIPeventChgVar(
SCIP_EVENT* event, /**< event */
SCIP_VAR* var /**< new variable */
);
/** sets node for a node or LP event */
SCIP_RETCODE SCIPeventChgNode(
SCIP_EVENT* event, /**< event */
SCIP_NODE* node /**< new node */
);
/** sets solution for a primal solution event */
SCIP_RETCODE SCIPeventChgSol(
SCIP_EVENT* event, /**< event */
SCIP_SOL* sol /**< new primal solution */
);
/** processes event by calling the appropriate event handlers */
SCIP_RETCODE SCIPeventProcess(
SCIP_EVENT* event, /**< event */
SCIP_SET* set, /**< global SCIP settings */
SCIP_PRIMAL* primal, /**< primal data; only needed for objchanged events, or NULL */
SCIP_LP* lp, /**< current LP data; only needed for obj/boundchanged events, or NULL */
SCIP_BRANCHCAND* branchcand, /**< branching candidate storage; only needed for bound change events, or NULL */
SCIP_EVENTFILTER* eventfilter /**< event filter for global events; not needed for variable specific events */
);
/*
* Event filter methods
*/
/** creates an event filter */
SCIP_RETCODE SCIPeventfilterCreate(
SCIP_EVENTFILTER** eventfilter, /**< pointer to store the event filter */
BMS_BLKMEM* blkmem /**< block memory buffer */
);
/** frees an event filter and the associated event data entries */
SCIP_RETCODE SCIPeventfilterFree(
SCIP_EVENTFILTER** eventfilter, /**< pointer to store the event filter */
BMS_BLKMEM* blkmem, /**< block memory buffer */
SCIP_SET* set /**< global SCIP settings */
);
/** adds element to event filter */
SCIP_RETCODE SCIPeventfilterAdd(
SCIP_EVENTFILTER* eventfilter, /**< event filter */
BMS_BLKMEM* blkmem, /**< block memory buffer */
SCIP_SET* set, /**< global SCIP settings */
SCIP_EVENTTYPE eventtype, /**< event type to catch */
SCIP_EVENTHDLR* eventhdlr, /**< event handler to call for the event processing */
SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
int* filterpos /**< pointer to store position of event filter entry, or NULL */
);
/** deletes element from event filter */
SCIP_RETCODE SCIPeventfilterDel(
SCIP_EVENTFILTER* eventfilter, /**< event filter */
BMS_BLKMEM* blkmem, /**< block memory buffer */
SCIP_SET* set, /**< global SCIP settings */
SCIP_EVENTTYPE eventtype, /**< event type */
SCIP_EVENTHDLR* eventhdlr, /**< event handler to call for the event processing */
SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
int filterpos /**< position of event filter entry, or -1 if unknown */
);
/** processes the event with all event handlers with matching filter setting */
SCIP_RETCODE SCIPeventfilterProcess(
SCIP_EVENTFILTER* eventfilter, /**< event filter */
SCIP_SET* set, /**< global SCIP settings */
SCIP_EVENT* event /**< event to process */
);
/*
* Event queue methods
*/
/** creates an event queue */
SCIP_RETCODE SCIPeventqueueCreate(
SCIP_EVENTQUEUE** eventqueue /**< pointer to store the event queue */
);
/** frees event queue; there must not be any unprocessed events in the queue! */
SCIP_RETCODE SCIPeventqueueFree(
SCIP_EVENTQUEUE** eventqueue /**< pointer to the event queue */
);
/** processes event or adds event to the event queue */
SCIP_RETCODE SCIPeventqueueAdd(
SCIP_EVENTQUEUE* eventqueue, /**< event queue */
BMS_BLKMEM* blkmem, /**< block memory buffer */
SCIP_SET* set, /**< global SCIP settings */
SCIP_PRIMAL* primal, /**< primal data; only needed for objchanged events, or NULL */
SCIP_LP* lp, /**< current LP data; only needed for obj/boundchanged events, or NULL */
SCIP_BRANCHCAND* branchcand, /**< branching candidate storage; only needed for bound change events, or NULL */
SCIP_EVENTFILTER* eventfilter, /**< event filter for global events; not needed for variable specific events */
SCIP_EVENT** event /**< pointer to event to add to the queue; will be NULL after queue addition */
);
/** marks queue to delay incoming events until a call to SCIPeventqueueProcess() */
SCIP_RETCODE SCIPeventqueueDelay(
SCIP_EVENTQUEUE* eventqueue /**< event queue */
);
/** processes all events in the queue */
SCIP_RETCODE SCIPeventqueueProcess(
SCIP_EVENTQUEUE* eventqueue, /**< event queue */
BMS_BLKMEM* blkmem, /**< block memory buffer */
SCIP_SET* set, /**< global SCIP settings */
SCIP_PRIMAL* primal, /**< primal data */
SCIP_LP* lp, /**< current LP data */
SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
SCIP_EVENTFILTER* eventfilter /**< event filter for global (not variable dependent) events */
);
/** returns TRUE iff events of the queue are delayed until the next SCIPeventqueueProcess() call */
SCIP_Bool SCIPeventqueueIsDelayed(
SCIP_EVENTQUEUE* eventqueue /**< event queue */
);
#ifdef NDEBUG
/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
* speed up the algorithms.
*/
#define SCIPeventqueueIsDelayed(eventqueue) ((eventqueue)->delayevents)
#endif
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file event_estim.h
* @ingroup EVENTS
* @brief event handler for tree size estimation and restarts
*
* This event handler plugin provides different methods for approximating the current fraction of the search
* that has already been completed and for estimating the total tree size at completion.
* It can trigger restarts of the current run if the current run seems hopeless.
*
* For details about the available approximations of search completion, please see
*
* Anderson, Hendel, Le Bodic, Pfetsch
* Estimating The Size of Branch-and-Bound Trees
* under preparation
*
* This code is a largely enriched version of a code that was used for clairvoyant restarts, see
*
* Anderson, Hendel, Le Bodic, Viernickel
* Clairvoyant Restarts in Branch-and-Bound Search Using Online Tree-Size Estimation
* AAAI-19: Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, 2018
*
* @author Gregor Hendel
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_EVENT_ESTIM_H__
#define __SCIP_EVENT_ESTIM_H__
#include "scip/type_scip.h"
#include "scip/def.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates event handler for tree size estimation */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeEventHdlrEstim(
SCIP* scip /**< SCIP data structure */
);
/* return an estimation of the final tree size */
SCIP_EXPORT
SCIP_Real SCIPgetTreesizeEstimation(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file event_globalbnd.h
* @ingroup EVENTS
* @brief eventhdlr for storing all global bound changes
* @author Leona Gottwald
*
* the bound changes are stored so that they can be shared with other threads
* in a concurrent solve.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_EVENT_GLOBALBND_H__
#define __SCIP_EVENT_GLOBALBND_H__
#include "scip/def.h"
#include "scip/type_event.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_syncstore.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates event handler for global bound event */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeEventHdlrGlobalbnd(
SCIP* scip /**< SCIP data structure */
);
/** gets the global bound changes stored in the eventhandler */
SCIP_EXPORT
SCIP_BOUNDSTORE* SCIPeventGlobalbndGetBoundChanges(
SCIP_EVENTHDLR* eventhdlr /**< the globalbound eventhandler */
);
/** enables storing of bound changes */
SCIP_EXPORT
void SCIPeventGlobalbndEnableBoundStorage(
SCIP_EVENTHDLR* eventhdlr /**< the globalbound eventhandler */
);
/** disables storing of bound changes */
SCIP_EXPORT
void SCIPeventGlobalbndDisableBoundStorage(
SCIP_EVENTHDLR* eventhdlr /**< the globalbound eventhandler */
);
/** clears all bound changes stored in the eventhandler */
SCIP_EXPORT
void SCIPeventGlobalbndClearBoundChanges(
SCIP_EVENTHDLR* eventhdlr /**< the globalbound eventhandler */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file event_softtimelimit.h
* @brief eventhdlr for soft time limit
* @author Gerald Gamrath
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
/** includes event handler for soft time limit */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeEventHdlrSofttimelimit(
SCIP* scip /**< SCIP data structure */
);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file event_solvingphase.h
* @ingroup EVENTS
* @brief eventhdlr for solving phase dependent parameter adjustment
* @author Gregor Hendel
*
* this event handler is used to apply dynamic parameter adjustment depending on the
* progress of the solving process.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_EVENT_SOLVINGPHASE_H__
#define __SCIP_EVENT_SOLVINGPHASE_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates event handler for solving phase event */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeEventHdlrSolvingphase(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file event_xyz.h
* @ingroup EVENTS
* @brief eventhdlr for xyz event
* @author Stefan Heinz
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_EVENT_XYZ_H__
#define __SCIP_EVENT_XYZ_H__
#include "scip/scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates event handler for xyz event */
SCIP_EXPORT
SCIP_RETCODE SCIPincludeEventHdlrXyz(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif