Skip to content
GitLab
Explore
Sign in
Show whitespace changes
Inline
Side-by-side
Some changes are not shown.
For a faster browsing experience, only
20 of 534+
files are shown.
libs/or-tools-src-ubuntu/include/scip/pub_bandit_epsgreedy.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_bandit_epsgreedy.h
* @ingroup PublicBanditMethods
* @brief public methods for the epsilon greedy bandit selector
* @author Gregor Hendel
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef SRC_SCIP_PUB_BANDIT_EPSGREEDY_H_
#define SRC_SCIP_PUB_BANDIT_EPSGREEDY_H_
#include
"scip/def.h"
#include
"scip/type_scip.h"
#include
"scip/type_bandit.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBanditMethods
*
* ## Epsilon greedy
*
* Epsilon greedy is a randomized algorithm for the multi-armed bandit problem.
*
* In every iteration, it either
* selects an action uniformly at random with
* probability \f$ \varepsilon_t\f$
* or it greedily exploits the best action seen so far with
* probability \f$ 1 - \varepsilon_t \f$.
* In this implementation, \f$ \varepsilon_t \f$ decreases over time
* (number of selections performed), controlled by the epsilon parameter.
*
* @{
*/
/** create and resets an epsilon greedy bandit algorithm */
SCIP_EXPORT
SCIP_RETCODE
SCIPcreateBanditEpsgreedy
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_BANDIT
**
epsgreedy
,
/**< pointer to store the epsilon greedy bandit algorithm */
SCIP_Real
*
priorities
,
/**< nonnegative priorities for each action, or NULL if not needed */
SCIP_Real
eps
,
/**< parameter to increase probability for exploration between all actions */
SCIP_Bool
preferrecent
,
/**< should the weights be updated in an exponentially decaying way? */
SCIP_Real
decayfactor
,
/**< the factor to reduce the weight of older observations if exponential decay is enabled */
int
avglim
,
/**< nonnegative limit on observation number before the exponential decay starts,
* only relevant if exponential decay is enabled
*/
int
nactions
,
/**< the number of possible actions */
unsigned
int
initseed
/**< initial seed for random number generation */
);
/** get weights array of epsilon greedy bandit algorithm */
SCIP_EXPORT
SCIP_Real
*
SCIPgetWeightsEpsgreedy
(
SCIP_BANDIT
*
epsgreedy
/**< epsilon greedy bandit algorithm */
);
/** set epsilon parameter of epsilon greedy bandit algorithm */
SCIP_EXPORT
void
SCIPsetEpsilonEpsgreedy
(
SCIP_BANDIT
*
epsgreedy
,
/**< epsilon greedy bandit algorithm */
SCIP_Real
eps
/**< parameter to increase probability for exploration between all actions */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_bandit_exp3.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_bandit_exp3.h
* @ingroup PublicBanditMethods
* @brief public methods for Exp.3
* @author Gregor Hendel
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef SRC_SCIP_PUB_BANDIT_EXP3_H_
#define SRC_SCIP_PUB_BANDIT_EXP3_H_
#include
"scip/def.h"
#include
"scip/type_bandit.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBanditMethods
*
* ## Exp.3
*
* Exp.3 is a randomized selection method for the multi-armed bandit problem
*
* Exp3 maintains a probability distribution
* according to which an action is drawn
* in every iteration.
* The probability distribution is a mixture between
* a uniform distribution and a softmax distribution
* based on the cumulative rewards of the actions.
* The weight of the uniform distribution in the mixture
* is controlled by the parameter \f$ \gamma \f$, ie.,
* setting \f$ \gamma = 1\f$ uses a uniform distribution
* in every selection step.
* The cumulative reward for the actions can be
* fine-tuned by adding a general bias for all actions.
* The bias is given by the parameter \f$ \beta \f$.
*
* @{
*/
/** creates and resets an Exp.3 bandit algorithm using \p scip pointer */
SCIP_EXPORT
SCIP_RETCODE
SCIPcreateBanditExp3
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_BANDIT
**
exp3
,
/**< pointer to store bandit algorithm */
SCIP_Real
*
priorities
,
/**< nonnegative priorities for each action, or NULL if not needed */
SCIP_Real
gammaparam
,
/**< weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution */
SCIP_Real
beta
,
/**< gain offset between 0 and 1 at every observation */
int
nactions
,
/**< the positive number of actions for this bandit algorithm */
unsigned
int
initseed
/**< initial seed for random number generation */
);
/** set gamma parameter of Exp.3 bandit algorithm to increase weight of uniform distribution */
SCIP_EXPORT
void
SCIPsetGammaExp3
(
SCIP_BANDIT
*
exp3
,
/**< bandit algorithm */
SCIP_Real
gammaparam
/**< weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution */
);
/** set beta parameter of Exp.3 bandit algorithm to increase gain offset for actions that were not played */
SCIP_EXPORT
void
SCIPsetBetaExp3
(
SCIP_BANDIT
*
exp3
,
/**< bandit algorithm */
SCIP_Real
beta
/**< gain offset between 0 and 1 at every observation */
);
/** returns probability to play an action */
SCIP_EXPORT
SCIP_Real
SCIPgetProbabilityExp3
(
SCIP_BANDIT
*
exp3
,
/**< bandit algorithm */
int
action
/**< index of the requested action */
);
/** @}*/
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_bandit_ucb.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_bandit_ucb.h
* @ingroup PublicBanditMethods
* @brief public methods for UCB bandit selection
* @author Gregor Hendel
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef SRC_SCIP_PUB_BANDIT_UCB_H_
#define SRC_SCIP_PUB_BANDIT_UCB_H_
#include
"scip/def.h"
#include
"scip/type_bandit.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBanditMethods
*
* ## Upper Confidence Bounds (UCB)
*
* UCB (Upper confidence bounds) is a deterministic
* selection algorithm for the multi-armed bandit problem.
* In every iteration, UCB selects the action that maximizes
* a tradeoff between its performance in the past
* and a variance term.
* The influence of the variance (confidence width) can be
* controlled by the parameter \f$ \alpha \f$.
*
* @{
*/
/** create and reset UCB bandit algorithm */
SCIP_EXPORT
SCIP_RETCODE
SCIPcreateBanditUcb
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_BANDIT
**
ucb
,
/**< pointer to store bandit algorithm */
SCIP_Real
*
priorities
,
/**< nonnegative priorities for each action, or NULL if not needed */
SCIP_Real
alpha
,
/**< parameter to increase confidence width */
int
nactions
,
/**< the positive number of actions for this bandit algorithm */
unsigned
int
initseed
/**< initial random number seed */
);
/** returns the upper confidence bound of a selected action */
SCIP_EXPORT
SCIP_Real
SCIPgetConfidenceBoundUcb
(
SCIP_BANDIT
*
ucb
,
/**< UCB bandit algorithm */
int
action
/**< index of the queried action */
);
/** return start permutation of the UCB bandit algorithm */
SCIP_EXPORT
int
*
SCIPgetStartPermutationUcb
(
SCIP_BANDIT
*
ucb
/**< UCB bandit algorithm */
);
/** @}*/
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_benders.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_benders.h
* @ingroup PUBLICCOREAPI
* @brief public methods for Benders' decomposition
* @author Stephen J. Maher
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_BENDERS_H__
#define __SCIP_PUB_BENDERS_H__
#include
"scip/def.h"
#include
"scip/type_benders.h"
#include
"scip/type_benderscut.h"
#include
"scip/type_misc.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_var.h"
#include
"scip/type_stat.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBendersMethods
*
* @{
*/
/** compares two benderss w. r. to their priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPbendersComp
);
/** comparison method for sorting benderss w.r.t. to their name */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPbendersCompName
);
/** gets user data of Benders' decomposition */
SCIP_EXPORT
SCIP_BENDERSDATA
*
SCIPbendersGetData
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** sets user data of Benders' decomposition; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPbendersSetData
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
SCIP_BENDERSDATA
*
bendersdata
/**< new Benders' decomposition user data */
);
/** gets name of Benders' decomposition */
SCIP_EXPORT
const
char
*
SCIPbendersGetName
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets description of Benders' decomposition */
SCIP_EXPORT
const
char
*
SCIPbendersGetDesc
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets priority of Benders' decomposition */
SCIP_EXPORT
int
SCIPbendersGetPriority
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets the number of subproblems for the Benders' decomposition */
SCIP_EXPORT
int
SCIPbendersGetNSubproblems
(
SCIP_BENDERS
*
benders
/**< the Benders' decomposition data structure */
);
/** returns the SCIP instance for a given subproblem */
SCIP_EXPORT
SCIP
*
SCIPbendersSubproblem
(
SCIP_BENDERS
*
benders
,
/**< the Benders' decomposition data structure */
int
probnumber
/**< the subproblem number */
);
/** gets the number of times, the Bender' decomposition was called and tried to find a violated second stage constraint */
SCIP_EXPORT
int
SCIPbendersGetNCalls
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets the number of optimality cuts found by the collection of Benders' decomposition subproblems */
SCIP_EXPORT
int
SCIPbendersGetNCutsFound
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets the number of cuts found from the strengthening round */
SCIP_EXPORT
int
SCIPbendersGetNStrengthenCutsFound
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets the number of calls to the strengthening round */
SCIP_EXPORT
int
SCIPbendersGetNStrengthenCalls
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets the number of calls to the strengthening round that fail */
SCIP_EXPORT
int
SCIPbendersGetNStrengthenFails
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets time in seconds used in this Benders' decomposition for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPbendersGetSetupTime
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** gets execution time in seconds used in this Benders' decomposition */
SCIP_EXPORT
SCIP_Real
SCIPbendersGetTime
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** Is Benders' decomposition initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPbendersIsInitialized
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** returns whether the given Benders' decomposition is in use in the current problem */
SCIP_EXPORT
SCIP_Bool
SCIPbendersIsActive
(
SCIP_BENDERS
*
benders
/**< the Benders' decomposition structure */
);
/** Returns whether only the convex relaxations will be checked in this solve loop
* when Benders' is used in the LNS heuristics, only the convex relaxations of the master/subproblems are checked,
* i.e. no integer cuts are generated. In this case, then Benders' decomposition is performed under the assumption
* that all subproblems are convex relaxations.
*/
SCIP_EXPORT
SCIP_Bool
SCIPbendersOnlyCheckConvexRelax
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
SCIP_Bool
subscipsoff
/**< flag indicating whether plugins using sub-SCIPs are deactivated */
);
/** Are Benders' cuts generated from the LP solutions? */
SCIP_EXPORT
SCIP_Bool
SCIPbendersCutLP
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** Are Benders' cuts generated from the pseudo solutions? */
SCIP_EXPORT
SCIP_Bool
SCIPbendersCutPseudo
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** Are Benders' cuts generated from the relaxation solutions? */
SCIP_EXPORT
SCIP_Bool
SCIPbendersCutRelaxation
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** Should this Benders' use the auxiliary variables from the highest priority Benders'? */
SCIP_EXPORT
SCIP_Bool
SCIPbendersShareAuxVars
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** sets the subproblem setup flag */
SCIP_EXPORT
void
SCIPbendersSetSubproblemIsSetup
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_Bool
issetup
/**< flag to indicate whether the subproblem has been setup */
);
/** returns the subproblem setup flag */
SCIP_EXPORT
SCIP_Bool
SCIPbendersSubproblemIsSetup
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** returns the auxiliary variable for the given subproblem */
SCIP_EXPORT
SCIP_VAR
*
SCIPbendersGetAuxiliaryVar
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** returns all auxiliary variables */
SCIP_EXPORT
SCIP_VAR
**
SCIPbendersGetAuxiliaryVars
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** stores the objective function value of the subproblem for use in cut generation */
SCIP_EXPORT
void
SCIPbendersSetSubproblemObjval
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_Real
objval
/**< the objective function value for the subproblem */
);
/** returns the objective function value of the subproblem for use in cut generation */
SCIP_EXPORT
SCIP_Real
SCIPbendersGetSubproblemObjval
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** returns the number of cuts that have been added for storage */
SCIP_EXPORT
int
SCIPbendersGetNStoredCuts
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition cut */
);
/** returns the data for the cuts that have been added by the Benders' cut plugin */
SCIP_EXPORT
SCIP_RETCODE
SCIPbendersGetStoredCutData
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition cut */
int
cutidx
,
/**< the index for the cut data that is requested */
SCIP_VAR
***
vars
,
/**< the variables that have non-zero coefficients in the cut */
SCIP_Real
**
vals
,
/**< the coefficients of the variables in the cut */
SCIP_Real
*
lhs
,
/**< the left hand side of the cut */
SCIP_Real
*
rhs
,
/**< the right hand side of the cut */
int
*
nvars
/**< the number of variables with non-zero coefficients in the cut */
);
/** returns the original problem data for the cuts that have been added by the Benders' cut plugin. The stored
* variables and values will populate the input vars and vals arrays. Thus, memory must be allocated for the vars and
* vals arrays
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPbendersGetStoredCutOrigData
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition cut */
int
cutidx
,
/**< the index for the cut data that is requested */
SCIP_VAR
***
vars
,
/**< the variables that have non-zero coefficients in the cut */
SCIP_Real
**
vals
,
/**< the coefficients of the variables in the cut */
SCIP_Real
*
lhs
,
/**< the left hand side of the cut */
SCIP_Real
*
rhs
,
/**< the right hand side of the cut */
int
*
nvars
,
/**< the number of variables with non-zero coefficients in the cut */
int
varssize
/**< the available slots in the array */
);
/*
* Public functions associated with Benders' cuts
*/
/** returns the Benders' cut of the given name, or NULL if not existing */
SCIP_EXPORT
SCIP_BENDERSCUT
*
SCIPfindBenderscut
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
const
char
*
name
/**< name of Benderscut' decomposition */
);
/** returns the array of currently available Benders' cuts; active Benders' decomposition are in the first slots of
* the array
*/
SCIP_EXPORT
SCIP_BENDERSCUT
**
SCIPbendersGetBenderscuts
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** returns the number of currently available Benders' cuts */
SCIP_EXPORT
int
SCIPbendersGetNBenderscuts
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** sets the priority of a Benders' decomposition */
SCIP_EXPORT
SCIP_RETCODE
SCIPbendersSetBenderscutPriority
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
SCIP_BENDERSCUT
*
benderscut
,
/**< Benders' cut */
int
priority
/**< new priority of the Benders' decomposition */
);
/** returns whether the solution has non-zero slack variables */
SCIP_EXPORT
SCIP_RETCODE
SCIPbendersSolSlackVarsActive
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
SCIP_Bool
*
activeslack
/**< flag to indicate whether a slack variable is active */
);
/** sets the subproblem type
*
* The subproblem types are:
* - Convex constraints with continuous variables
* - Convex constraints with discrete variables
* - Non-convex constraints with continuous variables
* - Non-convex constraints with discrete variables
*/
SCIP_EXPORT
void
SCIPbendersSetSubproblemType
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_BENDERSSUBTYPE
subprobtype
/**< the subproblem type */
);
/** returns the type of the subproblem
*
* This type is used to determine whether the duals of the problem can be used to generate cuts
*/
SCIP_EXPORT
SCIP_BENDERSSUBTYPE
SCIPbendersGetSubproblemType
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** sets the flag indicating whether a subproblem is convex
*
* It is possible that this can change during the solving process. One example is when the three-phase method is
* employed, where the first phase solves the convex relaxation of both the master and subproblems, the second phase
* reintroduces the integrality constraints to the master problem and the third phase then reintroduces integrality
* constraints to the subproblems.
*/
SCIP_EXPORT
void
SCIPbendersSetSubproblemIsConvex
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_Bool
isconvex
/**< flag to indicate whether the subproblem is convex */
);
/** returns whether the subproblem is convex
*
* This means that the dual solution can be used to generate cuts.
*/
SCIP_EXPORT
SCIP_Bool
SCIPbendersSubproblemIsConvex
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** returns the number of subproblems that are convex */
SCIP_EXPORT
int
SCIPbendersGetNConvexSubproblems
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** sets the flag indicating whether a subproblem contains non-linear constraints */
SCIP_EXPORT
void
SCIPbendersSetSubproblemIsNonlinear
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_Bool
isnonlinear
/**< flag to indicate whether the subproblem contains non-linear constraints */
);
/** returns whether the subproblem contains non-linear constraints. */
SCIP_EXPORT
SCIP_Bool
SCIPbendersSubproblemIsNonlinear
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** returns the number of subproblems that contain non-linear constraints */
SCIP_EXPORT
int
SCIPbendersGetNNonlinearSubproblems
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** sets the flag indicating whether the master problem contains non-linear constraints */
SCIP_EXPORT
void
SCIPbendersSetMasterIsNonlinear
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
SCIP_Bool
isnonlinear
/**< flag to indicate whether the subproblem contains non-linear constraints */
);
/** returns whether the master problem contains non-linear constraints. */
SCIP_EXPORT
SCIP_Bool
SCIPbendersMasterIsNonlinear
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** returns the flag indicating that Benders' decomposition is in a cut strengthening round */
SCIP_EXPORT
SCIP_Bool
SCIPbendersInStrengthenRound
(
SCIP_BENDERS
*
benders
/**< Benders' decomposition */
);
/** solves the LP of the Benders' decomposition subproblem
*
* This requires that the subproblem is in probing mode.
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPbendersSolveSubproblemLP
(
SCIP
*
scip
,
/**< the SCIP data structure */
SCIP_BENDERS
*
benders
,
/**< the Benders' decomposition data structure */
int
probnumber
,
/**< the subproblem number */
SCIP_STATUS
*
solvestatus
,
/**< status of subproblem solve */
SCIP_Real
*
objective
/**< optimal value of subproblem, if solved to optimality */
);
/** solves the Benders' decomposition subproblem */
SCIP_EXPORT
SCIP_RETCODE
SCIPbendersSolveSubproblemCIP
(
SCIP
*
scip
,
/**< the SCIP data structure */
SCIP_BENDERS
*
benders
,
/**< the Benders' decomposition data structure */
int
probnumber
,
/**< the subproblem number */
SCIP_STATUS
*
solvestatus
,
/**< status of subproblem solve */
SCIP_Bool
solvecip
/**< directly solve the CIP subproblem */
);
/** returns the number of cuts that have been transferred from sub SCIPs to the master SCIP */
SCIP_EXPORT
int
SCIPbendersGetNTransferredCuts
(
SCIP_BENDERS
*
benders
/**< the Benders' decomposition data structure */
);
/** updates the lower bound for the subproblem. If the lower bound is not greater than the previously stored lowerbound,
* then no update occurs.
*/
SCIP_EXPORT
void
SCIPbendersUpdateSubproblemLowerbound
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_Real
lowerbound
/**< the lower bound */
);
/** returns the stored lower bound for the given subproblem */
SCIP_EXPORT
SCIP_Real
SCIPbendersGetSubproblemLowerbound
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** sets the independent subproblem flag */
SCIP_EXPORT
void
SCIPbendersSetSubproblemIsIndependent
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
,
/**< the subproblem number */
SCIP_Bool
isindep
/**< flag to indicate whether the subproblem is independent */
);
/** returns whether the subproblem is independent */
SCIP_EXPORT
SCIP_Bool
SCIPbendersSubproblemIsIndependent
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** returns whether the subproblem is enabled, i.e. the subproblem is still solved in the solving loop. */
SCIP_EXPORT
SCIP_Bool
SCIPbendersSubproblemIsEnabled
(
SCIP_BENDERS
*
benders
,
/**< Benders' decomposition */
int
probnumber
/**< the subproblem number */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_benderscut.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_benderscut.h
* @ingroup PUBLICCOREAPI
* @brief public methods for Benders' decomposition cuts
* @author Stephen J. Maher
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_BENDERSCUT_H__
#define __SCIP_PUB_BENDERSCUT_H__
#include
"scip/def.h"
#include
"scip/type_benderscut.h"
#include
"scip/type_cons.h"
#include
"scip/type_lp.h"
#include
"scip/type_misc.h"
#include
"scip/type_retcode.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBenderscutsMethods
*
* @{
*/
/** compares two Benders' decomposition cuts w. r. to their priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPbenderscutComp
);
/** comparison method for sorting Benders' decomposition cuts w.r.t. to their name */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPbenderscutCompName
);
/** gets user data of the Benders' decomposition cut */
SCIP_EXPORT
SCIP_BENDERSCUTDATA
*
SCIPbenderscutGetData
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** sets user data of the Benders' decomposition cut; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPbenderscutSetData
(
SCIP_BENDERSCUT
*
benderscut
,
/**< Benders' decomposition cut */
SCIP_BENDERSCUTDATA
*
benderscutdata
/**< new Benders' decomposition cut user data */
);
/** gets name of the Benders' decomposition cut */
SCIP_EXPORT
const
char
*
SCIPbenderscutGetName
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** gets description of the Benders' decomposition cut */
SCIP_EXPORT
const
char
*
SCIPbenderscutGetDesc
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** gets priority of the Benders' decomposition cut */
SCIP_EXPORT
int
SCIPbenderscutGetPriority
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** gets the number of times, the Benders' decomposition cut was called and tried to find a violated cut */
SCIP_EXPORT
SCIP_Longint
SCIPbenderscutGetNCalls
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** gets the number of the cuts found by this Benders' decomposition cut */
SCIP_EXPORT
SCIP_Longint
SCIPbenderscutGetNFound
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** is the Benders' decomposition cut initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPbenderscutIsInitialized
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** gets time in seconds used in this Benders' decomposition cut for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPbenderscutGetSetupTime
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** gets time in seconds used in this Benders' decomposition cut */
SCIP_EXPORT
SCIP_Real
SCIPbenderscutGetTime
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** returns whether the Benders' cut uses the LP information */
SCIP_EXPORT
SCIP_Bool
SCIPbenderscutIsLPCut
(
SCIP_BENDERSCUT
*
benderscut
/**< Benders' decomposition cut */
);
/** sets the enabled flag of the Benders' decomposition cut method */
SCIP_EXPORT
void
SCIPbenderscutSetEnabled
(
SCIP_BENDERSCUT
*
benderscut
,
/**< Benders' decomposition cut */
SCIP_Bool
enabled
/**< flag to indicate whether the Benders' decomposition cut is enabled */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_branch.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_branch.h
* @ingroup PUBLICCOREAPI
* @brief public methods for branching rules
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_BRANCH_H__
#define __SCIP_PUB_BRANCH_H__
#include
"scip/def.h"
#include
"scip/type_misc.h"
#include
"scip/type_branch.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBranchRuleMethods
*
* @{
*/
/** compares two branching rules w. r. to their priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPbranchruleComp
);
/** comparison method for sorting branching rules w.r.t. to their name */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPbranchruleCompName
);
/** gets user data of branching rule */
SCIP_EXPORT
SCIP_BRANCHRULEDATA
*
SCIPbranchruleGetData
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** sets user data of branching rule; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPbranchruleSetData
(
SCIP_BRANCHRULE
*
branchrule
,
/**< branching rule */
SCIP_BRANCHRULEDATA
*
branchruledata
/**< new branching rule user data */
);
/** gets name of branching rule */
SCIP_EXPORT
const
char
*
SCIPbranchruleGetName
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets description of branching rule */
SCIP_EXPORT
const
char
*
SCIPbranchruleGetDesc
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets priority of branching rule */
SCIP_EXPORT
int
SCIPbranchruleGetPriority
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets maximal depth level, up to which this branching rule should be used (-1 for no limit) */
SCIP_EXPORT
int
SCIPbranchruleGetMaxdepth
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets maximal relative distance from current node's dual bound to primal bound for applying branching rule */
SCIP_EXPORT
SCIP_Real
SCIPbranchruleGetMaxbounddist
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets time in seconds used in this branching rule for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPbranchruleGetSetupTime
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets time in seconds used in this branching rule */
SCIP_EXPORT
SCIP_Real
SCIPbranchruleGetTime
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of times, the branching rule was called on an LP solution */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNLPCalls
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of times, the branching rule was called on external candidates */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNExternCalls
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of times, the branching rule was called on a pseudo solution */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNPseudoCalls
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of times, the branching rule detected a cutoff */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNCutoffs
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of cuts, the branching rule separated */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNCutsFound
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of constraints, the branching rule added to the respective local nodes (not counting constraints
* that were added to the child nodes as branching decisions)
*/
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNConssFound
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of domain reductions, the branching rule found */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNDomredsFound
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** gets the total number of children, the branching rule created */
SCIP_EXPORT
SCIP_Longint
SCIPbranchruleGetNChildren
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** is branching rule initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPbranchruleIsInitialized
(
SCIP_BRANCHRULE
*
branchrule
/**< branching rule */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_compr.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_compr.h
* @ingroup PUBLICCOREAPI
* @brief public methods for tree compressions
* @author Jakob Witzig
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_COMPR_H__
#define __SCIP_PUB_COMPR_H__
#include
"scip/def.h"
#include
"scip/type_misc.h"
#include
"scip/type_compr.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicCompressionMethods
*
* @{
*/
/** compares two compressions w. r. to their priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPcomprComp
);
/** comparison method for sorting compressions w.r.t. to their name */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPcomprCompName
);
/** gets user data of tree compression */
SCIP_EXPORT
SCIP_COMPRDATA
*
SCIPcomprGetData
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** sets user data of tree compression; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPcomprSetData
(
SCIP_COMPR
*
compr
,
/**< tree compression */
SCIP_COMPRDATA
*
comprdata
/**< new tree compression user data */
);
/** gets name of tree compression */
SCIP_EXPORT
const
char
*
SCIPcomprGetName
(
SCIP_COMPR
*
heur
/**< tree compression */
);
/** gets description of tree compression */
SCIP_EXPORT
const
char
*
SCIPcomprGetDesc
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** gets priority of tree compression */
SCIP_EXPORT
int
SCIPcomprGetPriority
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** gets minimal number of nodes for calling tree compression (returns -1, if no node threshold exists) */
SCIP_EXPORT
int
SCIPcomprGetMinNodes
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** gets the number of times, the compression was called and tried to find a compression */
SCIP_EXPORT
SCIP_Longint
SCIPcomprGetNCalls
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** gets the number of tree compressions found by this compression */
SCIP_EXPORT
SCIP_Longint
SCIPcomprGetNFound
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** is tree compression initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPcomprIsInitialized
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** gets time in seconds used in this compression for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPcomprGetSetupTime
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** gets time in seconds used in this compression */
SCIP_EXPORT
SCIP_Real
SCIPcomprGetTime
(
SCIP_COMPR
*
compr
/**< tree compression */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_conflict.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_conflict.h
* @ingroup PUBLICCOREAPI
* @brief public methods for conflict analysis handlers
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_CONFLICT_H__
#define __SCIP_PUB_CONFLICT_H__
#include
"scip/def.h"
#include
"scip/type_misc.h"
#include
"scip/type_conflict.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicConflictMethods
*
* @{
*/
/** compares two conflict handlers w. r. to their priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPconflicthdlrComp
);
/** comparison method for sorting conflict handler w.r.t. to their name */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPconflicthdlrCompName
);
/** gets user data of conflict handler */
SCIP_EXPORT
SCIP_CONFLICTHDLRDATA
*
SCIPconflicthdlrGetData
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** sets user data of conflict handler; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPconflicthdlrSetData
(
SCIP_CONFLICTHDLR
*
conflicthdlr
,
/**< conflict handler */
SCIP_CONFLICTHDLRDATA
*
conflicthdlrdata
/**< new conflict handler user data */
);
/** gets name of conflict handler */
SCIP_EXPORT
const
char
*
SCIPconflicthdlrGetName
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** gets description of conflict handler */
SCIP_EXPORT
const
char
*
SCIPconflicthdlrGetDesc
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** gets priority of conflict handler */
SCIP_EXPORT
int
SCIPconflicthdlrGetPriority
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** is conflict handler initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPconflicthdlrIsInitialized
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** gets time in seconds used in this conflict handler for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPconflicthdlrGetSetupTime
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** gets time in seconds used in this conflict handler */
SCIP_EXPORT
SCIP_Real
SCIPconflicthdlrGetTime
(
SCIP_CONFLICTHDLR
*
conflicthdlr
/**< conflict handler */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_cons.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_cons.h
* @ingroup PUBLICCOREAPI
* @brief public methods for managing constraints
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_CONS_H__
#define __SCIP_PUB_CONS_H__
#include
"scip/def.h"
#include
"scip/type_misc.h"
#include
"scip/type_cons.h"
#ifdef NDEBUG
#include
"scip/struct_cons.h"
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/*
* Constraint handler methods
*/
/**@addtogroup PublicConshdlrMethods
*
* @{
*/
/** compares two constraint handlers w. r. to their separation priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPconshdlrCompSepa
);
/** compares two constraint handlers w. r. to their enforcing priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPconshdlrCompEnfo
);
/** compares two constraint handlers w. r. to their feasibility check priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPconshdlrCompCheck
);
/** gets name of constraint handler */
SCIP_EXPORT
const
char
*
SCIPconshdlrGetName
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets description of constraint handler */
SCIP_EXPORT
const
char
*
SCIPconshdlrGetDesc
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets user data of constraint handler */
SCIP_EXPORT
SCIP_CONSHDLRDATA
*
SCIPconshdlrGetData
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** sets user data of constraint handler; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPconshdlrSetData
(
SCIP_CONSHDLR
*
conshdlr
,
/**< constraint handler */
SCIP_CONSHDLRDATA
*
conshdlrdata
/**< new constraint handler user data */
);
/** sets all separation related callbacks of the constraint handler */
SCIP_EXPORT
void
SCIPconshdlrSetSepa
(
SCIP_CONSHDLR
*
conshdlr
,
/**< constraint handler */
SCIP_DECL_CONSSEPALP
((
*
conssepalp
)),
/**< separate cutting planes for LP solution */
SCIP_DECL_CONSSEPASOL
((
*
conssepasol
)),
/**< separate cutting planes for arbitrary primal solution */
int
sepafreq
,
/**< frequency for separating cuts; zero means to separate only in the root node */
int
sepapriority
,
/**< priority of the constraint handler for separation */
SCIP_Bool
delaysepa
/**< should separation method be delayed, if other separators found cuts? */
);
/** sets both the propagation callback and the propagation frequency of the constraint handler */
SCIP_EXPORT
void
SCIPconshdlrSetProp
(
SCIP_CONSHDLR
*
conshdlr
,
/**< constraint handler */
SCIP_DECL_CONSPROP
((
*
consprop
)),
/**< propagate variable domains */
int
propfreq
,
/**< frequency for propagating domains; zero means only preprocessing propagation */
SCIP_Bool
delayprop
,
/**< should propagation method be delayed, if other propagators found reductions? */
SCIP_PROPTIMING
timingmask
/**< positions in the node solving loop where propagators should be executed */
);
/** sets the relaxation enforcement method of the constraint handler */
SCIP_EXPORT
void
SCIPconshdlrSetEnforelax
(
SCIP_CONSHDLR
*
conshdlr
,
/**< constraint handler */
SCIP_DECL_CONSENFORELAX
((
*
consenforelax
))
/**< constraint copying method */
);
/** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active
* constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated
*
* @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
* flag is TRUE) and the current node belongs to the corresponding sub tree.
*/
SCIP_EXPORT
SCIP_CONS
**
SCIPconshdlrGetConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets array with enforced constraints of constraint handler; this is local information */
SCIP_EXPORT
SCIP_CONS
**
SCIPconshdlrGetEnfoConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets array with checked constraints of constraint handler; this is local information */
SCIP_EXPORT
SCIP_CONS
**
SCIPconshdlrGetCheckConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets array with delayed update constraints
*
* @attention Usually, there should be no need to access this array. Use this only if you are absolutely sure what you are doing.
*/
SCIP_EXPORT
SCIP_CONS
**
SCIPconshdlrGetUpdateConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets total number of existing transformed constraints of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of enforced constraints of constraint handler; this is local information */
SCIP_EXPORT
int
SCIPconshdlrGetNEnfoConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of checked constraints of constraint handler; this is local information */
SCIP_EXPORT
int
SCIPconshdlrGetNCheckConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of active constraints of constraint handler
*
* @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
* flag is TRUE) and the current node belongs to the corresponding sub tree.
*/
SCIP_EXPORT
int
SCIPconshdlrGetNActiveConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of enabled constraints of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNEnabledConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of constraints that have delayed updates */
SCIP_EXPORT
int
SCIPconshdlrGetNUpdateConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for setting up this constraint handler for new stages */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetSetupTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for presolving in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetPresolTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for separation in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetSepaTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for LP enforcement in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetEnfoLPTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for pseudo enforcement in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetEnfoPSTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for relaxation enforcement in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetEnfoRelaxTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for propagation in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetPropTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for propagation in this constraint handler during strong branching */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetStrongBranchPropTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for feasibility checking in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetCheckTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets time in seconds used for resolving propagation in this constraint handler */
SCIP_EXPORT
SCIP_Real
SCIPconshdlrGetRespropTime
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's separation method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNSepaCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's LP enforcing method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNEnfoLPCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's pseudo enforcing method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNEnfoPSCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's relaxation enforcing method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNEnfoRelaxCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's propagation method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNPropCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's checking method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNCheckCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of calls to the constraint handler's resolve propagation method */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNRespropCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets total number of times, this constraint handler detected a cutoff */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNCutoffs
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets total number of cuts found by this constraint handler */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNCutsFound
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets total number of cuts found by this constraint handler applied to lp */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNCutsApplied
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets total number of additional constraints added by this constraint handler */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNConssFound
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets total number of domain reductions found by this constraint handler */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNDomredsFound
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of children created by this constraint handler */
SCIP_EXPORT
SCIP_Longint
SCIPconshdlrGetNChildren
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets maximum number of active constraints of constraint handler existing at the same time */
SCIP_EXPORT
int
SCIPconshdlrGetMaxNActiveConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets initial number of active constraints of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetStartNActiveConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of variables fixed in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNFixedVars
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of variables aggregated in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNAggrVars
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of variable types changed in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNChgVarTypes
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of bounds changed in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNChgBds
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of holes added to domains of variables in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNAddHoles
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of constraints deleted in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNDelConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of constraints added in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNAddConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of constraints upgraded in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNUpgdConss
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of coefficients changed in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNChgCoefs
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of constraint sides changed in presolving method of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetNChgSides
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
SCIP_EXPORT
int
SCIPconshdlrGetNPresolCalls
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets separation priority of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetSepaPriority
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets enforcing priority of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetEnfoPriority
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets checking priority of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetCheckPriority
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets separation frequency of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetSepaFreq
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets propagation frequency of constraint handler */
SCIP_EXPORT
int
SCIPconshdlrGetPropFreq
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
SCIP_EXPORT
int
SCIPconshdlrGetEagerFreq
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** needs constraint handler a constraint to be called? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrNeedsCons
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** does the constraint handler perform presolving? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrDoesPresolve
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** should separation method be delayed, if other separators found cuts? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrIsSeparationDelayed
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** should propagation method be delayed, if other propagators found reductions? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrIsPropagationDelayed
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** was LP separation method delayed at the last call? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrWasLPSeparationDelayed
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** was primal solution separation method delayed at the last call? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrWasSolSeparationDelayed
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** was propagation method delayed at the last call? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrWasPropagationDelayed
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** is constraint handler initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrIsInitialized
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** does the constraint handler have a copy function? */
SCIP_EXPORT
SCIP_Bool
SCIPconshdlrIsClonable
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** returns the timing mask of the propagation method of the constraint handler */
SCIP_EXPORT
SCIP_PROPTIMING
SCIPconshdlrGetPropTiming
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/*
* Methods for constraint change sets
*/
/** gets added constraints data for a constraint set change */
SCIP_EXPORT
void
SCIPconssetchgGetAddedConsData
(
SCIP_CONSSETCHG
*
conssetchg
,
/**< constraint set change to get data from */
SCIP_CONS
***
conss
,
/**< reference to constraints array added in the conssetchg, or NULL */
int
*
nconss
/**< reference to store the size of the constraints array, or NULL */
);
/** sets the timing mask of the propagation method of the constraint handler */
SCIP_EXPORT
void
SCIPconshdlrSetPropTiming
(
SCIP_CONSHDLR
*
conshdlr
,
/**< constraint handler */
SCIP_PROPTIMING
proptiming
/**< timing mask to be set */
);
/** returns the timing mask of the presolving method of the constraint handler */
SCIP_EXPORT
SCIP_PRESOLTIMING
SCIPconshdlrGetPresolTiming
(
SCIP_CONSHDLR
*
conshdlr
/**< constraint handler */
);
/** sets the timing mask of the presolving method of the constraint handler */
SCIP_EXPORT
void
SCIPconshdlrSetPresolTiming
(
SCIP_CONSHDLR
*
conshdlr
,
/**< constraint handler */
SCIP_PRESOLTIMING
presoltiming
/** timing mask to be set */
);
/** @} */
/*
* Constraint methods
*/
/**@addtogroup PublicConstraintMethods
*
* @{
*/
/** returns the name of the constraint
*
* @note to change the name of a constraint, use SCIPchgConsName() from scip.h
*/
SCIP_EXPORT
const
char
*
SCIPconsGetName
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns the position of constraint in the corresponding handler's conss array */
SCIP_EXPORT
int
SCIPconsGetPos
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns the constraint handler of the constraint */
SCIP_EXPORT
SCIP_CONSHDLR
*
SCIPconsGetHdlr
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns the constraint data field of the constraint */
SCIP_EXPORT
SCIP_CONSDATA
*
SCIPconsGetData
(
SCIP_CONS
*
cons
/**< constraint */
);
/** gets number of times, the constraint is currently captured */
SCIP_EXPORT
int
SCIPconsGetNUses
(
SCIP_CONS
*
cons
/**< constraint */
);
/** for an active constraint, returns the depth in the tree at which the constraint was activated */
SCIP_EXPORT
int
SCIPconsGetActiveDepth
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns the depth in the tree at which the constraint is valid; returns INT_MAX, if the constraint is local
* and currently not active
*/
SCIP_EXPORT
int
SCIPconsGetValidDepth
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is active in the current node */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsActive
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint has to be deactivated in update phase */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsUpdatedeactivate
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is enabled in the current node */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsEnabled
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint's separation is enabled in the current node */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsSeparationEnabled
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint's propagation is enabled in the current node */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsPropagationEnabled
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is deleted or marked to be deleted */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsDeleted
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is marked obsolete */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsObsolete
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is marked as a conflict */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsConflict
(
SCIP_CONS
*
cons
/**< constraint */
);
/** gets age of constraint */
SCIP_EXPORT
SCIP_Real
SCIPconsGetAge
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff the LP relaxation of constraint should be in the initial LP */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsInitial
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint should be separated during LP processing */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsSeparated
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint should be enforced during node processing */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsEnforced
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint should be checked for feasibility */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsChecked
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns whether the constraint is marked for propagation */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsMarkedPropagate
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint should be propagated during node processing */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsPropagated
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is globally valid */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsGlobal
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is only locally valid or not added to any (sub)problem */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLocal
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is modifiable (subject to column generation) */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsModifiable
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is subject to aging */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsDynamic
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsRemovable
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint's relaxation should be removed from the LP due to aging or cleanup */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsStickingAtNode
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint belongs to the global problem */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsInProb
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is belonging to original space */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsOriginal
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff constraint is belonging to transformed space */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsTransformed
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff roundings for variables in constraint are locked */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLockedPos
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff roundings for variables in constraint's negation are locked */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLockedNeg
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff roundings for variables in constraint or in constraint's negation are locked */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLocked
(
SCIP_CONS
*
cons
/**< constraint */
);
/** get number of times the roundings for variables in constraint are locked */
SCIP_EXPORT
int
SCIPconsGetNLocksPos
(
SCIP_CONS
*
cons
/**< constraint */
);
/** get number of times the roundings for variables in constraint's negation are locked */
SCIP_EXPORT
int
SCIPconsGetNLocksNeg
(
SCIP_CONS
*
cons
/**< constraint */
);
/** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLockedTypePos
(
SCIP_CONS
*
cons
,
/**< constraint */
SCIP_LOCKTYPE
locktype
/**< variable lock type */
);
/** returns TRUE iff roundings of the given locktype for variables in constraint are locked */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLockedTypeNeg
(
SCIP_CONS
*
cons
,
/**< constraint */
SCIP_LOCKTYPE
locktype
/**< variable lock type */
);
/** returns TRUE iff roundings of the given locktype for variables in constraint or in constraint's negation are locked */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsLockedType
(
SCIP_CONS
*
cons
,
/**< constraint */
SCIP_LOCKTYPE
locktype
/**< variable lock type */
);
/** get number of times the roundings of given locktype for variables in constraint are locked */
SCIP_EXPORT
int
SCIPconsGetNLocksTypePos
(
SCIP_CONS
*
cons
,
/**< constraint */
SCIP_LOCKTYPE
locktype
/**< variable lock type */
);
/** get number of times the roundings of given locktype for variables in constraint's negation are locked */
SCIP_EXPORT
int
SCIPconsGetNLocksTypeNeg
(
SCIP_CONS
*
cons
,
/**< constraint */
SCIP_LOCKTYPE
locktype
/**< variable lock type */
);
/** returns if the constraint was already added to a SCIP instance */
SCIP_EXPORT
SCIP_Bool
SCIPconsIsAdded
(
SCIP_CONS
*
cons
/**< constraint */
);
/** adds locks to (dis-)allow upgrading of constraint */
SCIP_EXPORT
void
SCIPconsAddUpgradeLocks
(
SCIP_CONS
*
cons
,
/**< constraint to add locks */
int
nlocks
/**< number of locks to add */
);
/** gets number of locks against upgrading the constraint, 0 means this constraint can be upgraded */
SCIP_EXPORT
int
SCIPconsGetNUpgradeLocks
(
SCIP_CONS
*
cons
/**< constraint */
);
#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 SCIPconsGetName(cons) (cons)->name
#define SCIPconsGetPos(cons) (cons)->consspos
#define SCIPconsGetHdlr(cons) (cons)->conshdlr
#define SCIPconsGetData(cons) (cons)->consdata
#define SCIPconsGetNUses(cons) (cons)->nuses
#define SCIPconsGetActiveDepth(cons) (cons)->activedepth
#define SCIPconsGetValidDepth(cons) (!(cons)->local ? 0 \
: !SCIPconsIsActive(cons) ? INT_MAX \
: (cons)->validdepth == -1 ? SCIPconsGetActiveDepth(cons) \
: (cons)->validdepth)
#define SCIPconsIsActive(cons) ((cons)->updateactivate || ((cons)->active && !(cons)->updatedeactivate))
#define SCIPconsIsEnabled(cons) ((cons)->updateenable || ((cons)->enabled && !(cons)->updatedisable))
#define SCIPconsIsSeparationEnabled(cons) \
(SCIPconsIsEnabled(cons) && ((cons)->updatesepaenable || ((cons)->sepaenabled && !(cons)->updatesepadisable)))
#define SCIPconsIsPropagationEnabled(cons) \
(SCIPconsIsEnabled(cons) && ((cons)->updatepropenable || ((cons)->propenabled && !(cons)->updatepropdisable)))
#define SCIPconsIsDeleted(cons) ((cons)->deleted)
#define SCIPconsIsObsolete(cons) ((cons)->updateobsolete || (cons)->obsolete)
#define SCIPconsIsConflict(cons) ((cons)->conflict)
#define SCIPconsGetAge(cons) (cons)->age
#define SCIPconsIsInitial(cons) (cons)->initial
#define SCIPconsIsSeparated(cons) (cons)->separate
#define SCIPconsIsEnforced(cons) (cons)->enforce
#define SCIPconsIsChecked(cons) (cons)->check
#define SCIPconsIsMarkedPropagate(cons) ((cons)->updatemarkpropagate || ((cons)->markpropagate && !(cons)->updateunmarkpropagate))
#define SCIPconsIsPropagated(cons) (cons)->propagate
#define SCIPconsIsGlobal(cons) !(cons)->local
#define SCIPconsIsLocal(cons) (cons)->local
#define SCIPconsIsModifiable(cons) (cons)->modifiable
#define SCIPconsIsDynamic(cons) (cons)->dynamic
#define SCIPconsIsRemovable(cons) (cons)->removable
#define SCIPconsIsStickingAtNode(cons) (cons)->stickingatnode
#define SCIPconsIsInProb(cons) ((cons)->addconssetchg == NULL && (cons)->addarraypos >= 0)
#define SCIPconsIsOriginal(cons) (cons)->original
#define SCIPconsIsTransformed(cons) !(cons)->original
#define SCIPconsIsLockedPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0)
#define SCIPconsIsLockedNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
#define SCIPconsIsLocked(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL] > 0 || (cons)->nlocksneg[SCIP_LOCKTYPE_MODEL] > 0)
#define SCIPconsGetNLocksPos(cons) ((cons)->nlockspos[SCIP_LOCKTYPE_MODEL])
#define SCIPconsGetNLocksNeg(cons) ((cons)->nlocksneg[SCIP_LOCKTYPE_MODEL])
#define SCIPconsIsLockedTypePos(cons, locktype) ((cons)->nlockspos[locktype] > 0)
#define SCIPconsIsLockedTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype] > 0)
#define SCIPconsIsLockedType(cons, locktype) ((cons)->nlockspos[locktype] > 0 || (cons)->nlocksneg[locktype] > 0)
#define SCIPconsGetNLocksTypePos(cons, locktype) ((cons)->nlockspos[locktype])
#define SCIPconsGetNLocksTypeNeg(cons, locktype) ((cons)->nlocksneg[locktype])
#define SCIPconsIsAdded(cons) ((cons)->addarraypos >= 0)
#define SCIPconsGetNUpgradeLocks(cons) ((cons)->nupgradelocks)
#endif
/** @} */
/**@addtogroup PublicProblemMethods
*
* public methods to query linear constraint classification statistics
*
* @{
*/
/** create linear constraint statistics */
SCIP_EXPORT
SCIP_RETCODE
SCIPlinConsStatsCreate
(
SCIP
*
scip
,
/**< scip data structure */
SCIP_LINCONSSTATS
**
linconsstats
/**< pointer to linear constraint classification statistics */
);
/** free linear constraint statistics */
SCIP_EXPORT
void
SCIPlinConsStatsFree
(
SCIP
*
scip
,
/**< scip data structure */
SCIP_LINCONSSTATS
**
linconsstats
/**< pointer to linear constraint classification statistics */
);
/** resets linear constraint statistics */
SCIP_EXPORT
void
SCIPlinConsStatsReset
(
SCIP_LINCONSSTATS
*
linconsstats
/**< linear constraint classification statistics */
);
/** returns the number of occurrences of a specific type of linear constraint */
SCIP_EXPORT
int
SCIPlinConsStatsGetTypeCount
(
SCIP_LINCONSSTATS
*
linconsstats
,
/**< linear constraint classification statistics */
SCIP_LINCONSTYPE
linconstype
/**< linear constraint type */
);
/** returns the total number of classified constraints */
SCIP_EXPORT
int
SCIPlinConsStatsGetSum
(
SCIP_LINCONSSTATS
*
linconsstats
/**< linear constraint classification statistics */
);
/** increases the number of occurrences of a specific type of linear constraint */
SCIP_EXPORT
void
SCIPlinConsStatsIncTypeCount
(
SCIP_LINCONSSTATS
*
linconsstats
,
/**< linear constraint classification statistics */
SCIP_LINCONSTYPE
linconstype
,
/**< linear constraint type */
int
increment
/**< positive increment */
);
/** print linear constraint classification statistics */
SCIP_EXPORT
void
SCIPprintLinConsStats
(
SCIP
*
scip
,
/**< scip data structure */
FILE
*
file
,
/**< file handle or NULL to print to standard out */
SCIP_LINCONSSTATS
*
linconsstats
/**< linear constraint classification statistics */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_cutpool.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_cutpool.h
* @ingroup PUBLICCOREAPI
* @brief public 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_PUB_CUTPOOL_H__
#define __SCIP_PUB_CUTPOOL_H__
#include
"scip/def.h"
#include
"scip/type_cutpool.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicCutMethods
*
* @{
*/
/** gets the row of the cut */
SCIP_EXPORT
SCIP_ROW
*
SCIPcutGetRow
(
SCIP_CUT
*
cut
/**< cut */
);
/** gets the age of the cut: the number of consecutive cut pool separation rounds where the cut was neither in the LP nor violated */
SCIP_EXPORT
int
SCIPcutGetAge
(
SCIP_CUT
*
cut
/**< cut */
);
/** returns the ratio of LPs where the row belonging to this cut was active in an LP solution, i.e.
* where the age of its row has not been increased
*
* @see SCIPcutGetAge() to get the age of a cut
*/
SCIP_EXPORT
SCIP_Real
SCIPcutGetLPActivityQuot
(
SCIP_CUT
*
cut
/**< cut */
);
/** gets array of cuts in the cut pool */
SCIP_EXPORT
SCIP_CUT
**
SCIPcutpoolGetCuts
(
SCIP_CUTPOOL
*
cutpool
/**< cut pool */
);
/** get number of cuts in the cut pool */
SCIP_EXPORT
int
SCIPcutpoolGetNCuts
(
SCIP_CUTPOOL
*
cutpool
/**< cut pool */
);
/** get maximum number of cuts that were stored in the cut pool at the same time */
SCIP_EXPORT
int
SCIPcutpoolGetMaxNCuts
(
SCIP_CUTPOOL
*
cutpool
/**< cut pool */
);
/** gets time in seconds used for separating cuts from the pool */
SCIP_EXPORT
SCIP_Real
SCIPcutpoolGetTime
(
SCIP_CUTPOOL
*
cutpool
/**< cut pool */
);
/** get number of times, the cut pool was separated */
SCIP_EXPORT
SCIP_Longint
SCIPcutpoolGetNCalls
(
SCIP_CUTPOOL
*
cutpool
/**< cut pool */
);
/** get total number of cuts that were separated from the cut pool */
SCIP_EXPORT
SCIP_Longint
SCIPcutpoolGetNCutsFound
(
SCIP_CUTPOOL
*
cutpool
/**< cut pool */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_dcmp.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_dcmp.h
* @ingroup DecompMethods
* @brief public methods for decompositions
* @author Gregor Hendel
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef SCIP_PUB_DECOMP_H_
#define SCIP_PUB_DECOMP_H_
#include
"blockmemshell/memory.h"
#include
"scip/type_cons.h"
#include
"scip/type_dcmp.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup DecompMethods
*
* @{
*/
/** creates a decomposition */
SCIP_EXPORT
SCIP_RETCODE
SCIPdecompCreate
(
SCIP_DECOMP
**
decomp
,
/**< pointer to store the decomposition data structure */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
int
nblocks
,
/**< the number of blocks (without the linking block) */
SCIP_Bool
original
,
/**< is this a decomposition in the original (TRUE) or transformed space? */
SCIP_Bool
benderslabels
/**< should the variables be labeled for the application of Benders' decomposition */
);
/** frees a decomposition */
SCIP_EXPORT
void
SCIPdecompFree
(
SCIP_DECOMP
**
decomp
,
/**< pointer to store the decomposition data structure */
BMS_BLKMEM
*
blkmem
/**< block memory */
);
/** returns TRUE if decomposition is in the original space */
SCIP_EXPORT
SCIP_Bool
SCIPdecompIsOriginal
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** sets the parameter that indicates whether the variables must be labeled for the application of Benders'
* decomposition
*/
SCIP_EXPORT
void
SCIPdecompSetUseBendersLabels
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
SCIP_Bool
benderslabels
/**< whether Benders' variable labels should be used */
);
/** returns TRUE if the variables must be labeled for the application of Benders' decomposition */
SCIP_EXPORT
SCIP_Bool
SCIPdecompUseBendersLabels
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets number of blocks of this decomposition */
SCIP_EXPORT
int
SCIPdecompGetNBlocks
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets area score of this decomposition */
SCIP_EXPORT
SCIP_Real
SCIPdecompGetAreaScore
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets modularity of this decomposition */
SCIP_EXPORT
SCIP_Real
SCIPdecompGetModularity
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets number of edges in the block-decomposition graph of this decomposition */
SCIP_EXPORT
int
SCIPdecompGetNBlockGraphEdges
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets number of connected components in the block-decomposition graph of this decomposition */
SCIP_EXPORT
int
SCIPdecompGetNBlockGraphComponents
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets number of articulation points in the block-decomposition graph of this decomposition */
SCIP_EXPORT
int
SCIPdecompGetNBlockGraphArticulations
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets the maximum degree of the block-decomposition graph of this decomposition */
SCIP_EXPORT
int
SCIPdecompGetBlockGraphMaxDegree
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** gets the minimum degree of the block-decomposition graph of this decomposition */
SCIP_EXPORT
int
SCIPdecompGetBlockGraphMinDegree
(
SCIP_DECOMP
*
decomp
/**< decomposition data structure */
);
/** sets labels for an array of variables */
SCIP_EXPORT
SCIP_RETCODE
SCIPdecompSetVarsLabels
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
SCIP_VAR
**
vars
,
/**< array of variables */
int
*
labels
,
/**< array of labels, one per variable */
int
nvars
/**< length of variables array */
);
/** queries labels for an array of variables */
SCIP_EXPORT
void
SCIPdecompGetVarsLabels
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
SCIP_VAR
**
vars
,
/**< array of variables */
int
*
labels
,
/**< buffer to store labels, one per variable */
int
nvars
/**< length of variables array */
);
/** sets labels for an array of constraints */
SCIP_EXPORT
SCIP_RETCODE
SCIPdecompSetConsLabels
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
SCIP_CONS
**
conss
,
/**< array of constraints */
int
*
labels
,
/**< array of labels, one per constraint */
int
nconss
/**< length of constraints array */
);
/** queries labels for an array of constraints */
SCIP_EXPORT
void
SCIPdecompGetConsLabels
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
SCIP_CONS
**
conss
,
/**< array of constraints */
int
*
labels
,
/**< array of labels, one per constraint */
int
nconss
/**< length of constraints array */
);
/** clears the corresponding labeling (constraints, variables, or both) of this decomposition */
SCIP_EXPORT
SCIP_RETCODE
SCIPdecompClear
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
SCIP_Bool
clearvarlabels
,
/**< should the variable labels be cleared? */
SCIP_Bool
clearconslabels
/**< should the constraint labels be cleared? */
);
/** prints decomposition statistics into string buffer */
SCIP_EXPORT
char
*
SCIPdecompPrintStats
(
SCIP_DECOMP
*
decomp
,
/**< decomposition data structure */
char
*
strbuf
/**< string buffer storage */
);
/* @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_dialog.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_dialog.h
* @ingroup PUBLICCOREAPI
* @brief public methods for user interface dialog
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_DIALOG_H__
#define __SCIP_PUB_DIALOG_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_dialog.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/*
* dialog handler
*/
/**@addtogroup PublicDialogMethods
*
* @{
*/
/** returns the root dialog of the dialog handler */
SCIP_EXPORT
SCIP_DIALOG
*
SCIPdialoghdlrGetRoot
(
SCIP_DIALOGHDLR
*
dialoghdlr
/**< dialog handler */
);
/** clears the input command buffer of the dialog handler */
SCIP_EXPORT
void
SCIPdialoghdlrClearBuffer
(
SCIP_DIALOGHDLR
*
dialoghdlr
/**< dialog handler */
);
/** returns TRUE iff input command buffer is empty */
SCIP_EXPORT
SCIP_Bool
SCIPdialoghdlrIsBufferEmpty
(
SCIP_DIALOGHDLR
*
dialoghdlr
/**< dialog handler */
);
/** returns the next line in the handler's command buffer; if the buffer is empty, displays the given prompt or the
* current dialog's path and asks the user for further input; the user must not free or modify the returned string
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPdialoghdlrGetLine
(
SCIP_DIALOGHDLR
*
dialoghdlr
,
/**< dialog handler */
SCIP_DIALOG
*
dialog
,
/**< current dialog */
const
char
*
prompt
,
/**< prompt to display, or NULL to display the current dialog's path */
char
**
inputline
,
/**< pointer to store the complete line in the handler's command buffer */
SCIP_Bool
*
endoffile
/**< pointer to store whether the end of the input file was reached */
);
/** returns the next word in the handler's command buffer; if the buffer is empty, displays the given prompt or the
* current dialog's path and asks the user for further input; the user must not free or modify the returned string
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPdialoghdlrGetWord
(
SCIP_DIALOGHDLR
*
dialoghdlr
,
/**< dialog handler */
SCIP_DIALOG
*
dialog
,
/**< current dialog */
const
char
*
prompt
,
/**< prompt to display, or NULL to display the current dialog's path */
char
**
inputword
,
/**< pointer to store the next word in the handler's command buffer */
SCIP_Bool
*
endoffile
/**< pointer to store whether the end of the input file was reached */
);
/** adds a single line of input to the dialog handler which is treated as if the user entered the command line */
SCIP_EXPORT
SCIP_RETCODE
SCIPdialoghdlrAddInputLine
(
SCIP_DIALOGHDLR
*
dialoghdlr
,
/**< dialog handler */
const
char
*
inputline
/**< input line to add */
);
/** adds a command to the command history of the dialog handler; if a dialog is given, the command is preceeded
* by the dialog's command path; if no command is given, only the path to the dialog is added to the command history
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPdialoghdlrAddHistory
(
SCIP_DIALOGHDLR
*
dialoghdlr
,
/**< dialog handler */
SCIP_DIALOG
*
dialog
,
/**< current dialog, or NULL */
const
char
*
command
,
/**< command string to add to the command history, or NULL */
SCIP_Bool
escapecommand
/**< should special characters in command be prefixed by an escape char? */
);
/*
* dialog
*/
/** returns TRUE iff a dialog entry matching exactly the given name is existing in the given dialog */
SCIP_EXPORT
SCIP_Bool
SCIPdialogHasEntry
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
const
char
*
entryname
/**< name of the dialog entry to find */
);
/** searches the dialog for entries corresponding to the given name;
* If a complete match is found, the entry is returned as "subdialog" and
* the return value is 1.
* If no dialog entry completely matches the given "entryname", the number
* of entries with names beginning with "entryname" is returned. If this
* number is 1, the single match is returned as "subdialog". Otherwise,
* "subdialog" is set to NULL.
*/
SCIP_EXPORT
int
SCIPdialogFindEntry
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
const
char
*
entryname
,
/**< name of the dialog entry to find */
SCIP_DIALOG
**
subdialog
/**< pointer to store the found dialog entry */
);
/** displays the dialog's menu */
SCIP_EXPORT
SCIP_RETCODE
SCIPdialogDisplayMenu
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
SCIP
*
scip
/**< SCIP data structure */
);
/** displays the entry for the dialog in it's parent's menu */
SCIP_EXPORT
SCIP_RETCODE
SCIPdialogDisplayMenuEntry
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
SCIP
*
scip
/**< SCIP data structure */
);
/** displays all dialog entries with names starting with the given "entryname" */
SCIP_EXPORT
SCIP_RETCODE
SCIPdialogDisplayCompletions
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
SCIP
*
scip
,
/**< SCIP data structure */
const
char
*
entryname
/**< name of the dialog entry to find */
);
/** gets the name of the current path in the dialog tree, separated by the given character */
SCIP_EXPORT
void
SCIPdialogGetPath
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
const
char
sepchar
,
/**< separation character to insert in path */
char
*
path
/**< string buffer to store the path */
);
/** gets the command name of the dialog */
SCIP_EXPORT
const
char
*
SCIPdialogGetName
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** gets the description of the dialog */
SCIP_EXPORT
const
char
*
SCIPdialogGetDesc
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** returns whether the dialog is a sub menu */
SCIP_EXPORT
SCIP_Bool
SCIPdialogIsSubmenu
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** gets the parent dialog of the given dialog */
SCIP_EXPORT
SCIP_DIALOG
*
SCIPdialogGetParent
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** gets the array of sub-dialogs associated with the given dialog */
SCIP_EXPORT
SCIP_DIALOG
**
SCIPdialogGetSubdialogs
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** gets the number of sub-dialogs associated with the given dialog */
SCIP_EXPORT
int
SCIPdialogGetNSubdialogs
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** gets the user defined data associated with the given dialog */
SCIP_EXPORT
SCIP_DIALOGDATA
*
SCIPdialogGetData
(
SCIP_DIALOG
*
dialog
/**< dialog */
);
/** sets user data of dialog; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPdialogSetData
(
SCIP_DIALOG
*
dialog
,
/**< dialog */
SCIP_DIALOGDATA
*
dialogdata
/**< new dialog user data */
);
/** writes command history to specified filename */
SCIP_EXPORT
SCIP_RETCODE
SCIPdialogWriteHistory
(
const
char
*
filename
/**< file name for (over)writing history */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_disp.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_disp.h
* @ingroup PUBLICCOREAPI
* @brief public methods for displaying runtime statistics
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_DISP_H__
#define __SCIP_PUB_DISP_H__
#include
<stdio.h>
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_disp.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicDisplayMethods
*
* @{
*/
/** gets user data of display column */
SCIP_EXPORT
SCIP_DISPDATA
*
SCIPdispGetData
(
SCIP_DISP
*
disp
/**< display column */
);
/** sets user data of display column; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPdispSetData
(
SCIP_DISP
*
disp
,
/**< display column */
SCIP_DISPDATA
*
dispdata
/**< new display column user data */
);
/** gets name of display column */
SCIP_EXPORT
const
char
*
SCIPdispGetName
(
SCIP_DISP
*
disp
/**< display column */
);
/** gets description of display column */
SCIP_EXPORT
const
char
*
SCIPdispGetDesc
(
SCIP_DISP
*
disp
/**< display column */
);
/** gets head line of display column */
SCIP_EXPORT
const
char
*
SCIPdispGetHeader
(
SCIP_DISP
*
disp
/**< display column */
);
/** gets width of display column */
SCIP_EXPORT
int
SCIPdispGetWidth
(
SCIP_DISP
*
disp
/**< display column */
);
/** gets priority of display column */
SCIP_EXPORT
int
SCIPdispGetPriority
(
SCIP_DISP
*
disp
/**< display column */
);
/** gets position of display column */
SCIP_EXPORT
int
SCIPdispGetPosition
(
SCIP_DISP
*
disp
/**< display column */
);
/** gets status of display column */
SCIP_EXPORT
SCIP_DISPSTATUS
SCIPdispGetStatus
(
SCIP_DISP
*
disp
/**< display column */
);
/** is display column initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPdispIsInitialized
(
SCIP_DISP
*
disp
/**< display column */
);
/** displays a long integer in decimal form fitting in a given width */
SCIP_EXPORT
void
SCIPdispLongint
(
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
FILE
*
file
,
/**< output stream */
SCIP_Longint
val
,
/**< value to display */
int
width
/**< width to fit into */
);
/** displays an integer in decimal form fitting in a given width */
SCIP_EXPORT
void
SCIPdispInt
(
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
FILE
*
file
,
/**< output stream */
int
val
,
/**< value to display */
int
width
/**< width to fit into */
);
/** displays a time value fitting in a given width */
SCIP_EXPORT
void
SCIPdispTime
(
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
FILE
*
file
,
/**< output stream */
SCIP_Real
val
,
/**< value in seconds to display */
int
width
/**< width to fit into */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_event.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_event.h
* @ingroup PUBLICCOREAPI
* @brief public methods for managing events
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_EVENT_H__
#define __SCIP_PUB_EVENT_H__
#include
"scip/def.h"
#include
"scip/type_event.h"
#include
"scip/type_lp.h"
#include
"scip/type_sol.h"
#include
"scip/type_tree.h"
#include
"scip/type_var.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
*/
/**@addtogroup PublicEventHandlerMethods
*
* @{
*/
/** gets name of event handler */
SCIP_EXPORT
const
char
*
SCIPeventhdlrGetName
(
SCIP_EVENTHDLR
*
eventhdlr
/**< event handler */
);
/** gets user data of event handler */
SCIP_EXPORT
SCIP_EVENTHDLRDATA
*
SCIPeventhdlrGetData
(
SCIP_EVENTHDLR
*
eventhdlr
/**< event handler */
);
/** sets user data of event handler; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPeventhdlrSetData
(
SCIP_EVENTHDLR
*
eventhdlr
,
/**< event handler */
SCIP_EVENTHDLRDATA
*
eventhdlrdata
/**< new event handler user data */
);
/** is event handler initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPeventhdlrIsInitialized
(
SCIP_EVENTHDLR
*
eventhdlr
/**< event handler */
);
/** gets time in seconds used in this event handler for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPeventhdlrGetSetupTime
(
SCIP_EVENTHDLR
*
eventhdlr
/**< event handler */
);
/** gets time in seconds used in this event handler */
SCIP_EXPORT
SCIP_Real
SCIPeventhdlrGetTime
(
SCIP_EVENTHDLR
*
eventhdlr
/**< event handler */
);
/** @} */
/*
* Event methods
*/
/**@addtogroup PublicEventMethods
*
* @{
*/
/** gets type of event */
SCIP_EXPORT
SCIP_EVENTTYPE
SCIPeventGetType
(
SCIP_EVENT
*
event
/**< event */
);
/** gets variable for a variable event (var added, var deleted, var fixed,
* objective value or domain change, domain hole added or removed) */
SCIP_EXPORT
SCIP_VAR
*
SCIPeventGetVar
(
SCIP_EVENT
*
event
/**< event */
);
/** gets old objective value for an objective value change event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetOldobj
(
SCIP_EVENT
*
event
/**< event */
);
/** gets new objective value for an objective value change event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetNewobj
(
SCIP_EVENT
*
event
/**< event */
);
/** gets old bound for a bound change event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetOldbound
(
SCIP_EVENT
*
event
/**< event */
);
/** gets new bound for a bound change event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetNewbound
(
SCIP_EVENT
*
event
/**< event */
);
/** gets old variable type for a variable type change event */
SCIP_EXPORT
SCIP_VARTYPE
SCIPeventGetOldtype
(
SCIP_EVENT
*
event
/**< event */
);
/** gets new variable type for a variable type change event */
SCIP_EXPORT
SCIP_VARTYPE
SCIPeventGetNewtype
(
SCIP_EVENT
*
event
/**< event */
);
/** gets node for a node or LP event */
SCIP_EXPORT
SCIP_NODE
*
SCIPeventGetNode
(
SCIP_EVENT
*
event
/**< event */
);
/** gets solution for a primal solution event */
SCIP_EXPORT
SCIP_SOL
*
SCIPeventGetSol
(
SCIP_EVENT
*
event
/**< event */
);
/** gets the left bound of open interval in the hole */
SCIP_EXPORT
SCIP_Real
SCIPeventGetHoleLeft
(
SCIP_EVENT
*
event
/**< event */
);
/** gets the right bound of open interval in the hole */
SCIP_EXPORT
SCIP_Real
SCIPeventGetHoleRight
(
SCIP_EVENT
*
event
/**< event */
);
/** gets row for a row event */
SCIP_EXPORT
SCIP_ROW
*
SCIPeventGetRow
(
SCIP_EVENT
*
event
/**< event */
);
/** gets column for a row change coefficient event */
SCIP_EXPORT
SCIP_COL
*
SCIPeventGetRowCol
(
SCIP_EVENT
*
event
/**< event */
);
/** gets old coefficient value for a row change coefficient event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetRowOldCoefVal
(
SCIP_EVENT
*
event
/**< event */
);
/** gets new coefficient value for a row change coefficient event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetRowNewCoefVal
(
SCIP_EVENT
*
event
/**< event */
);
/** gets old constant value for a row change constant event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetRowOldConstVal
(
SCIP_EVENT
*
event
/**< event */
);
/** gets new constant value for a row change constant event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetRowNewConstVal
(
SCIP_EVENT
*
event
/**< event */
);
/** gets side for a row change side event */
SCIP_EXPORT
SCIP_SIDETYPE
SCIPeventGetRowSide
(
SCIP_EVENT
*
event
/**< event */
);
/** gets old side value for a row change side event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetRowOldSideVal
(
SCIP_EVENT
*
event
/**< event */
);
/** gets new side value for a row change side event */
SCIP_EXPORT
SCIP_Real
SCIPeventGetRowNewSideVal
(
SCIP_EVENT
*
event
/**< event */
);
#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 SCIPeventGetType(event) ((event)->eventtype)
#define SCIPeventGetOldobj(event) ((event)->data.eventobjchg.oldobj)
#define SCIPeventGetNewobj(event) ((event)->data.eventobjchg.newobj)
#define SCIPeventGetOldbound(event) ((event)->data.eventbdchg.oldbound)
#define SCIPeventGetNewbound(event) ((event)->data.eventbdchg.newbound)
#define SCIPeventGetOldtype(event) ((event)->data.eventtypechg.oldtype)
#define SCIPeventGetNewtype(event) ((event)->data.eventtypechg.newtype)
#define SCIPeventGetNode(event) ((event)->data.node)
#define SCIPeventGetSol(event) ((event)->data.sol)
#define SCIPeventGetRowCol(event) ((event)->data.eventrowcoefchanged.col)
#define SCIPeventGetRowOldCoefVal(event) ((event)->data.eventrowcoefchanged.oldval)
#define SCIPeventGetRowNewCoefVal(event) ((event)->data.eventrowcoefchanged.newval)
#define SCIPeventGetRowOldConstVal(event) ((event)->data.eventrowconstchanged.oldval)
#define SCIPeventGetRowNewConstVal(event) ((event)->data.eventrowconstchanged.newval)
#define SCIPeventGetRowSide(event) ((event)->data.eventrowsidechanged.side)
#define SCIPeventGetRowOldSideVal(event) ((event)->data.eventrowsidechanged.oldval)
#define SCIPeventGetRowNewSideVal(event) ((event)->data.eventrowsidechanged.newval)
#endif
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_fileio.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_fileio.h
* @ingroup PUBLICCOREAPI
* @brief wrapper functions to map file i/o to standard or zlib file i/o
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_FILEIO_H__
#define __SCIP_PUB_FILEIO_H__
#include
<stddef.h>
#include
"scip/def.h"
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
struct
SCIP_File
SCIP_FILE
;
/**< file data structure */
SCIP_EXPORT
SCIP_FILE
*
SCIPfopen
(
const
char
*
path
,
const
char
*
mode
);
SCIP_EXPORT
SCIP_FILE
*
SCIPfdopen
(
int
fildes
,
const
char
*
mode
);
SCIP_EXPORT
size_t
SCIPfread
(
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
SCIP_FILE
*
stream
);
SCIP_EXPORT
size_t
SCIPfwrite
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfprintf
(
SCIP_FILE
*
stream
,
const
char
*
format
,
...);
SCIP_EXPORT
int
SCIPfputc
(
int
c
,
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfputs
(
const
char
*
s
,
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfgetc
(
SCIP_FILE
*
stream
);
SCIP_EXPORT
char
*
SCIPfgets
(
char
*
s
,
int
size
,
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfflush
(
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfseek
(
SCIP_FILE
*
stream
,
long
offset
,
int
whence
);
SCIP_EXPORT
void
SCIPrewind
(
SCIP_FILE
*
stream
);
SCIP_EXPORT
long
SCIPftell
(
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfeof
(
SCIP_FILE
*
stream
);
SCIP_EXPORT
int
SCIPfclose
(
SCIP_FILE
*
fp
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_heur.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_heur.h
* @ingroup PUBLICCOREAPI
* @brief public methods for primal heuristics
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_HEUR_H__
#define __SCIP_PUB_HEUR_H__
#include
"scip/def.h"
#include
"scip/type_heur.h"
#include
"scip/type_misc.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_sol.h"
#include
"scip/type_timing.h"
#include
"scip/type_var.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicHeuristicMethods
*
* @{
*/
/** compares two heuristics w. r. to their priority */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPheurComp
);
/** comparison method for sorting heuristics w.r.t. to their name */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIPheurCompName
);
/** gets user data of primal heuristic */
SCIP_EXPORT
SCIP_HEURDATA
*
SCIPheurGetData
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** sets user data of primal heuristic; user has to free old data in advance! */
SCIP_EXPORT
void
SCIPheurSetData
(
SCIP_HEUR
*
heur
,
/**< primal heuristic */
SCIP_HEURDATA
*
heurdata
/**< new primal heuristic user data */
);
/** gets name of primal heuristic */
SCIP_EXPORT
const
char
*
SCIPheurGetName
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets description of primal heuristic */
SCIP_EXPORT
const
char
*
SCIPheurGetDesc
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets display character of primal heuristic */
SCIP_EXPORT
char
SCIPheurGetDispchar
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** returns the timing mask of the heuristic */
SCIP_EXPORT
SCIP_HEURTIMING
SCIPheurGetTimingmask
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** sets new timing mask for heuristic */
SCIP_EXPORT
void
SCIPheurSetTimingmask
(
SCIP_HEUR
*
heur
,
/**< primal heuristic */
SCIP_HEURTIMING
timingmask
/**< new timing mask of heuristic */
);
/** does the heuristic use a secondary SCIP instance? */
SCIP_EXPORT
SCIP_Bool
SCIPheurUsesSubscip
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets priority of primal heuristic */
SCIP_EXPORT
int
SCIPheurGetPriority
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets frequency of primal heuristic */
SCIP_EXPORT
int
SCIPheurGetFreq
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** sets frequency of primal heuristic */
SCIP_EXPORT
void
SCIPheurSetFreq
(
SCIP_HEUR
*
heur
,
/**< primal heuristic */
int
freq
/**< new frequency of heuristic */
);
/** gets frequency offset of primal heuristic */
SCIP_EXPORT
int
SCIPheurGetFreqofs
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets maximal depth level for calling primal heuristic (returns -1, if no depth limit exists) */
SCIP_EXPORT
int
SCIPheurGetMaxdepth
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets the number of times, the heuristic was called and tried to find a solution */
SCIP_EXPORT
SCIP_Longint
SCIPheurGetNCalls
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets the number of primal feasible solutions found by this heuristic */
SCIP_EXPORT
SCIP_Longint
SCIPheurGetNSolsFound
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets the number of new best primal feasible solutions found by this heuristic */
SCIP_EXPORT
SCIP_Longint
SCIPheurGetNBestSolsFound
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** is primal heuristic initialized? */
SCIP_EXPORT
SCIP_Bool
SCIPheurIsInitialized
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets time in seconds used in this heuristic for setting up for next stages */
SCIP_EXPORT
SCIP_Real
SCIPheurGetSetupTime
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** gets time in seconds used in this heuristic */
SCIP_EXPORT
SCIP_Real
SCIPheurGetTime
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** returns array of divesets of this primal heuristic, or NULL if it has no divesets */
SCIP_EXPORT
SCIP_DIVESET
**
SCIPheurGetDivesets
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** returns the number of divesets of this primal heuristic */
SCIP_EXPORT
int
SCIPheurGetNDivesets
(
SCIP_HEUR
*
heur
/**< primal heuristic */
);
/** @} */
/** get the heuristic to which this diving setting belongs */
SCIP_EXPORT
SCIP_HEUR
*
SCIPdivesetGetHeur
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the working solution of this dive set */
SCIP_EXPORT
SCIP_SOL
*
SCIPdivesetGetWorkSolution
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** set the working solution for this dive set */
SCIP_EXPORT
void
SCIPdivesetSetWorkSolution
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_SOL
*
sol
/**< new working solution for this dive set, or NULL */
);
/**@addtogroup PublicDivesetMethods
*
* @{
*/
/** get the name of the dive set */
SCIP_EXPORT
const
char
*
SCIPdivesetGetName
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the minimum relative depth of the diving settings */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetMinRelDepth
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the maximum relative depth of the diving settings */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetMaxRelDepth
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the number of successful runs of the diving settings */
SCIP_EXPORT
SCIP_Longint
SCIPdivesetGetSolSuccess
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the number of calls to this dive set */
SCIP_EXPORT
int
SCIPdivesetGetNCalls
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the number of calls successfully terminated at a feasible leaf node */
SCIP_EXPORT
int
SCIPdivesetGetNSolutionCalls
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the minimum depth reached by this dive set */
SCIP_EXPORT
int
SCIPdivesetGetMinDepth
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the maximum depth reached by this dive set */
SCIP_EXPORT
int
SCIPdivesetGetMaxDepth
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the average depth this dive set reached during execution */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetAvgDepth
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the minimum depth at which this dive set found a solution */
SCIP_EXPORT
int
SCIPdivesetGetMinSolutionDepth
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the maximum depth at which this dive set found a solution */
SCIP_EXPORT
int
SCIPdivesetGetMaxSolutionDepth
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the average depth at which this dive set found a solution */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetAvgSolutionDepth
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the total number of LP iterations used by this dive set */
SCIP_EXPORT
SCIP_Longint
SCIPdivesetGetNLPIterations
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the total number of probing nodes used by this dive set */
SCIP_EXPORT
SCIP_Longint
SCIPdivesetGetNProbingNodes
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the total number of backtracks performed by this dive set */
SCIP_EXPORT
SCIP_Longint
SCIPdivesetGetNBacktracks
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the total number of conflicts found by this dive set */
SCIP_EXPORT
SCIP_Longint
SCIPdivesetGetNConflicts
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the total number of solutions (leaf and rounded solutions) found by the dive set */
SCIP_EXPORT
SCIP_Longint
SCIPdivesetGetNSols
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVECONTEXT
divecontext
/**< context for diving statistics */
);
/** get the maximum LP iterations quotient of the diving settings */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetMaxLPIterQuot
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the maximum LP iterations offset of the diving settings */
SCIP_EXPORT
int
SCIPdivesetGetMaxLPIterOffset
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the maximum upper bound quotient parameter of the diving settings if no solution is available */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetUbQuotNoSol
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the average quotient parameter of the diving settings if no solution is available */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetAvgQuotNoSol
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the maximum upper bound quotient parameter of the diving settings if an incumbent solution exists */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetUbQuot
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** get the average upper bound quotient parameter of the diving settings if an incumbent solution exists */
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetAvgQuot
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** should backtracking be applied? */
SCIP_EXPORT
SCIP_Bool
SCIPdivesetUseBacktrack
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** returns the LP solve frequency for diving LPs (0: dynamically based on number of intermediate domain reductions) */
SCIP_EXPORT
int
SCIPdivesetGetLPSolveFreq
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** returns the domain reduction quotient for triggering an immediate resolve of the diving LP (0.0: always resolve)*/
SCIP_EXPORT
SCIP_Real
SCIPdivesetGetLPResolveDomChgQuot
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** should only LP branching candidates be considered instead of the slower but
* more general constraint handler diving variable selection?
*/
SCIP_EXPORT
SCIP_Bool
SCIPdivesetUseOnlyLPBranchcands
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** returns TRUE if dive set supports diving of the specified type */
SCIP_EXPORT
SCIP_Bool
SCIPdivesetSupportsType
(
SCIP_DIVESET
*
diveset
,
/**< diving settings */
SCIP_DIVETYPE
divetype
/**< bit mask that represents the supported dive types by this dive set */
);
/** returns the random number generator of this \p diveset for tie-breaking */
SCIP_EXPORT
SCIP_RANDNUMGEN
*
SCIPdivesetGetRandnumgen
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** is this dive set publicly available (ie., can be used by other primal heuristics?) */
SCIP_EXPORT
SCIP_Bool
SCIPdivesetIsPublic
(
SCIP_DIVESET
*
diveset
/**< diving settings */
);
/** @} */
/**@defgroup PublicVariableGraphMethods Public Variable Graph Methods
* @ingroup MiscellaneousMethods
*
* @brief methods to create a variable graph and perform breadth-first search
*
* @{
*/
/** Perform breadth-first (BFS) search on the variable constraint graph.
*
* The result of the algorithm is that the \p distances array contains the correct distances for
* every variable from the start variables. The distance of a variable can then be accessed through its
* problem index (calling SCIPvarGetProbindex()).
* Hence, The method assumes that the length of \p distances is at least
* SCIPgetNVars().
* Variables that are not connected through constraints to the start variables have a distance of -1.
*
* Limits can be provided to further restrict the breadth-first search. If a distance limit is given,
* the search will be performed until the first variable at this distance is popped from the queue, i.e.,
* all variables with a distance < maxdistance have been labeled by the search.
* If a variable limit is given, the search stops after it completes the distance level at which
* the limit was reached. Hence, more variables may be actually labeled.
* The start variables are accounted for those variable limits.
*
* If no variable variable constraint graph is provided, the method will create one and free it at the end
* This is useful for a single use of the variable constraint graph. For several consecutive uses,
* it is advised to create a variable constraint graph via SCIPvariableGraphCreate().
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPvariablegraphBreadthFirst
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_VGRAPH
*
vargraph
,
/**< pointer to the variable graph, or NULL to let the function create a local graph */
SCIP_VAR
**
startvars
,
/**< array of start variables to calculate distance from */
int
nstartvars
,
/**< number of starting variables, at least 1 */
int
*
distances
,
/**< array to keep distance in vargraph from start variables for every variable */
int
maxdistance
,
/**< maximum distance >= 0 from start variable (INT_MAX for complete BFS) */
int
maxvars
,
/**< maximum number of variables to compute distance for */
int
maxbinintvars
/**< maximum number of binary or integer variables to compute distance for */
);
/** initialization method of variable graph data structure */
SCIP_EXPORT
SCIP_RETCODE
SCIPvariableGraphCreate
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_VGRAPH
**
vargraph
,
/**< pointer to the variable graph */
SCIP_Bool
relaxdenseconss
,
/**< should dense constraints (at least as dense as \p density) be
* ignored by connectivity graph? */
SCIP_Real
relaxdensity
,
/**< density (with respect to number of variables) to relax constraint from graph */
int
*
nrelaxedconstraints
/**< pointer to store the number of constraints that were relaxed, or NULL if not needed */
);
/** deinitialization method of variable graph data structure */
SCIP_EXPORT
void
SCIPvariableGraphFree
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_VGRAPH
**
vargraph
/**< pointer to the variable graph */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_history.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_history.h
* @ingroup PUBLICCOREAPI
* @brief public methods for branching and inference history structure
* @author Stefan Heinz
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_HISTORY_H__
#define __SCIP_PUB_HISTORY_H__
#include
"scip/def.h"
#include
"scip/type_history.h"
#ifdef NDEBUG
#include
"scip/struct_history.h"
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/** gets the conflict score of the history entry */
SCIP_EXPORT
SCIP_Real
SCIPhistoryGetVSIDS
(
SCIP_HISTORY
*
history
,
/**< branching and inference history */
SCIP_BRANCHDIR
dir
/**< branching direction */
);
/** get number of cutoffs counter */
SCIP_EXPORT
SCIP_Real
SCIPhistoryGetCutoffSum
(
SCIP_HISTORY
*
history
,
/**< branching and inference history */
SCIP_BRANCHDIR
dir
/**< branching direction (downwards, or upwards) */
);
/** return the number of (domain) values for which a history exists */
SCIP_EXPORT
int
SCIPvaluehistoryGetNValues
(
SCIP_VALUEHISTORY
*
valuehistory
/**< value based history */
);
/** return the array containing the histories for the individual (domain) values */
SCIP_EXPORT
SCIP_HISTORY
**
SCIPvaluehistoryGetHistories
(
SCIP_VALUEHISTORY
*
valuehistory
/**< value based history */
);
/** return the array containing the (domain) values for which a history exists */
SCIP_EXPORT
SCIP_Real
*
SCIPvaluehistoryGetValues
(
SCIP_VALUEHISTORY
*
valuehistory
/**< value based history */
);
#ifdef NDEBUG
/* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
* speed up the algorithms.
*/
#define SCIPhistoryGetVSIDS(history,dir) ((history)->vsids[dir])
#define SCIPhistoryGetCutoffSum(history,dir) ((history)->cutoffsum[dir])
#define SCIPvaluehistoryGetNValues(valuehistory) (valuehistory)->nvalues
#define SCIPvaluehistoryGetHistories(valuehistory) (valuehistory)->histories
#define SCIPvaluehistoryGetValues(valuehistory) (valuehistory)->values
#endif
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_implics.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_implics.h
* @ingroup PUBLICCOREAPI
* @brief public methods for implications, variable bounds, and cliques
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_IMPLICS_H__
#define __SCIP_PUB_IMPLICS_H__
#include
"scip/def.h"
#include
"scip/type_var.h"
#include
"scip/type_implics.h"
#ifdef NDEBUG
#include
"scip/struct_implics.h"
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/*
* methods for cliques
*/
/** returns the position of the given variable/value pair in the clique; returns -1 if variable/value pair is not member
* of the clique
*/
SCIP_EXPORT
int
SCIPcliqueSearchVar
(
SCIP_CLIQUE
*
clique
,
/**< clique data structure */
SCIP_VAR
*
var
,
/**< variable to search for */
SCIP_Bool
value
/**< value of the variable in the clique */
);
/** returns whether the given variable/value pair is member of the given clique */
SCIP_EXPORT
SCIP_Bool
SCIPcliqueHasVar
(
SCIP_CLIQUE
*
clique
,
/**< clique data structure */
SCIP_VAR
*
var
,
/**< variable to remove from the clique */
SCIP_Bool
value
/**< value of the variable in the clique */
);
/** gets number of variables in the cliques */
SCIP_EXPORT
int
SCIPcliqueGetNVars
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
/** gets array of active problem variables in the cliques */
SCIP_EXPORT
SCIP_VAR
**
SCIPcliqueGetVars
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
/** gets array of values of active problem variables in the cliques, i.e. whether the variable is fixed to FALSE or
* to TRUE in the clique
*/
SCIP_EXPORT
SCIP_Bool
*
SCIPcliqueGetValues
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
/** gets unique identifier of the clique */
SCIP_EXPORT
unsigned
int
SCIPcliqueGetId
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
/** gets index of the clique in the clique table */
SCIP_EXPORT
int
SCIPcliqueGetIndex
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
/** returns whether the given clique is cleaned up */
SCIP_EXPORT
SCIP_Bool
SCIPcliqueIsCleanedUp
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
/** return whether the given clique is an equation */
SCIP_EXPORT
SCIP_Bool
SCIPcliqueIsEquation
(
SCIP_CLIQUE
*
clique
/**< clique data structure */
);
#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 SCIPcliqueGetNVars(clique) ((clique)->nvars)
#define SCIPcliqueGetVars(clique) ((clique)->vars)
#define SCIPcliqueGetValues(clique) ((clique)->values)
#define SCIPcliqueGetId(clique) ((clique)->id)
#define SCIPcliqueGetIndex(clique) ((clique)->index)
#define SCIPcliqueIsCleanedUp(clique) ((clique)->startcleanup == -1)
#define SCIPcliqueIsEquation(clique) ((SCIP_Bool)(clique)->equation)
#endif
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_lp.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_lp.h
* @ingroup PUBLICCOREAPI
* @brief public methods for LP management
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_LP_H__
#define __SCIP_PUB_LP_H__
#include
"lpi/type_lpi.h"
#include
"scip/def.h"
#include
"scip/type_cons.h"
#include
"scip/type_lp.h"
#include
"scip/type_sepa.h"
#include
"scip/type_var.h"
#include
"scip/type_misc.h"
#ifdef NDEBUG
#include
"scip/struct_lp.h"
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicColumnMethods
*
* @{
*/
/** sorts column entries such that LP rows precede non-LP rows and inside both parts lower row indices precede higher ones
*/
SCIP_EXPORT
void
SCIPcolSort
(
SCIP_COL
*
col
/**< column to be sorted */
);
/** gets objective value of column */
SCIP_EXPORT
SCIP_Real
SCIPcolGetObj
(
SCIP_COL
*
col
/**< LP column */
);
/** gets lower bound of column */
SCIP_EXPORT
SCIP_Real
SCIPcolGetLb
(
SCIP_COL
*
col
/**< LP column */
);
/** gets upper bound of column */
SCIP_EXPORT
SCIP_Real
SCIPcolGetUb
(
SCIP_COL
*
col
/**< LP column */
);
/** gets best bound of column with respect to the objective function */
SCIP_EXPORT
SCIP_Real
SCIPcolGetBestBound
(
SCIP_COL
*
col
/**< LP column */
);
/** gets the primal LP solution of a column */
SCIP_EXPORT
SCIP_Real
SCIPcolGetPrimsol
(
SCIP_COL
*
col
/**< LP column */
);
/** gets the minimal LP solution value, this column ever assumed */
SCIP_EXPORT
SCIP_Real
SCIPcolGetMinPrimsol
(
SCIP_COL
*
col
/**< LP column */
);
/** gets the maximal LP solution value, this column ever assumed */
SCIP_EXPORT
SCIP_Real
SCIPcolGetMaxPrimsol
(
SCIP_COL
*
col
/**< LP column */
);
/** gets the basis status of a column in the LP solution; only valid for LPs with status SCIP_LPSOLSTAT_OPTIMAL
* and with SCIPisLPSolBasic(scip) == TRUE; returns SCIP_BASESTAT_ZERO for columns not in the current SCIP_LP
*/
SCIP_EXPORT
SCIP_BASESTAT
SCIPcolGetBasisStatus
(
SCIP_COL
*
col
/**< LP column */
);
/** gets variable this column represents */
SCIP_EXPORT
SCIP_VAR
*
SCIPcolGetVar
(
SCIP_COL
*
col
/**< LP column */
);
/** gets unique index of col */
SCIP_EXPORT
int
SCIPcolGetIndex
(
SCIP_COL
*
col
/**< LP col */
);
/** returns whether the associated variable is of integral type (binary, integer, implicit integer) */
SCIP_EXPORT
SCIP_Bool
SCIPcolIsIntegral
(
SCIP_COL
*
col
/**< LP column */
);
/** returns TRUE iff column is removable from the LP (due to aging or cleanup) */
SCIP_EXPORT
SCIP_Bool
SCIPcolIsRemovable
(
SCIP_COL
*
col
/**< LP column */
);
/** gets position of column in current LP, or -1 if it is not in LP */
SCIP_EXPORT
int
SCIPcolGetLPPos
(
SCIP_COL
*
col
/**< LP column */
);
/** gets depth in the tree where the column entered the LP, or -1 if it is not in LP */
SCIP_EXPORT
int
SCIPcolGetLPDepth
(
SCIP_COL
*
col
/**< LP column */
);
/** returns TRUE iff column is member of current LP */
SCIP_EXPORT
SCIP_Bool
SCIPcolIsInLP
(
SCIP_COL
*
col
/**< LP column */
);
/** get number of nonzero entries in column vector */
SCIP_EXPORT
int
SCIPcolGetNNonz
(
SCIP_COL
*
col
/**< LP column */
);
/** get number of nonzero entries in column vector, that correspond to rows currently in the SCIP_LP;
*
* @warning This method is only applicable on columns, that are completely linked to their rows (e.g. a column
* that is in the current LP and the LP was solved, or a column that was in a solved LP and didn't change afterwards
*/
SCIP_EXPORT
int
SCIPcolGetNLPNonz
(
SCIP_COL
*
col
/**< LP column */
);
/** gets array with rows of nonzero entries */
SCIP_EXPORT
SCIP_ROW
**
SCIPcolGetRows
(
SCIP_COL
*
col
/**< LP column */
);
/** gets array with coefficients of nonzero entries */
SCIP_EXPORT
SCIP_Real
*
SCIPcolGetVals
(
SCIP_COL
*
col
/**< LP column */
);
/** gets node number of the last node in current branch and bound run, where strong branching was used on the
* given column, or -1 if strong branching was never applied to the column in current run
*/
SCIP_EXPORT
SCIP_Longint
SCIPcolGetStrongbranchNode
(
SCIP_COL
*
col
/**< LP column */
);
/** gets number of times, strong branching was applied in current run on the given column */
SCIP_EXPORT
int
SCIPcolGetNStrongbranchs
(
SCIP_COL
*
col
/**< LP column */
);
/** gets the age of a column, i.e., the total number of successive times a column was in the LP and was 0.0 in the solution */
SCIP_EXPORT
int
SCIPcolGetAge
(
SCIP_COL
*
col
/**< LP column */
);
/** gets opposite bound type of given bound type */
SCIP_EXPORT
SCIP_BOUNDTYPE
SCIPboundtypeOpposite
(
SCIP_BOUNDTYPE
boundtype
/**< type of bound (lower or upper) */
);
#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 SCIPcolGetObj(col) (col)->obj
#define SCIPcolGetLb(col) (col)->lb
#define SCIPcolGetUb(col) (col)->ub
#define SCIPcolGetBestBound(col) ((col)->obj >= 0.0 ? (col)->lb : (col)->ub)
#define SCIPcolGetPrimsol(col) ((col)->lppos >= 0 ? (col)->primsol : 0.0)
#define SCIPcolGetMinPrimsol(col) ((col)->minprimsol)
#define SCIPcolGetMaxPrimsol(col) ((col)->maxprimsol)
#define SCIPcolGetBasisStatus(col) ((SCIP_BASESTAT)(col)->basisstatus)
#define SCIPcolGetVar(col) (col)->var
#define SCIPcolGetIndex(col) (col)->index
#define SCIPcolIsIntegral(col) (col)->integral
#define SCIPcolIsRemovable(col) (col)->removable
#define SCIPcolGetLPPos(col) (col)->lppos
#define SCIPcolGetLPDepth(col) (col)->lpdepth
#define SCIPcolIsInLP(col) ((col)->lppos >= 0)
#define SCIPcolGetNNonz(col) (col)->len
#define SCIPcolGetNLPNonz(col) (col)->nlprows
#define SCIPcolGetRows(col) (col)->rows
#define SCIPcolGetVals(col) (col)->vals
#define SCIPcolGetStrongbranchNode(col) (col)->sbnode
#define SCIPcolGetNStrongbranchs(col) (col)->nsbcalls
#define SCIPcolGetAge(col) (col)->age
#define SCIPboundtypeOpposite(boundtype) \
((boundtype) == SCIP_BOUNDTYPE_LOWER ? SCIP_BOUNDTYPE_UPPER : SCIP_BOUNDTYPE_LOWER)
#endif
/**@} */
/**@addtogroup PublicRowMethods
*
* @{
*/
/** comparison method for sorting rows by non-decreasing index */
SCIP_EXPORT
SCIP_DECL_SORTPTRCOMP
(
SCIProwComp
);
/** locks an unmodifiable row, which forbids further changes; has no effect on modifiable rows */
SCIP_EXPORT
void
SCIProwLock
(
SCIP_ROW
*
row
/**< LP row */
);
/** unlocks a lock of an unmodifiable row; a row with no sealed lock may be modified; has no effect on modifiable rows */
SCIP_EXPORT
void
SCIProwUnlock
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns the scalar product of the coefficient vectors of the two given rows */
SCIP_EXPORT
SCIP_Real
SCIProwGetScalarProduct
(
SCIP_ROW
*
row1
,
/**< first LP row */
SCIP_ROW
*
row2
/**< second LP row */
);
/** returns the degree of parallelism between the hyperplanes defined by the two row vectors v, w:
* p = |v*w|/(|v|*|w|);
* the hyperplanes are parallel, iff p = 1, they are orthogonal, iff p = 0
*/
SCIP_EXPORT
SCIP_Real
SCIProwGetParallelism
(
SCIP_ROW
*
row1
,
/**< first LP row */
SCIP_ROW
*
row2
,
/**< second LP row */
char
orthofunc
/**< function used for calc. scalar prod. ('e'uclidean, 'd'iscrete) */
);
/** returns the degree of orthogonality between the hyperplanes defined by the two row vectors v, w:
* o = 1 - |v*w|/(|v|*|w|);
* the hyperplanes are orthogonal, iff p = 1, they are parallel, iff p = 0
*/
SCIP_EXPORT
SCIP_Real
SCIProwGetOrthogonality
(
SCIP_ROW
*
row1
,
/**< first LP row */
SCIP_ROW
*
row2
,
/**< second LP row */
char
orthofunc
/**< function used for calc. scalar prod. ('e'uclidean, 'd'iscrete) */
);
/** sorts row entries such that LP columns precede non-LP columns and inside both parts lower column indices precede
* higher ones
*/
SCIP_EXPORT
void
SCIProwSort
(
SCIP_ROW
*
row
/**< row to be sorted */
);
/** get number of nonzero entries in row vector */
SCIP_EXPORT
int
SCIProwGetNNonz
(
SCIP_ROW
*
row
/**< LP row */
);
/** get number of nonzero entries in row vector, that correspond to columns currently in the SCIP_LP;
*
* @warning This method is only applicable on rows, that are completely linked to their columns (e.g. a row
* that is in the current LP and the LP was solved, or a row that was in a solved LP and didn't change afterwards
*/
SCIP_EXPORT
int
SCIProwGetNLPNonz
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets array with columns of nonzero entries */
SCIP_EXPORT
SCIP_COL
**
SCIProwGetCols
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets array with coefficients of nonzero entries */
SCIP_EXPORT
SCIP_Real
*
SCIProwGetVals
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets constant shift of row */
SCIP_EXPORT
SCIP_Real
SCIProwGetConstant
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets Euclidean norm of row vector */
SCIP_EXPORT
SCIP_Real
SCIProwGetNorm
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets sum norm of row vector (sum of absolute values of coefficients) */
SCIP_EXPORT
SCIP_Real
SCIProwGetSumNorm
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns the left hand side of the row */
SCIP_EXPORT
SCIP_Real
SCIProwGetLhs
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns the right hand side of the row */
SCIP_EXPORT
SCIP_Real
SCIProwGetRhs
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets the dual LP solution of a row */
SCIP_EXPORT
SCIP_Real
SCIProwGetDualsol
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets the dual Farkas coefficient of a row in an infeasible LP */
SCIP_EXPORT
SCIP_Real
SCIProwGetDualfarkas
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets the basis status of a row in the LP solution; only valid for LPs with status SCIP_LPSOLSTAT_OPTIMAL
* and with SCIPisLPSolBasic(scip) == TRUE; returns SCIP_BASESTAT_BASIC for rows not in the current SCIP_LP
*/
SCIP_EXPORT
SCIP_BASESTAT
SCIProwGetBasisStatus
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns the name of the row */
SCIP_EXPORT
const
char
*
SCIProwGetName
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets unique index of row */
SCIP_EXPORT
int
SCIProwGetIndex
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets age of row */
SCIP_EXPORT
int
SCIProwGetAge
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets rank of row */
SCIP_EXPORT
int
SCIProwGetRank
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns TRUE iff the activity of the row (without the row's constant) is always integral in a feasible solution */
SCIP_EXPORT
SCIP_Bool
SCIProwIsIntegral
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns TRUE iff row is only valid locally */
SCIP_EXPORT
SCIP_Bool
SCIProwIsLocal
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns TRUE iff row is modifiable during node processing (subject to column generation) */
SCIP_EXPORT
SCIP_Bool
SCIProwIsModifiable
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns TRUE iff row is removable from the LP (due to aging or cleanup) */
SCIP_EXPORT
SCIP_Bool
SCIProwIsRemovable
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns type of origin that created the row */
SCIP_EXPORT
SCIP_ROWORIGINTYPE
SCIProwGetOrigintype
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns origin constraint handler that created the row (NULL if not available) */
SCIP_EXPORT
SCIP_CONSHDLR
*
SCIProwGetOriginConshdlr
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns origin constraint that created the row (NULL if not available) */
SCIP_EXPORT
SCIP_CONS
*
SCIProwGetOriginCons
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns origin separator that created the row (NULL if not available) */
SCIP_EXPORT
SCIP_SEPA
*
SCIProwGetOriginSepa
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns TRUE iff row is member of the global cut pool */
SCIP_EXPORT
SCIP_Bool
SCIProwIsInGlobalCutpool
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets position of row in current LP, or -1 if it is not in LP */
SCIP_EXPORT
int
SCIProwGetLPPos
(
SCIP_ROW
*
row
/**< LP row */
);
/** gets depth in the tree where the row entered the LP, or -1 if it is not in LP */
SCIP_EXPORT
int
SCIProwGetLPDepth
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns TRUE iff row is member of current LP */
SCIP_EXPORT
SCIP_Bool
SCIProwIsInLP
(
SCIP_ROW
*
row
/**< LP row */
);
/** returns the number of times that this row has been sharp in an optimal LP solution */
SCIP_EXPORT
SCIP_Longint
SCIProwGetActiveLPCount
(
SCIP_ROW
*
row
/**< row */
);
/** returns the number of LPs since this row has been created */
SCIP_EXPORT
SCIP_Longint
SCIProwGetNLPsAfterCreation
(
SCIP_ROW
*
row
/**< row */
);
/** changes the rank of LP row */
SCIP_EXPORT
void
SCIProwChgRank
(
SCIP_ROW
*
row
,
/**< LP row */
int
rank
/**< new value for rank */
);
#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 SCIProwGetNNonz(row) (row)->len
#define SCIProwGetNLPNonz(row) (row)->nlpcols
#define SCIProwGetCols(row) (row)->cols
#define SCIProwGetVals(row) (row)->vals
#define SCIProwGetConstant(row) (row)->constant
#define SCIProwGetNorm(row) sqrt((row)->sqrnorm)
#define SCIProwGetSumNorm(row) (row)->sumnorm
#define SCIProwGetLhs(row) (row)->lhs
#define SCIProwGetRhs(row) (row)->rhs
#define SCIProwGetDualsol(row) ((row)->lppos >= 0 ? (row)->dualsol : 0.0)
#define SCIProwGetDualfarkas(row) ((row)->lppos >= 0 ? (row)->dualfarkas : 0.0)
#define SCIProwGetBasisStatus(row) ((SCIP_BASESTAT) (row)->basisstatus)
#define SCIProwGetName(row) (row)->name
#define SCIProwGetIndex(row) (row)->index
#define SCIProwGetAge(row) (row)->age
#define SCIProwGetRank(row) (row)->rank
#define SCIProwIsIntegral(row) (row)->integral
#define SCIProwIsLocal(row) (row)->local
#define SCIProwIsModifiable(row) (row)->modifiable
#define SCIProwIsRemovable(row) (row)->removable
#define SCIProwGetOrigintype(row) (row)->origintype
#define SCIProwGetOriginCons(row) ((SCIP_CONS*) ((SCIP_ROWORIGINTYPE) row->origintype == SCIP_ROWORIGINTYPE_CONS ? (row)->origin : NULL))
#define SCIProwGetOriginSepa(row) ((SCIP_SEPA*) ((SCIP_ROWORIGINTYPE) row->origintype == SCIP_ROWORIGINTYPE_SEPA ? (row)->origin : NULL))
#define SCIProwIsInGlobalCutpool(row) (row)->inglobalcutpool
#define SCIProwGetLPPos(row) (row)->lppos
#define SCIProwGetLPDepth(row) (row)->lpdepth
#define SCIProwIsInLP(row) ((row)->lppos >= 0)
#define SCIProwGetActiveLPCount(row) ((row)->activeinlpcounter)
#define SCIProwGetNLPsAfterCreation(row) ((row)->nlpsaftercreation)
#define SCIProwChgRank(row, cutrank) ((row)->rank = (cutrank))
#endif
/**@} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_matrix.h
0 → 100644
View file @
a9bd42a2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 pub_matrix.h
* @ingroup PUBLICCOREAPI
* @brief public methods for matrix
* @author Dieter Weninger
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_MATRIX_H__
#define __SCIP_PUB_MATRIX_H__
#include
"scip/def.h"
#include
"scip/type_var.h"
#include
"scip/type_cons.h"
#include
"scip/type_matrix.h"
#ifdef NDEBUG
#include
"scip/struct_matrix.h"
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/*
* methods for matrix access
*/
/** get column based start pointer of values */
SCIP_EXPORT
SCIP_Real
*
SCIPmatrixGetColValPtr
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get column based start pointer of row indices */
SCIP_EXPORT
int
*
SCIPmatrixGetColIdxPtr
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get the number of non-zero entries of this column */
SCIP_EXPORT
int
SCIPmatrixGetColNNonzs
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get number of columns of the matrix */
SCIP_EXPORT
int
SCIPmatrixGetNColumns
(
SCIP_MATRIX
*
matrix
/**< matrix instance */
);
/** get upper bound of column */
SCIP_EXPORT
SCIP_Real
SCIPmatrixGetColUb
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get lower bound of column */
SCIP_EXPORT
SCIP_Real
SCIPmatrixGetColLb
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get number of uplocks of column */
SCIP_EXPORT
int
SCIPmatrixGetColNUplocks
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get number of downlocks of column */
SCIP_EXPORT
int
SCIPmatrixGetColNDownlocks
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get variable pointer of column */
SCIP_EXPORT
SCIP_VAR
*
SCIPmatrixGetVar
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get name of column/variable */
SCIP_EXPORT
const
char
*
SCIPmatrixGetColName
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get row based start pointer of values */
SCIP_EXPORT
SCIP_Real
*
SCIPmatrixGetRowValPtr
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get row based start pointer of column indices */
SCIP_EXPORT
int
*
SCIPmatrixGetRowIdxPtr
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of non-zeros of this row */
SCIP_EXPORT
int
SCIPmatrixGetRowNNonzs
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get name of row */
SCIP_EXPORT
const
char
*
SCIPmatrixGetRowName
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of rows of the matrix */
SCIP_EXPORT
int
SCIPmatrixGetNRows
(
SCIP_MATRIX
*
matrix
/**< matrix instance */
);
/** get left-hand-side of row */
SCIP_EXPORT
SCIP_Real
SCIPmatrixGetRowLhs
(
SCIP_MATRIX
*
matrix
,
/**< matrix instace */
int
row
/**< row index */
);
/** get right-hand-side of row */
SCIP_EXPORT
SCIP_Real
SCIPmatrixGetRowRhs
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** flag indicating if right-hand-side of row is infinity */
SCIP_EXPORT
SCIP_Bool
SCIPmatrixIsRowRhsInfinity
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of non-zeros of matrix */
SCIP_EXPORT
int
SCIPmatrixGetNNonzs
(
SCIP_MATRIX
*
matrix
/**< matrix instance */
);
/** get minimal activity of row */
SCIP_EXPORT
SCIP_Real
SCIPmatrixGetRowMinActivity
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get maximal activity of row */
SCIP_EXPORT
SCIP_Real
SCIPmatrixGetRowMaxActivity
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of negative infinities present within minimal activity */
SCIP_EXPORT
int
SCIPmatrixGetRowNMinActNegInf
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of positive infinities present within minimal activity */
SCIP_EXPORT
int
SCIPmatrixGetRowNMinActPosInf
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of negative infinities present within maximal activity */
SCIP_EXPORT
int
SCIPmatrixGetRowNMaxActNegInf
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get number of positive infinities present within maximal activity */
SCIP_EXPORT
int
SCIPmatrixGetRowNMaxActPosInf
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get constraint pointer for constraint representing row */
SCIP_EXPORT
SCIP_CONS
*
SCIPmatrixGetCons
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
row
/**< row index */
);
/** get if conflicting uplocks of variable present */
SCIP_EXPORT
SCIP_Bool
SCIPmatrixUplockConflict
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
/** get if conflicting downlocks of variable present */
SCIP_EXPORT
SCIP_Bool
SCIPmatrixDownlockConflict
(
SCIP_MATRIX
*
matrix
,
/**< matrix instance */
int
col
/**< column index */
);
#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 SCIPmatrixGetColValPtr(matrix,col) (matrix->colmatval + matrix->colmatbeg[col])
#define SCIPmatrixGetColIdxPtr(matrix,col) (matrix->colmatind + matrix->colmatbeg[col])
#define SCIPmatrixGetColNNonzs(matrix,col) (matrix->colmatcnt[col])
#define SCIPmatrixGetNColumns(matrix) (matrix->ncols)
#define SCIPmatrixGetColUb(matrix,col) (matrix->ub[col])
#define SCIPmatrixGetColLb(matrix,col) (matrix->lb[col])
#define SCIPmatrixGetColNUplocks(matrix,col) (matrix->nuplocks[col])
#define SCIPmatrixGetColNDownlocks(matrix,col) (matrix->ndownlocks[col])
#define SCIPmatrixGetVar(matrix,col) (matrix->vars[col])
#define SCIPmatrixGetColName(matrix,col) (SCIPvarGetName(matrix->vars[col]))
#define SCIPmatrixGetRowValPtr(matrix,row) (matrix->rowmatval + matrix->rowmatbeg[row])
#define SCIPmatrixGetRowIdxPtr(matrix,row) (matrix->rowmatind + matrix->rowmatbeg[row])
#define SCIPmatrixGetRowNNonzs(matrix,row) (matrix->rowmatcnt[row])
#define SCIPmatrixGetRowName(matrix,row) (SCIPconsGetName(matrix->cons[row]))
#define SCIPmatrixGetNRows(matrix) (matrix->nrows)
#define SCIPmatrixGetRowLhs(matrix,row) (matrix->lhs[row])
#define SCIPmatrixGetRowRhs(matrix,row) (matrix->rhs[row])
#define SCIPmatrixIsRowRhsInfinity(matrix,row) (matrix->isrhsinfinite[row])
#define SCIPmatrixGetNNonzs(matrix) (matrix->nnonzs)
#define SCIPmatrixGetRowMinActivity(matrix,row) (matrix->minactivity[row])
#define SCIPmatrixGetRowMaxActivity(matrix,row) (matrix->maxactivity[row])
#define SCIPmatrixGetRowNMinActNegInf(matrix,row) (matrix->minactivityneginf[row])
#define SCIPmatrixGetRowNMinActPosInf(matrix,row) (matrix->minactivityposinf[row])
#define SCIPmatrixGetRowNMaxActNegInf(matrix,row) (matrix->maxactivityneginf[row])
#define SCIPmatrixGetRowNMaxActPosInf(matrix,row) (matrix->maxactivityposinf[row])
#define SCIPmatrixGetCons(matrix,row) (matrix->cons[row])
#endif
/** initialize matrix by copying all check constraints
*
* @note Completeness is checked by testing whether all check constraints are from a list of linear constraint handlers
* that can be represented.
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPmatrixCreate
(
SCIP
*
scip
,
/**< current scip instance */
SCIP_MATRIX
**
matrixptr
,
/**< pointer to constraint matrix object to be initialized */
SCIP_Bool
onlyifcomplete
,
/**< should matrix creation be skipped if matrix will not be complete? */
SCIP_Bool
*
initialized
,
/**< was the initialization successful? */
SCIP_Bool
*
complete
,
/**< are all constraint represented within the matrix? */
SCIP_Bool
*
infeasible
,
/**< pointer to return whether problem was detected to be infeasible during matrix creation */
int
*
naddconss
,
/**< pointer to count number of added (linear) constraints during matrix creation */
int
*
ndelconss
,
/**< pointer to count number of deleted specialized linear constraints during matrix creation */
int
*
nchgcoefs
,
/**< pointer to count number of changed coefficients during matrix creation */
int
*
nchgbds
,
/**< pointer to count number of changed bounds during matrix creation */
int
*
nfixedvars
/**< pointer to count number of fixed variables during matrix creation */
);
/** frees the constraint matrix */
SCIP_EXPORT
void
SCIPmatrixFree
(
SCIP
*
scip
,
/**< current SCIP instance */
SCIP_MATRIX
**
matrix
/**< constraint matrix object */
);
/** print one row of the MIP matrix */
SCIP_EXPORT
void
SCIPmatrixPrintRow
(
SCIP
*
scip
,
/**< current SCIP instance */
SCIP_MATRIX
*
matrix
,
/**< constraint matrix object */
int
row
/**< row index */
);
/** detect parallel rows, rhs/lhs are ignored */
SCIP_EXPORT
SCIP_RETCODE
SCIPmatrixGetParallelRows
(
SCIP
*
scip
,
/**< current SCIP instance */
SCIP_MATRIX
*
matrix
,
/**< matrix containing the constraints */
SCIP_Real
*
scale
,
/**< scale factors of rows */
int
*
pclass
/**< parallel row classes */
);
/** removes the bounds of a column and updates the activities accordingly */
SCIP_EXPORT
void
SCIPmatrixRemoveColumnBounds
(
SCIP
*
scip
,
/**< current scip instance */
SCIP_MATRIX
*
matrix
,
/**< constraint matrix */
int
col
/**< column variable to remove bounds from */
);
/** detect parallel columns, obj ignored */
SCIP_EXPORT
SCIP_RETCODE
SCIPmatrixGetParallelCols
(
SCIP
*
scip
,
/**< current SCIP instance */
SCIP_MATRIX
*
matrix
,
/**< matrix containing the constraints */
SCIP_Real
*
scale
,
/**< scale factors of cols */
int
*
pclass
,
/**< parallel column classes */
SCIP_Bool
*
varineq
/**< indicating if variable is within an equation */
);
#ifdef __cplusplus
}
#endif
#endif
Prev
1
…
20
21
22
23
24
25
26
27
Next