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/presolve.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 presolve.h
* @ingroup PUBLICCOREAPI
* @brief methods commonly used for presolving
* @author Michael Winkler
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PRESOLVE_H__
#define __SCIP_PRESOLVE_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_var.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@defgroup PublicSpecialPresolveMethods Special Methods
* @ingroup PublicPresolverMethods
* @brief methods commonly used for presolving
*
* @{
*/
/** try to reduce the necessary variable in a set of variables with corresponding bounds and boundtypes for which one
* must be fulfilled
*
* e.g. a set of logicor or bounddisjunctive constraint variables would be such a set
*
* consider the following set:
*
* x1 >= 1, x2 >= 3, x3 >= 1, x4 <= 0
*
* by (global) implication data (cliques, implications, and variable bounds) we have also the following implications
* given:
*
* x1 >= 1 => x3 >= 1
* x2 >= 2 => x3 >= 1
* x4 <= 0 => x1 >= 1
*
* Because of the last implication x4 is redundant, because x1 >= 1 would also be fulfilled in the variable set, so we
* can reduce the set by x4.
* Also, the both other implications and x3 >= 1 (in the given variable set) all imply exactly x3 >= 1, so we tighten
* the global lower bound of x3 to 1 and the set of variables gets redundant.
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPshrinkDisjunctiveVarSet
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_VAR
**
vars
,
/**< variables array for which at least one must be fulfilled in the
* following bounds and boundtypes */
SCIP_Real
*
bounds
,
/**< bounds array for which at least one must be fulfilled */
SCIP_Bool
*
boundtypes
,
/**< boundtypes array (TRUE == SCIP_BOUNDTYPE_UPPER, FALSE == SCIP_BOUNDTYPE_LOWER)
* for which at least one must be fulfilled */
SCIP_Bool
*
redundants
,
/**< array which be filled and then indicate if a variable in the set is redundant */
int
nvars
,
/**< number of variables */
int
*
nredvars
,
/**< pointer to store how many variables can be removed */
int
*
nglobalred
,
/**< pointer to store number of global reductions on variable bounds found
* through this set of variables */
SCIP_Bool
*
setredundant
,
/**< pointer to store if we found a global reduction on a variable which was part
* of the given set of variables, this makes this disjunction redundant */
SCIP_Bool
*
glbinfeas
,
/**< pointer to store if global infeasibility was detected */
SCIP_Bool
fullshortening
/**< do we want to try the shortening procedure over the whole set (which might be expensive) */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pricer.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 pricer.h
* @ingroup INTERNALAPI
* @brief internal methods for variable pricers
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PRICER_H__
#define __SCIP_PRICER_H__
#include
"scip/def.h"
#include
"blockmemshell/memory.h"
#include
"scip/type_retcode.h"
#include
"scip/type_result.h"
#include
"scip/type_set.h"
#include
"scip/type_lp.h"
#include
"scip/type_prob.h"
#include
"scip/type_pricestore.h"
#include
"scip/type_pricer.h"
#include
"scip/pub_pricer.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** copies the given pricer to a new scip */
SCIP_RETCODE
SCIPpricerCopyInclude
(
SCIP_PRICER
*
pricer
,
/**< pricer */
SCIP_SET
*
set
,
/**< SCIP_SET of SCIP to copy to */
SCIP_Bool
*
valid
/**< was the copying process valid? */
);
/** creates a variable pricer */
SCIP_RETCODE
SCIPpricerCreate
(
SCIP_PRICER
**
pricer
,
/**< pointer to variable pricer data structure */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
BMS_BLKMEM
*
blkmem
,
/**< block memory for parameter settings */
const
char
*
name
,
/**< name of variable pricer */
const
char
*
desc
,
/**< description of variable pricer */
int
priority
,
/**< priority of the variable pricer */
SCIP_Bool
delay
,
/**< should the pricer be delayed until no other pricers or already existing
* problem variables with negative reduced costs are found */
SCIP_DECL_PRICERCOPY
((
*
pricercopy
)),
/**< copy method of pricer or NULL if you don't want to copy your plugin into sub-SCIPs */
SCIP_DECL_PRICERFREE
((
*
pricerfree
)),
/**< destructor of variable pricer */
SCIP_DECL_PRICERINIT
((
*
pricerinit
)),
/**< initialize variable pricer */
SCIP_DECL_PRICEREXIT
((
*
pricerexit
)),
/**< deinitialize variable pricer */
SCIP_DECL_PRICERINITSOL
((
*
pricerinitsol
)),
/**< solving process initialization method of variable pricer */
SCIP_DECL_PRICEREXITSOL
((
*
pricerexitsol
)),
/**< solving process deinitialization method of variable pricer */
SCIP_DECL_PRICERREDCOST
((
*
pricerredcost
)),
/**< reduced cost pricing method of variable pricer for feasible LPs */
SCIP_DECL_PRICERFARKAS
((
*
pricerfarkas
)),
/**< Farkas pricing method of variable pricer for infeasible LPs */
SCIP_PRICERDATA
*
pricerdata
/**< variable pricer data */
);
/** calls destructor and frees memory of variable pricer */
SCIP_RETCODE
SCIPpricerFree
(
SCIP_PRICER
**
pricer
,
/**< pointer to variable pricer data structure */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** initializes variable pricer */
SCIP_RETCODE
SCIPpricerInit
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** calls exit method of variable pricer */
SCIP_RETCODE
SCIPpricerExit
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** informs variable pricer that the branch and bound process is being started */
SCIP_RETCODE
SCIPpricerInitsol
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** informs variable pricer that the branch and bound process data is being freed */
SCIP_RETCODE
SCIPpricerExitsol
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** activates pricer such that it is called in LP solving loop */
SCIP_RETCODE
SCIPpricerActivate
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** deactivates pricer such that it is no longer called in LP solving loop */
SCIP_RETCODE
SCIPpricerDeactivate
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** enables or disables all clocks of \p pricer, depending on the value of the flag */
void
SCIPpricerEnableOrDisableClocks
(
SCIP_PRICER
*
pricer
,
/**< the pricer for which all clocks should be enabled or disabled */
SCIP_Bool
enable
/**< should the clocks of the pricer be enabled? */
);
/** calls reduced cost pricing method of variable pricer */
SCIP_RETCODE
SCIPpricerRedcost
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_PROB
*
prob
,
/**< transformed problem */
SCIP_Real
*
lowerbound
,
/**< local lower bound computed by the pricer */
SCIP_Bool
*
stopearly
,
/**< should pricing be stopped, although new variables were added? */
SCIP_RESULT
*
result
/**< result of the pricing process */
);
/** calls Farkas pricing method of variable pricer */
SCIP_RETCODE
SCIPpricerFarkas
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_PROB
*
prob
,
/**< transformed problem */
SCIP_RESULT
*
result
/**< result of the pricing process */
);
/** depending on the LP's solution status, calls reduced cost or Farkas pricing method of variable pricer */
SCIP_RETCODE
SCIPpricerExec
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_PROB
*
prob
,
/**< transformed problem */
SCIP_LP
*
lp
,
/**< LP data */
SCIP_PRICESTORE
*
pricestore
,
/**< pricing storage */
SCIP_Real
*
lowerbound
,
/**< local lower bound computed by the pricer */
SCIP_Bool
*
stopearly
,
/**< should pricing be stopped, although new variables were added? */
SCIP_RESULT
*
result
/**< result of the pricing process */
);
/** sets priority of variable pricer */
void
SCIPpricerSetPriority
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_SET
*
set
,
/**< global SCIP settings */
int
priority
/**< new priority of the variable pricer */
);
/** sets copy callback of pricer */
void
SCIPpricerSetCopy
(
SCIP_PRICER
*
pricer
,
/**< variable pricer */
SCIP_DECL_PRICERCOPY
((
*
pricercopy
))
/**< copy callback of pricer */
);
/** sets destructor callback of pricer */
void
SCIPpricerSetFree
(
SCIP_PRICER
*
pricer
,
/**< pricer */
SCIP_DECL_PRICERFREE
((
*
pricerfree
))
/**< destructor of pricer */
);
/** sets initialization callback of pricer */
void
SCIPpricerSetInit
(
SCIP_PRICER
*
pricer
,
/**< pricer */
SCIP_DECL_PRICERINIT
((
*
pricerinit
))
/**< initialize pricer */
);
/** sets deinitialization callback of pricer */
void
SCIPpricerSetExit
(
SCIP_PRICER
*
pricer
,
/**< pricer */
SCIP_DECL_PRICEREXIT
((
*
pricerexit
))
/**< deinitialize pricer */
);
/** sets solving process initialization callback of pricer */
void
SCIPpricerSetInitsol
(
SCIP_PRICER
*
pricer
,
/**< pricer */
SCIP_DECL_PRICERINITSOL
((
*
pricerinitsol
))
/**< solving process initialization callback of pricer */
);
/** sets solving process deinitialization callback of pricer */
void
SCIPpricerSetExitsol
(
SCIP_PRICER
*
pricer
,
/**< pricer */
SCIP_DECL_PRICEREXITSOL
((
*
pricerexitsol
))
/**< solving process deinitialization callback of pricer */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pricer_xyz.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 pricer_xyz.h
* @ingroup PRICERS
* @brief xyz variable pricer
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PRICER_XYZ_H__
#define __SCIP_PRICER_XYZ_H__
#include
"scip/scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the xyz variable pricer and includes it in SCIP
*
* @ingroup PricerIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePricerXyz
(
SCIP
*
scip
/**< SCIP data structure */
);
/**@addtogroup PRICERS
*
* @{
*/
/** TODO: add public methods to this group for documentation purposes
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pricestore.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 pricestore.h
* @ingroup INTERNALAPI
* @brief internal methods for storing priced variables
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PRICESTORE_H__
#define __SCIP_PRICESTORE_H__
#include
"scip/def.h"
#include
"blockmemshell/memory.h"
#include
"scip/type_retcode.h"
#include
"scip/type_set.h"
#include
"scip/type_stat.h"
#include
"scip/type_event.h"
#include
"scip/type_lp.h"
#include
"scip/type_var.h"
#include
"scip/type_prob.h"
#include
"scip/type_tree.h"
#include
"scip/type_pricestore.h"
#include
"scip/type_branch.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates pricing storage */
SCIP_RETCODE
SCIPpricestoreCreate
(
SCIP_PRICESTORE
**
pricestore
/**< pointer to store pricing storage */
);
/** frees pricing storage */
SCIP_RETCODE
SCIPpricestoreFree
(
SCIP_PRICESTORE
**
pricestore
/**< pointer to store pricing storage */
);
/** informs pricing storage, that the setup of the initial LP starts now */
void
SCIPpricestoreStartInitialLP
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** informs pricing storage, that the setup of the initial LP is now finished */
void
SCIPpricestoreEndInitialLP
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** adds variable to pricing storage and capture it */
SCIP_RETCODE
SCIPpricestoreAddVar
(
SCIP_PRICESTORE
*
pricestore
,
/**< pricing storage */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_LP
*
lp
,
/**< LP data */
SCIP_VAR
*
var
,
/**< priced variable */
SCIP_Real
score
,
/**< pricing score of variable (the larger, the better the variable) */
SCIP_Bool
root
/**< are we at the root node? */
);
/** adds variable where zero violates the bounds to pricing storage, capture it */
SCIP_RETCODE
SCIPpricestoreAddBdviolvar
(
SCIP_PRICESTORE
*
pricestore
,
/**< pricing storage */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics */
SCIP_LP
*
lp
,
/**< LP data */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_VAR
*
var
/**< variable, where zero violates the bounds */
);
/** adds problem variables with negative reduced costs to pricing storage */
SCIP_RETCODE
SCIPpricestoreAddProbVars
(
SCIP_PRICESTORE
*
pricestore
,
/**< pricing storage */
BMS_BLKMEM
*
blkmem
,
/**< block memory buffers */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
SCIP_PROB
*
prob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_LP
*
lp
,
/**< LP data */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_EVENTQUEUE
*
eventqueue
/**< event queue */
);
/** adds priced variables to the LP */
SCIP_RETCODE
SCIPpricestoreApplyVars
(
SCIP_PRICESTORE
*
pricestore
,
/**< pricing storage */
BMS_BLKMEM
*
blkmem
,
/**< block memory buffers */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_PROB
*
prob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_LP
*
lp
/**< LP data */
);
/** reset variables' bounds violated by zero to its original value */
SCIP_RETCODE
SCIPpricestoreResetBounds
(
SCIP_PRICESTORE
*
pricestore
,
/**< pricing storage */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics */
SCIP_LP
*
lp
,
/**< LP data */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_EVENTQUEUE
*
eventqueue
/**< event queue */
);
/** gets number of variables in pricing storage */
int
SCIPpricestoreGetNVars
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** gets number of variables in pricing storage whose bounds must be reset */
int
SCIPpricestoreGetNBoundResets
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** gets time needed to price existing problem variables */
SCIP_Real
SCIPpricestoreGetProbPricingTime
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** gets total number of calls to problem variable pricing */
int
SCIPpricestoreGetNProbPricings
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** gets total number of times, a problem variable was priced in */
int
SCIPpricestoreGetNProbvarsFound
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** get total number of variables found so far in pricing */
int
SCIPpricestoreGetNVarsFound
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
/** get total number of variables priced into the LP so far */
int
SCIPpricestoreGetNVarsApplied
(
SCIP_PRICESTORE
*
pricestore
/**< pricing storage */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/primal.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 primal.h
* @ingroup INTERNALAPI
* @brief internal methods for collecting primal CIP solutions and primal informations
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PRIMAL_H__
#define __SCIP_PRIMAL_H__
#include
"scip/def.h"
#include
"blockmemshell/memory.h"
#include
"scip/type_retcode.h"
#include
"scip/type_set.h"
#include
"scip/type_event.h"
#include
"scip/type_lp.h"
#include
"scip/type_var.h"
#include
"scip/type_prob.h"
#include
"scip/type_sol.h"
#include
"scip/type_primal.h"
#include
"scip/type_tree.h"
#include
"scip/type_reopt.h"
#include
"scip/type_heur.h"
#include
"scip/struct_primal.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates primal data */
SCIP_RETCODE
SCIPprimalCreate
(
SCIP_PRIMAL
**
primal
/**< pointer to primal data */
);
/** frees primal data */
SCIP_RETCODE
SCIPprimalFree
(
SCIP_PRIMAL
**
primal
,
/**< pointer to primal data */
BMS_BLKMEM
*
blkmem
/**< block memory */
);
/** clears primal data */
SCIP_RETCODE
SCIPprimalClear
(
SCIP_PRIMAL
**
primal
,
/**< pointer to primal data */
BMS_BLKMEM
*
blkmem
/**< block memory */
);
/** sets the cutoff bound in primal data and in LP solver */
SCIP_RETCODE
SCIPprimalSetCutoffbound
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_Real
cutoffbound
,
/**< new cutoff bound */
SCIP_Bool
useforobjlimit
/**< should the cutoff bound be used to update the objective limit, if
* better? */
);
/** sets upper bound in primal data and in LP solver */
SCIP_RETCODE
SCIPprimalSetUpperbound
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_PROB
*
prob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_Real
upperbound
/**< new upper bound */
);
/** updates upper bound and cutoff bound in primal data after a tightening of the problem's objective limit */
SCIP_RETCODE
SCIPprimalUpdateObjlimit
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
/**< current LP data */
);
/** recalculates upper bound and cutoff bound in primal data after a change of the problem's objective offset */
SCIP_RETCODE
SCIPprimalUpdateObjoffset
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
/**< current LP data */
);
/** adds additional objective offset in origanal space to all existing solution (in original space) */
void
SCIPprimalAddOrigObjoffset
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_Real
addval
/**< additional objective offset in original space */
);
/** returns whether the current primal bound is justified with a feasible primal solution; if not, the primal bound
* was set from the user as objective limit
*/
SCIP_Bool
SCIPprimalUpperboundIsSol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
/**< original problem data */
);
/** returns the primal ray thats proves unboundedness */
SCIP_SOL
*
SCIPprimalGetRay
(
SCIP_PRIMAL
*
primal
/**< primal data */
);
/** update the primal ray thats proves unboundedness */
SCIP_RETCODE
SCIPprimalUpdateRay
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic SCIP statistics */
SCIP_SOL
*
primalray
,
/**< the new primal ray */
BMS_BLKMEM
*
blkmem
/**< block memory */
);
/** adds primal solution to solution storage by copying it */
SCIP_RETCODE
SCIPprimalAddSol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_SOL
*
sol
,
/**< primal CIP solution */
SCIP_Bool
*
stored
/**< stores whether given solution was good enough to keep */
);
/** adds primal solution to solution storage, frees the solution afterwards */
SCIP_RETCODE
SCIPprimalAddSolFree
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_SOL
**
sol
,
/**< pointer to primal CIP solution; is cleared in function call */
SCIP_Bool
*
stored
/**< stores whether given solution was good enough to keep */
);
/** adds primal solution to solution candidate storage of original problem space */
SCIP_RETCODE
SCIPprimalAddOrigSol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
prob
,
/**< original problem data */
SCIP_SOL
*
sol
,
/**< primal CIP solution; is cleared in function call */
SCIP_Bool
*
stored
/**< stores whether given solution was good enough to keep */
);
/** adds primal solution to solution candidate storage of original problem space, frees the solution afterwards */
SCIP_RETCODE
SCIPprimalAddOrigSolFree
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
prob
,
/**< original problem data */
SCIP_SOL
**
sol
,
/**< pointer to primal CIP solution; is cleared in function call */
SCIP_Bool
*
stored
/**< stores whether given solution was good enough to keep */
);
/** adds current LP/pseudo solution to solution storage */
SCIP_RETCODE
SCIPprimalAddCurrentSol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_HEUR
*
heur
,
/**< heuristic that found the solution (or NULL if it's from the tree) */
SCIP_Bool
*
stored
/**< stores whether given solution was good enough to keep */
);
/** checks primal solution; if feasible, adds it to storage by copying it */
SCIP_RETCODE
SCIPprimalTrySol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_SOL
*
sol
,
/**< primal CIP solution */
SCIP_Bool
printreason
,
/**< Should all reasons of violations be printed? */
SCIP_Bool
completely
,
/**< Should all violations be checked? */
SCIP_Bool
checkbounds
,
/**< Should the bounds of the variables be checked? */
SCIP_Bool
checkintegrality
,
/**< Has integrality to be checked? */
SCIP_Bool
checklprows
,
/**< Do constraints represented by rows in the current LP have to be checked? */
SCIP_Bool
*
stored
/**< stores whether given solution was feasible and good enough to keep */
);
/** checks primal solution; if feasible, adds it to storage; solution is freed afterwards */
SCIP_RETCODE
SCIPprimalTrySolFree
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_SOL
**
sol
,
/**< pointer to primal CIP solution; is cleared in function call */
SCIP_Bool
printreason
,
/**< Should all reasons of violations be printed? */
SCIP_Bool
completely
,
/**< Should all violations be checked? */
SCIP_Bool
checkbounds
,
/**< Should the bounds of the variables be checked? */
SCIP_Bool
checkintegrality
,
/**< Has integrality to be checked? */
SCIP_Bool
checklprows
,
/**< Do constraints represented by rows in the current LP have to be checked? */
SCIP_Bool
*
stored
/**< stores whether solution was feasible and good enough to keep */
);
/** checks current LP/pseudo solution; if feasible, adds it to storage */
SCIP_RETCODE
SCIPprimalTryCurrentSol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_HEUR
*
heur
,
/**< heuristic that found the solution (or NULL if it's from the tree) */
SCIP_Bool
printreason
,
/**< Should all reasons of violations be printed? */
SCIP_Bool
completely
,
/**< Should all violations be checked? */
SCIP_Bool
checkintegrality
,
/**< Has integrality to be checked? */
SCIP_Bool
checklprows
,
/**< Do constraints represented by rows in the current LP have to be checked? */
SCIP_Bool
*
stored
/**< stores whether given solution was good enough to keep */
);
/** inserts solution into the global array of all existing primal solutions */
SCIP_RETCODE
SCIPprimalSolCreated
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_SOL
*
sol
/**< primal CIP solution */
);
/** removes solution from the global array of all existing primal solutions */
void
SCIPprimalSolFreed
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_SOL
*
sol
/**< primal CIP solution */
);
/** updates all existing primal solutions after a change in a variable's objective value */
void
SCIPprimalUpdateVarObj
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_VAR
*
var
,
/**< problem variable */
SCIP_Real
oldobj
,
/**< old objective value */
SCIP_Real
newobj
/**< new objective value */
);
/** retransforms all existing solutions to original problem space
*
* @note as a side effect, the objective value of the solutions can change (numerical errors)
* so we update the objective cutoff value and upper bound accordingly
*/
SCIP_RETCODE
SCIPprimalRetransformSolutions
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
/**< current LP data */
);
/** tries to transform original solution to the transformed problem space */
SCIP_RETCODE
SCIPprimalTransformSol
(
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_SOL
*
sol
,
/**< primal solution */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PROB
*
origprob
,
/**< original problem */
SCIP_PROB
*
transprob
,
/**< transformed problem after presolve */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_Real
*
solvals
,
/**< array for internal use to store solution values, or NULL;
* if the method is called multiple times in a row, an array with size >=
* number of active variables should be given for performance reasons */
SCIP_Bool
*
solvalset
,
/**< array for internal use to store which solution values were set, or NULL;
* if the method is called multiple times in a row, an array with size >=
* number of active variables should be given for performance reasons */
int
solvalssize
,
/**< size of solvals and solvalset arrays, should be >= number of active
* variables */
SCIP_Bool
*
added
/**< pointer to store whether the solution was added */
);
/** is the updating of violations enabled for this problem? */
SCIP_Bool
SCIPprimalUpdateViolations
(
SCIP_PRIMAL
*
primal
/**< problem data */
);
/** set whether the updating of violations is turned on */
void
SCIPprimalSetUpdateViolations
(
SCIP_PRIMAL
*
primal
,
/**< problem data */
SCIP_Bool
updateviolations
/**< TRUE to enable violation updates, FALSE otherwise */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prob.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 prob.h
* @ingroup INTERNALAPI
* @brief internal methods for storing and manipulating the main problem
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROB_H__
#define __SCIP_PROB_H__
#include
"scip/def.h"
#include
"blockmemshell/memory.h"
#include
"scip/type_retcode.h"
#include
"scip/type_set.h"
#include
"scip/type_stat.h"
#include
"scip/type_event.h"
#include
"scip/type_lp.h"
#include
"scip/type_var.h"
#include
"scip/type_implics.h"
#include
"scip/type_prob.h"
#include
"scip/type_primal.h"
#include
"scip/type_tree.h"
#include
"scip/type_reopt.h"
#include
"scip/type_branch.h"
#include
"scip/type_cons.h"
#include
"scip/type_conflictstore.h"
#include
"scip/struct_prob.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/*
* problem creation
*/
/** creates problem data structure by copying the source problem;
* If the problem type requires the use of variable pricers, these pricers should be activated with calls
* to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
*/
SCIP_RETCODE
SCIPprobCopy
(
SCIP_PROB
**
prob
,
/**< pointer to problem data structure */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
const
char
*
name
,
/**< problem name */
SCIP
*
sourcescip
,
/**< source SCIP data structure */
SCIP_PROB
*
sourceprob
,
/**< source problem structure */
SCIP_HASHMAP
*
varmap
,
/**< a hashmap to store the mapping of source variables corresponding
* target variables, or NULL */
SCIP_HASHMAP
*
consmap
,
/**< a hashmap to store the mapping of source constraints to the corresponding
* target constraints, or NULL */
SCIP_Bool
global
/**< create a global or a local copy? */
);
/** creates problem data structure
* If the problem type requires the use of variable pricers, these pricers should be activated with calls
* to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
*/
SCIP_RETCODE
SCIPprobCreate
(
SCIP_PROB
**
prob
,
/**< pointer to problem data structure */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
const
char
*
name
,
/**< problem name */
SCIP_DECL_PROBDELORIG
((
*
probdelorig
)),
/**< frees user data of original problem */
SCIP_DECL_PROBTRANS
((
*
probtrans
)),
/**< creates user data of transformed problem by transforming original user data */
SCIP_DECL_PROBDELTRANS
((
*
probdeltrans
)),
/**< frees user data of transformed problem */
SCIP_DECL_PROBINITSOL
((
*
probinitsol
)),
/**< solving process initialization method of transformed data */
SCIP_DECL_PROBEXITSOL
((
*
probexitsol
)),
/**< solving process deinitialization method of transformed data */
SCIP_DECL_PROBCOPY
((
*
probcopy
)),
/**< copies user data if you want to copy it to a subscip, or NULL */
SCIP_PROBDATA
*
probdata
,
/**< user problem data set by the reader */
SCIP_Bool
transformed
/**< is this the transformed problem? */
);
/** sets callback to free user data of original problem */
void
SCIPprobSetDelorig
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_DECL_PROBDELORIG
((
*
probdelorig
))
/**< frees user data of original problem */
);
/** sets callback to create user data of transformed problem by transforming original user data */
void
SCIPprobSetTrans
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_DECL_PROBTRANS
((
*
probtrans
))
/**< creates user data of transformed problem by transforming original user data */
);
/** sets callback to free user data of transformed problem */
void
SCIPprobSetDeltrans
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_DECL_PROBDELTRANS
((
*
probdeltrans
))
/**< frees user data of transformed problem */
);
/** sets solving process initialization callback of transformed data */
void
SCIPprobSetInitsol
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_DECL_PROBINITSOL
((
*
probinitsol
))
/**< solving process initialization callback of transformed data */
);
/** sets solving process deinitialization callback of transformed data */
void
SCIPprobSetExitsol
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_DECL_PROBEXITSOL
((
*
probexitsol
))
/**< solving process deinitialization callback of transformed data */
);
/** sets callback to copy user data to copy it to a subscip, or NULL */
void
SCIPprobSetCopy
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_DECL_PROBCOPY
((
*
probcopy
))
/**< copies user data if you want to copy it to a subscip, or NULL */
);
/** frees problem data structure */
SCIP_RETCODE
SCIPprobFree
(
SCIP_PROB
**
prob
,
/**< pointer to problem data structure */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
BMS_BLKMEM
*
blkmem
,
/**< block memory buffer */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_LP
*
lp
/**< current LP data (or NULL, if it's the original problem) */
);
/** transform problem data into normalized form */
SCIP_RETCODE
SCIPprobTransform
(
SCIP_PROB
*
source
,
/**< problem to transform */
BMS_BLKMEM
*
blkmem
,
/**< block memory buffer */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics */
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_CONFLICTSTORE
*
conflictstore
,
/**< conflict store */
SCIP_PROB
**
target
/**< pointer to target problem data structure */
);
/** resets the global and local bounds of original variables in original problem to their original values */
SCIP_RETCODE
SCIPprobResetBounds
(
SCIP_PROB
*
prob
,
/**< original problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
/**< problem statistics */
);
/** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
* with respect to their original index (within their categories). Adjust the problem index afterwards which is
* supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
* against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
* model)
*/
void
SCIPprobResortVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/*
* problem modification
*/
/** sets user problem data */
void
SCIPprobSetData
(
SCIP_PROB
*
prob
,
/**< problem */
SCIP_PROBDATA
*
probdata
/**< user problem data to use */
);
/** adds variable's name to the namespace */
SCIP_RETCODE
SCIPprobAddVarName
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_VAR
*
var
/**< variable */
);
/** removes variable's name from the namespace */
SCIP_RETCODE
SCIPprobRemoveVarName
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_VAR
*
var
/**< variable */
);
/** adds variable to the problem and captures it */
SCIP_RETCODE
SCIPprobAddVar
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory buffers */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_VAR
*
var
/**< variable to add */
);
/** marks variable to be removed from the problem; however, the variable is NOT removed from the constraints */
SCIP_RETCODE
SCIPprobDelVar
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_VAR
*
var
,
/**< problem variable */
SCIP_Bool
*
deleted
/**< pointer to store whether marking variable to be deleted was successful */
);
/** actually removes the deleted variables from the problem and releases them */
SCIP_RETCODE
SCIPprobPerformVarDeletions
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_CLIQUETABLE
*
cliquetable
,
/**< clique table data structure */
SCIP_LP
*
lp
,
/**< current LP data (may be NULL) */
SCIP_BRANCHCAND
*
branchcand
/**< branching candidate storage */
);
/** changes the type of a variable in the problem */
SCIP_RETCODE
SCIPprobChgVarType
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_CLIQUETABLE
*
cliquetable
,
/**< clique table data structure */
SCIP_VAR
*
var
,
/**< variable to add */
SCIP_VARTYPE
vartype
/**< new type of variable */
);
/** informs problem, that the given loose problem variable changed its status */
SCIP_RETCODE
SCIPprobVarChangedStatus
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_BRANCHCAND
*
branchcand
,
/**< branching candidate storage */
SCIP_CLIQUETABLE
*
cliquetable
,
/**< clique table data structure */
SCIP_VAR
*
var
/**< problem variable */
);
/** adds constraint's name to the namespace */
SCIP_RETCODE
SCIPprobAddConsName
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_CONS
*
cons
/**< constraint */
);
/** remove constraint's name from the namespace */
SCIP_RETCODE
SCIPprobRemoveConsName
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_CONS
*
cons
/**< constraint */
);
/** adds constraint to the problem and captures it;
* a local constraint is automatically upgraded into a global constraint
*/
SCIP_RETCODE
SCIPprobAddCons
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
SCIP_CONS
*
cons
/**< constraint to add */
);
/** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
* constraint may be invalid after the call
*/
SCIP_RETCODE
SCIPprobDelCons
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
SCIP_CONS
*
cons
/**< constraint to remove */
);
/** remembers the current number of constraints in the problem's internal data structure
* - resets maximum number of constraints to current number of constraints
* - remembers current number of constraints as starting number of constraints
*/
void
SCIPprobMarkNConss
(
SCIP_PROB
*
prob
/**< problem data */
);
/** sets objective sense: minimization or maximization */
void
SCIPprobSetObjsense
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_OBJSENSE
objsense
/**< new objective sense */
);
/** adds value to objective offset */
void
SCIPprobAddObjoffset
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_Real
addval
/**< value to add to objective offset */
);
/** sets the dual bound on objective function */
void
SCIPprobSetDualbound
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_Real
dualbound
/**< external dual bound */
);
/** sets limit on objective function, such that only solutions better than this limit are accepted */
void
SCIPprobSetObjlim
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_Real
objlim
/**< external objective limit */
);
/** informs the problem, that its objective value is always integral in every feasible solution */
void
SCIPprobSetObjIntegral
(
SCIP_PROB
*
prob
/**< problem data */
);
/** sets integral objective value flag, if all variables with non-zero objective values are integral and have
* integral objective value and also updates the cutoff bound if primal solution is already known
*/
SCIP_RETCODE
SCIPprobCheckObjIntegral
(
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
/**< event queue */
);
/** if possible, scales objective function such that it is integral with gcd = 1 */
SCIP_RETCODE
SCIPprobScaleObj
(
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics data */
SCIP_PRIMAL
*
primal
,
/**< primal data */
SCIP_TREE
*
tree
,
/**< branch and bound tree */
SCIP_REOPT
*
reopt
,
/**< reoptimization data structure */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_EVENTFILTER
*
eventfilter
,
/**< event filter for global (not variable dependent) events */
SCIP_EVENTQUEUE
*
eventqueue
/**< event queue */
);
/** remembers the current solution as root solution in the problem variables */
void
SCIPprobStoreRootSol
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< SCIP statistics */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_Bool
roothaslp
/**< is the root solution from LP? */
);
/** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
void
SCIPprobUpdateBestRootSol
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< problem statistics */
SCIP_LP
*
lp
/**< current LP data */
);
/** informs problem, that the presolving process was finished, and updates all internal data structures */
SCIP_RETCODE
SCIPprobExitPresolve
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** initializes problem for branch and bound process */
SCIP_RETCODE
SCIPprobInitSolve
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
SCIP_RETCODE
SCIPprobExitSolve
(
SCIP_PROB
*
prob
,
/**< problem data */
BMS_BLKMEM
*
blkmem
,
/**< block memory */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_EVENTQUEUE
*
eventqueue
,
/**< event queue */
SCIP_LP
*
lp
,
/**< current LP data */
SCIP_Bool
restart
/**< was this exit solve call triggered by a restart? */
);
/*
* problem information
*/
/** sets problem name */
SCIP_RETCODE
SCIPprobSetName
(
SCIP_PROB
*
prob
,
/**< problem data */
const
char
*
name
/**< name to be set */
);
/** returns the number of implicit binary variables, meaning variable of vartype != SCIP_VARTYPE_BINARY and !=
* SCIP_VARTYPE_CONTINUOUS but with global bounds [0,1]
*
* @note this number needs to be computed, because it cannot be update like the othe counters for binary and interger
* variables, each time the variable type changes(, we would need to update this counter each time a global bound
* changes), even at the end of presolving this cannot be computed, because some variable can change to an
* implicit binary status
*/
int
SCIPprobGetNImplBinVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** returns the number of variables with non-zero objective coefficient */
int
SCIPprobGetNObjVars
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** returns the minimal absolute non-zero objective coefficient
*
* @note currently, this is only used for statistics and printed after the solving process. if this information is
* needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
* absolute non-zero coefficient every time an objective coefficient has changed.
*/
SCIP_Real
SCIPprobGetAbsMinObjCoef
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** returns the maximal absolute non-zero objective coefficient
*
* @note currently, this is only used for statistics and printed after the solving process. if this information is
* needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
* absolute non-zero coefficient every time an objective coefficient has changed.
*/
SCIP_Real
SCIPprobGetAbsMaxObjCoef
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** update the number of variables with non-zero objective coefficient */
void
SCIPprobUpdateNObjVars
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_Real
oldobj
,
/**< old objective value for variable */
SCIP_Real
newobj
/**< new objective value for variable */
);
/** update the dual bound if its better as the current one */
void
SCIPprobUpdateDualbound
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_Real
newbound
/**< new dual bound for the node (if it's tighter than the old one) */
);
/** invalidates the dual bound */
void
SCIPprobInvalidateDualbound
(
SCIP_PROB
*
prob
/**< problem data */
);
/** returns the external value of the given internal objective value */
SCIP_Real
SCIPprobExternObjval
(
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_Real
objval
/**< internal objective value */
);
/** returns the internal value of the given external objective value */
SCIP_Real
SCIPprobInternObjval
(
SCIP_PROB
*
transprob
,
/**< tranformed problem data */
SCIP_PROB
*
origprob
,
/**< original problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_Real
objval
/**< external objective value */
);
/** returns variable of the problem with given name */
SCIP_VAR
*
SCIPprobFindVar
(
SCIP_PROB
*
prob
,
/**< problem data */
const
char
*
name
/**< name of variable to find */
);
/** returns constraint of the problem with given name */
SCIP_CONS
*
SCIPprobFindCons
(
SCIP_PROB
*
prob
,
/**< problem data */
const
char
*
name
/**< name of variable to find */
);
/** displays current pseudo solution */
void
SCIPprobPrintPseudoSol
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
/**< message handler */
);
/** outputs problem statistics */
void
SCIPprobPrintStatistics
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
FILE
*
file
/**< output file (or NULL for standard output) */
);
#ifndef NDEBUG
/* In debug mode, the following methods are implemented as function calls to ensure
* type validity.
*/
/** is the problem permuted */
SCIP_Bool
SCIPprobIsPermuted
(
SCIP_PROB
*
prob
);
/** mark the problem as permuted */
void
SCIPprobMarkPermuted
(
SCIP_PROB
*
prob
);
/** is the problem data transformed */
SCIP_Bool
SCIPprobIsTransformed
(
SCIP_PROB
*
prob
/**< problem data */
);
/** returns whether the objective value is known to be integral in every feasible solution */
SCIP_Bool
SCIPprobIsObjIntegral
(
SCIP_PROB
*
prob
/**< problem data */
);
/** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
* in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
*/
SCIP_Bool
SCIPprobAllColsInLP
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_LP
*
lp
/**< current LP data */
);
/** gets limit on objective function in external space */
SCIP_Real
SCIPprobGetObjlim
(
SCIP_PROB
*
prob
,
/**< problem data */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** gets user problem data */
SCIP_PROBDATA
*
SCIPprobGetData
(
SCIP_PROB
*
prob
/**< problem */
);
/** gets problem name */
const
char
*
SCIPprobGetName
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets number of problem variables */
int
SCIPprobGetNVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets number of binary problem variables */
int
SCIPprobGetNBinVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets number of integer problem variables */
int
SCIPprobGetNIntVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets number of implicit integer problem variables */
int
SCIPprobGetNImplVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets number of continuous problem variables */
int
SCIPprobGetNContVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets problem variables */
SCIP_VAR
**
SCIPprobGetVars
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets number of problem constraints */
int
SCIPprobGetNConss
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets the objective offset */
SCIP_Real
SCIPprobGetObjoffset
(
SCIP_PROB
*
prob
/**< problem data */
);
/** gets the objective scalar */
SCIP_Real
SCIPprobGetObjscale
(
SCIP_PROB
*
prob
/**< problem data */
);
/** is constraint compression enabled for this problem? */
SCIP_Bool
SCIPprobIsConsCompressionEnabled
(
SCIP_PROB
*
prob
/**< problem data */
);
/** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
void
SCIPprobEnableConsCompression
(
SCIP_PROB
*
prob
/**< problem data */
);
#else
/* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
* speed up the algorithms.
*/
#define SCIPprobIsPermuted(prob) ((prob)->permuted)
#define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
#define SCIPprobIsTransformed(prob) ((prob)->transformed)
#define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
#define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
#define SCIPprobGetObjlim(prob,set) \
((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
#define SCIPprobGetData(prob) ((prob)->probdata)
#define SCIPprobGetName(prob) ((prob)->name)
#define SCIPprobGetName(prob) ((prob)->name)
#define SCIPprobGetNVars(prob) ((prob)->nvars)
#define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
#define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
#define SCIPprobGetNImplVars(prob) ((prob)->nimplvars)
#define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
#define SCIPprobGetVars(prob) ((prob)->vars)
#define SCIPprobGetNConss(prob) ((prob)->nconss)
#define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
#define SCIPprobGetObjscale(prob) ((prob)->objscale)
#define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
#define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
#endif
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop.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 prop.h
* @ingroup INTERNALAPI
* @brief internal methods for propagators
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_H__
#define __SCIP_PROP_H__
#include
"scip/def.h"
#include
"blockmemshell/memory.h"
#include
"scip/type_retcode.h"
#include
"scip/type_result.h"
#include
"scip/type_set.h"
#include
"scip/type_stat.h"
#include
"scip/type_lp.h"
#include
"scip/type_var.h"
#include
"scip/type_prop.h"
#include
"scip/pub_prop.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** copies the given propagator to a new scip */
SCIP_RETCODE
SCIPpropCopyInclude
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
/**< SCIP_SET of SCIP to copy to */
);
/** creates a propagator */
SCIP_RETCODE
SCIPpropCreate
(
SCIP_PROP
**
prop
,
/**< pointer to propagator data structure */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_MESSAGEHDLR
*
messagehdlr
,
/**< message handler */
BMS_BLKMEM
*
blkmem
,
/**< block memory for parameter settings */
const
char
*
name
,
/**< name of propagator */
const
char
*
desc
,
/**< description of propagator */
int
priority
,
/**< priority of propagator (>= 0: before, < 0: after constraint handlers) */
int
freq
,
/**< frequency for calling propagator */
SCIP_Bool
delay
,
/**< should propagator be delayed, if other propagators found reductions? */
SCIP_PROPTIMING
timingmask
,
/**< positions in the node solving loop where propagator should be executed */
int
presolpriority
,
/**< priority of the propagator (>= 0: before, < 0: after constraint handlers) */
int
presolmaxrounds
,
/**< maximal number of presolving rounds the propagator participates in (-1: no limit) */
SCIP_PRESOLTIMING
presoltiming
,
/**< timing mask of the propagator's presolving method */
SCIP_DECL_PROPCOPY
((
*
propcopy
)),
/**< copy method of propagator or NULL if you don't want to copy your plugin into sub-SCIPs */
SCIP_DECL_PROPFREE
((
*
propfree
)),
/**< destructor of propagator */
SCIP_DECL_PROPINIT
((
*
propinit
)),
/**< initialize propagator */
SCIP_DECL_PROPEXIT
((
*
propexit
)),
/**< deinitialize propagator */
SCIP_DECL_PROPINITPRE
((
*
propinitpre
)),
/**< presolving initialization method of propagator */
SCIP_DECL_PROPEXITPRE
((
*
propexitpre
)),
/**< presolving deinitialization method of propagator */
SCIP_DECL_PROPINITSOL
((
*
propinitsol
)),
/**< solving process initialization method of propagator */
SCIP_DECL_PROPEXITSOL
((
*
propexitsol
)),
/**< solving process deinitialization method of propagator */
SCIP_DECL_PROPPRESOL
((
*
proppresol
)),
/**< presolving method */
SCIP_DECL_PROPEXEC
((
*
propexec
)),
/**< execution method of propagator */
SCIP_DECL_PROPRESPROP
((
*
propresprop
)),
/**< propagation conflict resolving method */
SCIP_PROPDATA
*
propdata
/**< propagator data */
);
/** calls destructor and frees memory of propagator */
SCIP_RETCODE
SCIPpropFree
(
SCIP_PROP
**
prop
,
/**< pointer to propagator data structure */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** initializes propagator */
SCIP_RETCODE
SCIPpropInit
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** calls exit method of propagator */
SCIP_RETCODE
SCIPpropExit
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** informs propagator that the presolving process is being started */
SCIP_RETCODE
SCIPpropInitpre
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** informs propagator that the presolving is finished */
SCIP_RETCODE
SCIPpropExitpre
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** informs propagator that the branch and bound process is being started */
SCIP_RETCODE
SCIPpropInitsol
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
/**< global SCIP settings */
);
/** informs propagator that the branch and bound process data is being freed */
SCIP_RETCODE
SCIPpropExitsol
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_Bool
restart
/**< was this exit solve call triggered by a restart? */
);
/** executes presolving method of propagator */
SCIP_RETCODE
SCIPpropPresol
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_PRESOLTIMING
timing
,
/**< current presolving timing */
int
nrounds
,
/**< number of presolving rounds already done */
int
*
nfixedvars
,
/**< pointer to total number of variables fixed of all presolvers */
int
*
naggrvars
,
/**< pointer to total number of variables aggregated of all presolvers */
int
*
nchgvartypes
,
/**< pointer to total number of variable type changes of all presolvers */
int
*
nchgbds
,
/**< pointer to total number of variable bounds tightened of all presolvers */
int
*
naddholes
,
/**< pointer to total number of domain holes added of all presolvers */
int
*
ndelconss
,
/**< pointer to total number of deleted constraints of all presolvers */
int
*
naddconss
,
/**< pointer to total number of added constraints of all presolvers */
int
*
nupgdconss
,
/**< pointer to total number of upgraded constraints of all presolvers */
int
*
nchgcoefs
,
/**< pointer to total number of changed coefficients of all presolvers */
int
*
nchgsides
,
/**< pointer to total number of changed left/right hand sides of all presolvers */
SCIP_RESULT
*
result
/**< pointer to store the result of the callback method */
);
/** calls execution method of propagator */
SCIP_RETCODE
SCIPpropExec
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_STAT
*
stat
,
/**< dynamic problem statistics */
int
depth
,
/**< depth of current node */
SCIP_Bool
execdelayed
,
/**< execute propagator even if it is marked to be delayed */
SCIP_Bool
instrongbranching
,
/**< are we currently doing strong branching? */
SCIP_PROPTIMING
proptiming
,
/**< current point in the node solving process */
SCIP_RESULT
*
result
/**< pointer to store the result of the callback method */
);
/** resolves the given conflicting bound, that was deduced by the given propagator, by putting all "reason" bounds
* leading to the deduction into the conflict queue with calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
* SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
*
* @note it is sufficient to explain the relaxed bound change
*/
SCIP_RETCODE
SCIPpropResolvePropagation
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
,
/**< global SCIP settings */
SCIP_VAR
*
infervar
,
/**< variable whose bound was deduced by the constraint */
int
inferinfo
,
/**< user inference information attached to the bound change */
SCIP_BOUNDTYPE
inferboundtype
,
/**< bound that was deduced (lower or upper bound) */
SCIP_BDCHGIDX
*
bdchgidx
,
/**< bound change index, representing the point of time where change took place */
SCIP_Real
relaxedbd
,
/**< the relaxed bound */
SCIP_RESULT
*
result
/**< pointer to store the result of the callback method */
);
/** sets priority of propagator */
void
SCIPpropSetPriority
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
,
/**< global SCIP settings */
int
priority
/**< new priority of the propagator */
);
/** sets presolving priority of propagator */
void
SCIPpropSetPresolPriority
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_SET
*
set
,
/**< global SCIP settings */
int
presolpriority
/**< new priority of the propagator */
);
/** sets copy method of propagator */
void
SCIPpropSetCopy
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPCOPY
((
*
propcopy
))
/**< copy method of propagator or NULL if you don't want to copy your plugin into sub-SCIPs */
);
/** sets destructor method of propagator */
void
SCIPpropSetFree
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPFREE
((
*
propfree
))
/**< destructor of propagator */
);
/** sets initialization method of propagator */
void
SCIPpropSetInit
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPINIT
((
*
propinit
))
/**< initialize propagator */
);
/** sets deinitialization method of propagator */
void
SCIPpropSetExit
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPEXIT
((
*
propexit
))
/**< deinitialize propagator */
);
/** sets solving process initialization method of propagator */
void
SCIPpropSetInitsol
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPINITSOL
((
*
propinitsol
))
/**< solving process initialization method of propagator */
);
/** sets solving process deinitialization method of propagator */
void
SCIPpropSetExitsol
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPEXITSOL
((
*
propexitsol
))
/**< solving process deinitialization method of propagator */
);
/** sets preprocessing initialization method of propagator */
void
SCIPpropSetInitpre
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPINITPRE
((
*
propinitpre
))
/**< preprocessing initialization method of propagator */
);
/** sets preprocessing deinitialization method of propagator */
void
SCIPpropSetExitpre
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPEXITPRE
((
*
propexitpre
))
/**< preprocessing deinitialization method of propagator */
);
/** sets presolving method of propagator */
SCIP_RETCODE
SCIPpropSetPresol
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPPRESOL
((
*
proppresol
)),
/**< presolving method */
int
presolpriority
,
/**< presolving priority of the propagator (>= 0: before, < 0: after constraint handlers) */
int
presolmaxrounds
,
/**< maximal number of presolving rounds the propagator participates in (-1: no limit) */
SCIP_PRESOLTIMING
presoltiming
/**< timing mask of the propagator's presolving method */
);
/** sets propagation conflict resolving callback of propagator */
void
SCIPpropSetResprop
(
SCIP_PROP
*
prop
,
/**< propagator */
SCIP_DECL_PROPRESPROP
((
*
propresprop
))
/**< propagation conflict resolving callback */
);
/** enables or disables all clocks of \p prop, depending on the value of the flag */
void
SCIPpropEnableOrDisableClocks
(
SCIP_PROP
*
prop
,
/**< the propagator for which all clocks should be enabled or disabled */
SCIP_Bool
enable
/**< should the clocks of the propagator be enabled? */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_dualfix.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 prop_dualfix.h
* @ingroup PROPAGATORS
* @brief fixing roundable variables to best bound
* @author Tobias Achterberg
*
* This propagator fixes variables, that have no restrictions in direction of their objective coefficient, to the best
* possible value. If the objective coefficient of a variable is \f$0\f$ and it may be rounded both up and down, then
* this variable will be fixed to the closest feasible value to \f$0\f$.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_DUALFIX_H__
#define __SCIP_PROP_DUALFIX_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the dual fixing propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropDualfix
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_genvbounds.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 prop_genvbounds.h
* @ingroup PROPAGATORS
* @brief generalized variable bounds propagator
* @author Stefan Weltge
* @author Ambros Gleixner
*
* A generalized variable bound is a linear inequality of the form
* \f[
* c \, x_i \geq \sum (a_j \, x_j) + d \cdot \mbox{primal\_bound} + \mbox{const},
* \f]
* where \f$c\f$ is either 1 or -1 and \f$primal\_bound\f$ is an upper bound on the optimal objective
* value, which may improve during the solving process. In SCIP, generalized variable bounds are
* used for providing bounds on the LHS's variable \f$x_i\f$. If the above inequality is valid, the
* following bounds, depending on \f$x_i\f$'s coefficient, are also valid:
* \f[
* c = 1 \qquad\Rightarrow\qquad x_i \geq \mbox{minactivity}(\sum a_j \, x_j)
* + d \cdot \mbox{primal\_bound} + \mbox{const}
* \f]
* \f[
* c = -1 \qquad\Rightarrow\qquad x_i \leq - \mbox{minactivity}(\sum a_j \, x_j)
* - d \cdot \mbox{primal\_bound} - \mbox{const}.
* \f]
*
* Note that for feasible problems, \f$d \leq 0\f$ must hold. If \f$d < 0\f$ a decrease of the
* primal bound causes an improvement of the provided bound. Similarly, if \f$a_j > 0\f$ (\f$< 0\f$), a
* tightened lower (upper) bound of a variable \f$x_j\f$ also yields a better bound for \f$x_i\f$.
*
* The genvbounds propagator sorts its stored generalized variable bounds topologically in the
* following order: A generalized variable bound A (\f$c\, x_i \geq \ldots\f$) preceeds a
* generalized variable bound B if the left-hand side variable of A appears in the right-hand side
* of B with sign of its coefficient equal to c; i.e., if A is propagated and tightens the
* corresponding bound of x_i, then the minactivity on the right-hand side of B increases. We
* assume that this order is acyclic for the generalized variable bounds added. Under this
* condition, propagating the generalized variable bounds in a topological order ensures that all
* propagations are found in one round.
*
* Both global and local propagation is applied: If the primal bound improves, generalized variable bounds with a
* nonzero coefficient d are enforced in order to tighten global bounds using the global variable bounds for computing
* the minactivity. Independently, the genvbounds propagator catches events SCIP_EVENTTYPE_LBTIGHTENED and
* SCIP_EVENTTYPE_UBTIGHTENED, i.e., locally tightened bounds of variables that occur in the right-hand sides of
* generalized variable bounds, in order to perform an efficient local propagation when called.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_GENVBOUNDS_H__
#define __SCIP_PROP_GENVBOUNDS_H__
#include
"scip/def.h"
#include
"scip/type_lp.h"
#include
"scip/type_prop.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_var.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PROPAGATORS
*
* @{
*/
/** adds a generalized variable bound to the genvbounds propagator; if there is already a genvbound for the bound
* "boundtype" of variable "var", it will be replaced
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPgenVBoundAdd
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_PROP
*
genvboundprop
,
/**< genvbound propagator */
SCIP_VAR
**
vars
,
/**< array of RHSs variables */
SCIP_VAR
*
var
,
/**< LHSs variable */
SCIP_Real
*
coefs
,
/**< array of coefficients for the RHSs variables */
int
ncoefs
,
/**< size of coefs array */
SCIP_Real
coefprimalbound
,
/**< nonpositive value of the primal bounds multiplier */
SCIP_Real
constant
,
/**< constant term */
SCIP_BOUNDTYPE
boundtype
/**< type of bound provided by the genvbound */
);
/** @} */
/** creates the genvbounds propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropGenvbounds
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_nlobbt.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 prop_nlobbt.h
* @ingroup PROPAGATORS
* @brief nonlinear OBBT propagator
* @author Benjamin Mueller
*
* In Nonlinear Optimization-Based Bound Tightening (NLOBBT), we solve auxiliary NLPs of the form
* \f[
* \min / \max \, x_i \\
* \f]
* \f[
* s.t. \; g_j(x) \le 0 \, \forall j=1,\ldots,m \\
* \f]
* \f[
* c'x \le \mathcal{U}
* \f]
* \f[
* x \in [\ell,u]
* \f]
*
* where each \f$ g_j \f$ is a convex function and \f$ \mathcal{U} \f$ the solution value of the current
* incumbent. Clearly, the optimal objective value of this nonlinear program provides a valid lower/upper bound on
* variable \f$ x_i \f$.
*
* The propagator sorts all variables w.r.t. their occurrences in convex nonlinear constraints and solves sequentially
* all convex NLPs. Variables which could be successfully tightened by the propagator will be prioritized in the next
* call of a new node in the branch-and-bound tree. By default, the propagator requires at least one nonconvex
* constraints to be executed. For purely convex problems, the benefit of having tighter bounds is negligible.
*
* By default, NLOBBT is only applied for non-binary variables. A reason for this can be found <a
* href="http://dx.doi.org/10.1007/s10898-016-0450-4">here </a>. Variables which do not appear non-linearly in the
* nonlinear constraints will not be considered even though they might lead to additional tightenings.
*
* After solving the NLP to optimize \f$ x_i \f$ we try to exploit the dual information to generate a globally valid
* inequality, called Generalized Variable Bound (see @ref prop_genvbounds.h). Let \f$ \lambda_j \f$, \f$ \mu \f$, \f$
* \alpha \f$, and \f$ \beta \f$ be the dual multipliers for the constraints of the NLP where \f$ \alpha \f$ and \f$
* \beta \f$ correspond to the variable bound constraints. Because of the convexity of \f$ g_j \f$ we know that
*
* \f[
* g_j(x) \ge g_j(x^*) + \nabla g_j(x^*)(x-x^*)
* \f]
*
* holds for every \f$ x^* \in [\ell,u] \f$. Let \f$ x^* \f$ be the optimal solution after solving the NLP for the case
* of minimizing \f$ x_i \f$ (similiar for the case of maximizing \f$ x_i \f$). Since the NLP is convex we know that the
* KKT conditions
*
* \f[
* e_i + \lambda' \nabla g(x^*) + \mu' c + \alpha - \beta = 0
* \f]
* \f[
* \lambda_j g_j(x^*) = 0
* \f]
*
* hold. Aggregating the inequalities \f$ x_i \ge x_i \f$ and \f$ g_j(x) \le 0 \f$ leads to the inequality
*
* \f[
* x_i \ge x_i + \sum_{j} g_j(x_i)
* \f]
*
* Instead of calling the (expensive) propagator during the tree search we can use this inequality to derive further
* reductions on \f$ x_i \f$. Multiplying the first KKT condition by \f$ (x - x^*) \f$ and using the fact that each
* \f$ g_j \f$ is convex we can rewrite the previous inequality to
*
* \f[
* x_i \ge (\beta - \alpha)'x + (e_i + \alpha - \beta) x^* + \mu \mathcal{U}.
* \f]
*
* which is passed to the genvbounds propagator. Note that if \f$ \alpha_i \neq \beta_i \f$ we know that the bound of
* \f$ x_i \f$ is the proof for optimality and thus no useful genvbound can be found.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_NLOBBT_H__
#define __SCIP_PROP_NLOBBT_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the nlobbt propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropNlobbt
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_obbt.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 prop_obbt.h
* @ingroup PROPAGATORS
* @brief optimization-based bound tightening propagator
* @author Stefan Weltge
*
* In Optimization-Based Bound Tightening (OBBT), we solve auxiliary LPs of the form
* \f[
* \min / \max \, \{ x_i \mid x \in P' \},
* \f]
* where \f$P'\f$ is the current LP relaxation restricted by the primal cutoff constraint \f$c^T x <= z\f$, \f$z\f$ the
* current cutoff bound. Trivially, the optimal objective value of this LP provides a valid lower/upper bound on
* variable \f$x_i\f$.
*
* Since solving LPs may be expensive, the propagator inspects solutions \f$x \in P'\f$ and does not run for variable
* bounds which are tight at \f$x\f$: First, we check SCIP's last LP relaxation solution. Second, we solve a sequence of
* filtering LP's \f$\min / \max \, \{ \sum w_i \, x_i \mid x \in P' \}\f$ in order to push several variables towards
* one of their bounds in one LP solve. Third, we inspect all solutions of the auxiliary LPs solved along the way.
*
* By default, OBBT is only applied for nonbinary variables that occur in nonlinear constraints.
*
* After we learned a better variable bound the propagator tries to separate the solution of the current OBBT LP with
* the refined outer approximation in order to strengthen the learned bound. Additionally, we trigger a
* propagation round of SCIP after a fixed number of learned bound tightenings.
*
* Additionally, the propagator uses the dual solution of the auxiliary LPs to construct globally valid generalized
* variable bounds which may be propagated during the branch-and-bound search.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_OBBT_H__
#define __SCIP_PROP_OBBT_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the obbt propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropObbt
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_probing.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 prop_probing.h
* @ingroup PROPAGATORS
* @brief probing propagator
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_PROBING_H__
#define __SCIP_PROP_PROBING_H__
#include
"scip/def.h"
#include
"scip/type_lp.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_var.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the probing propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropProbing
(
SCIP
*
scip
/**< SCIP data structure */
);
/**@addtogroup PROPAGATORS
*
* @{
*/
/** applies and evaluates probing of a single variable in the given direction and bound */
SCIP_EXPORT
SCIP_RETCODE
SCIPapplyProbingVar
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_VAR
**
vars
,
/**< problem variables */
int
nvars
,
/**< number of problem variables */
int
probingpos
,
/**< variable number to apply probing on */
SCIP_BOUNDTYPE
boundtype
,
/**< which bound should be changed */
SCIP_Real
bound
,
/**< whioch bound should be set */
int
maxproprounds
,
/**< maximal number of propagation rounds (-1: no limit, 0: parameter settings) */
SCIP_Real
*
impllbs
,
/**< array to store lower bounds after applying implications and cliques */
SCIP_Real
*
implubs
,
/**< array to store upper bounds after applying implications and cliques */
SCIP_Real
*
proplbs
,
/**< array to store lower bounds after full propagation */
SCIP_Real
*
propubs
,
/**< array to store upper bounds after full propagation */
SCIP_Bool
*
cutoff
/**< pointer to store whether the probing direction is infeasible */
);
/** analyses boundchanges resulting from probing on a variable and performs deduced fixations, aggregations, and domain tightenings
*
* Given a variable probingvar with domain [l,u] and bound tightening results from reducing the
* domain once to [l,leftub] and once to [rightlb,u], the method computes and applies resulting
* variable fixations, aggregations, implications, and bound changes. Variable probingvar does not
* need to be binary. The whole domain of probingvar need to be covered by the left and right
* branches, i.e., we assume leftub >= rightlb for continuous variables or floor(leftub) >=
* ceil(rightlb)-1 for discrete variables. Bounds after applying implications and cliques do not
* need to be provided, but if they are omitted and probingvar is a binary variable, then already
* existing implications may be added.
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPanalyzeDeductionsProbing
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_VAR
*
probingvar
,
/**< the probing variable */
SCIP_Real
leftub
,
/**< upper bound of probing variable in left branch */
SCIP_Real
rightlb
,
/**< lower bound of probing variable in right branch */
int
nvars
,
/**< number of variables which bound changes should be analyzed */
SCIP_VAR
**
vars
,
/**< variables which bound changes should be analyzed */
SCIP_Real
*
leftimpllbs
,
/**< lower bounds after applying implications and cliques in left branch, or NULL */
SCIP_Real
*
leftimplubs
,
/**< upper bounds after applying implications and cliques in left branch, or NULL */
SCIP_Real
*
leftproplbs
,
/**< lower bounds after applying domain propagation in left branch */
SCIP_Real
*
leftpropubs
,
/**< upper bounds after applying domain propagation in left branch */
SCIP_Real
*
rightimpllbs
,
/**< lower bounds after applying implications and cliques in right branch, or NULL */
SCIP_Real
*
rightimplubs
,
/**< upper bounds after applying implications and cliques in right branch, or NULL */
SCIP_Real
*
rightproplbs
,
/**< lower bounds after applying domain propagation in right branch */
SCIP_Real
*
rightpropubs
,
/**< upper bounds after applying domain propagation in right branch */
int
*
nfixedvars
,
/**< pointer to counter which is increased by the number of deduced variable fixations */
int
*
naggrvars
,
/**< pointer to counter which is increased by the number of deduced variable aggregations */
int
*
nimplications
,
/**< pointer to counter which is increased by the number of deduced implications */
int
*
nchgbds
,
/**< pointer to counter which is increased by the number of deduced bound tightenings */
SCIP_Bool
*
cutoff
/**< buffer to store whether a cutoff is detected */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_pseudoobj.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 prop_pseudoobj.h
* @ingroup PROPAGATORS
* @brief Pseudo objective propagator
* @author Tobias Achterberg
* @author Stefan Heinz
*
* This propagator propagates the objective function using the cutoff bound and the pseudo objective value. The pseudo
* objective value can be seen as minimum activity of the linear objective function. Using this, this propagator checks
* if variables with non-zero objective coefficients can exceed the cutoff bound. If this is the case the corresponding
* bound can be tightened.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_PSEUDOOBJ_H__
#define __SCIP_PROP_PSEUDOOBJ_H__
#include
"scip/def.h"
#include
"scip/type_prop.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_var.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the pseudo objective function propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropPseudoobj
(
SCIP
*
scip
/**< SCIP data structure */
);
/**@addtogroup PROPAGATORS
*
* @{
*/
/** propagates the cutoff bound for the given variables */
SCIP_EXPORT
SCIP_RETCODE
SCIPpropagateCutoffboundVar
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_PROP
*
prop
,
/**< propagator, or NULL */
SCIP_VAR
*
var
,
/**< variables to propagate */
SCIP_Real
cutoffbound
,
/**< cutoff bound to use */
SCIP_Real
pseudoobjval
,
/**< pseudo objective value to use */
SCIP_Bool
*
tightened
/**< pointer to if the domain was tightened */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_redcost.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 prop_redcost.h
* @ingroup PROPAGATORS
* @brief propagator using the LP reduced cost and the cutoff bound
* @author Tobias Achterberg
* @author Stefan Heinz
* @author Matthias Miltenberger
* @author Michael Winkler
*
* This propagator uses the reduced cost of an optimal solved LP relaxation to propagate the variables against the
* cutoff bound.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_REDCOST_H__
#define __SCIP_PROP_REDCOST_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the redcost propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropRedcost
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_rootredcost.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 prop_rootredcost.h
* @ingroup PROPAGATORS
* @brief reduced cost strengthening using root node reduced costs and the cutoff bound
* @author Tobias Achterberg
* @author Stefan Heinz
*
* This propagator uses the root reduced cost to (globally) propagate against the cutoff bound. The propagator checks if
* the variables with non-zero root reduced cost can exceed the cutoff bound. If this is the case the corresponding
* bound can be tightened.
*
* The propagate is performed during the search any time a new cutoff bound (primal solution) is found.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_ROOTREDCOST_H__
#define __SCIP_PROP_ROOTREDCOST_H__
#include
"scip/def.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the root node reduced cost strengthening propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropRootredcost
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_symmetry.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 prop_symmetry.h
* @ingroup PROPAGATORS
* @brief propagator for symmetry handling
* @author Marc Pfetsch
* @author Thomas Rehn
* @author Christopher Hojny
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_SYMMETRY_H_
#define __SCIP_PROP_SYMMETRY_H_
#include
<scip/scip.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#include
<symmetry/type_symmetry.h>
/** include symmetry propagator */
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropSymmetry
(
SCIP
*
scip
/**< SCIP data structure */
);
/** return currently available symmetry group information */
SCIP_EXPORT
SCIP_RETCODE
SCIPgetSymmetry
(
SCIP
*
scip
,
/**< SCIP data structure */
int
*
npermvars
,
/**< pointer to store number of variables for permutations */
SCIP_VAR
***
permvars
,
/**< pointer to store variables on which permutations act */
SCIP_HASHMAP
**
permvarmap
,
/**< pointer to store hash map of permvars (or NULL) */
int
*
nperms
,
/**< pointer to store number of permutations */
int
***
perms
,
/**< pointer to store permutation generators as (nperms x npermvars) matrix (or NULL)*/
int
***
permstrans
,
/**< pointer to store permutation generators as (npermvars x nperms) matrix (or NULL)*/
SCIP_Real
*
log10groupsize
,
/**< pointer to store log10 of group size (or NULL) */
SCIP_Bool
*
binvaraffected
,
/**< pointer to store whether binary variables are affected */
int
**
components
,
/**< pointer to store components of symmetry group (or NULL) */
int
**
componentbegins
,
/**< pointer to store begin positions of components in components array (or NULL) */
int
**
vartocomponent
,
/**< pointer to store assignment from variable to its component (or NULL) */
int
*
ncomponents
/**< pointer to store number of components (or NULL) */
);
/** return whether orbital fixing is enabled */
SCIP_EXPORT
SCIP_Bool
SCIPisOrbitalfixingEnabled
(
SCIP
*
scip
/**< SCIP data structure */
);
/** return number of the symmetry group's generators */
SCIP_EXPORT
int
SCIPgetSymmetryNGenerators
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_sync.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 prop_sync.h
* @ingroup PROPAGATORS
* @brief propagator for applying global bound changes that were communicated by other
* concurrent solvers
* @author Leona Gottwald
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_SYNC_H__
#define __SCIP_PROP_SYNC_H__
#include
"scip/def.h"
#include
"scip/type_lp.h"
#include
"scip/type_prop.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#include
"scip/type_var.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the sync propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropSync
(
SCIP
*
scip
/**< SCIP data structure */
);
/**@addtogroup PROPAGATORS
*
* @{
*/
/** adds a boundchange to the sync propagator */
SCIP_EXPORT
SCIP_RETCODE
SCIPpropSyncAddBndchg
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_PROP
*
prop
,
/**< sync propagator */
SCIP_VAR
*
var
,
/**< variable for bound */
SCIP_Real
val
,
/**< value of bound */
SCIP_BOUNDTYPE
bndtype
/**< type of bound */
);
/** gives the total number of tightened bounds found by the sync propagator */
SCIP_EXPORT
SCIP_Longint
SCIPpropSyncGetNTightenedBnds
(
SCIP_PROP
*
prop
/**< sync propagator */
);
/** gives the total number of tightened bounds for integer variables found by the sync propagator */
SCIP_EXPORT
SCIP_Longint
SCIPpropSyncGetNTightenedIntBnds
(
SCIP_PROP
*
prop
/**< sync propagator */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_vbounds.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 prop_vbounds.h
* @ingroup PROPAGATORS
* @brief variable upper and lower bound propagator
* @author Stefan Heinz
* @author Jens Schulz
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_VBOUNDS_H__
#define __SCIP_PROP_VBOUNDS_H__
#include
"scip/def.h"
#include
"scip/type_result.h"
#include
"scip/type_retcode.h"
#include
"scip/type_scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/** creates the vbounds propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropVbounds
(
SCIP
*
scip
/**< SCIP data structure */
);
/**@addtogroup PROPAGATORS
*
* @{
*/
/** returns TRUE if the propagator has the status that all variable lower and upper bounds are propagated */
SCIP_EXPORT
SCIP_Bool
SCIPisPropagatedVbounds
(
SCIP
*
scip
/**< SCIP data structure */
);
/** performs propagation of variables lower and upper bounds */
SCIP_EXPORT
SCIP_RETCODE
SCIPexecPropVbounds
(
SCIP
*
scip
,
/**< SCIP data structure */
SCIP_Bool
force
,
/**< should domain changes for continuous variables be forced */
SCIP_RESULT
*
result
/**< pointer to store result */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/prop_xyz.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 prop_xyz.h
* @ingroup PROPAGATORS
* @brief xyz propagator
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROP_XYZ_H__
#define __SCIP_PROP_XYZ_H__
#include
"scip/scip.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PROPAGATORS
*
* @{
*/
/* TODO place other public methods in this group to facilitate navigation through the documentation */
/** @} */
/** creates the xyz propagator and includes it in SCIP
*
* @ingroup PropagatorIncludes
*/
SCIP_EXPORT
SCIP_RETCODE
SCIPincludePropXyz
(
SCIP
*
scip
/**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
libs/or-tools-src-ubuntu/include/scip/pub_bandit.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.h
* @ingroup PublicBanditMethods
* @brief public methods for bandit algorithms
* @author Gregor Hendel
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PUB_BANDIT_H__
#define __SCIP_PUB_BANDIT_H__
#include
"scip/def.h"
#include
"scip/pub_bandit_epsgreedy.h"
#include
"scip/pub_bandit_exp3.h"
#include
"scip/pub_bandit_ucb.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**@addtogroup PublicBanditMethods
*
* @{
*/
/** select the next action */
SCIP_EXPORT
SCIP_RETCODE
SCIPbanditSelect
(
SCIP_BANDIT
*
bandit
,
/**< bandit algorithm data structure */
int
*
action
/**< pointer to store the selected action */
);
/** update the score of the selected action */
SCIP_EXPORT
SCIP_RETCODE
SCIPbanditUpdate
(
SCIP_BANDIT
*
bandit
,
/**< bandit algorithm data structure */
int
action
,
/**< index of action for which the score should be updated */
SCIP_Real
score
/**< observed gain of the i'th action */
);
/** return the name of this bandit virtual function table */
SCIP_EXPORT
const
char
*
SCIPbanditvtableGetName
(
SCIP_BANDITVTABLE
*
banditvtable
/**< virtual table for bandit algorithm */
);
/** return the random number generator of a bandit algorithm */
SCIP_EXPORT
SCIP_RANDNUMGEN
*
SCIPbanditGetRandnumgen
(
SCIP_BANDIT
*
bandit
/**< bandit algorithm data structure */
);
/** return number of actions of this bandit algorithm */
SCIP_EXPORT
int
SCIPbanditGetNActions
(
SCIP_BANDIT
*
bandit
/**< bandit algorithm data structure */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
Prev
1
…
19
20
21
22
23
24
25
26
27
Next