Skip to content
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_repair.h
* @ingroup PRIMALHEURISTICS
* @brief repair primal heuristic
* @author Gregor Hendel
* @author Thomas Nagel
*
* repair is a large neighborhood search heuristic, which starts with an infeasible solution and tries to repair it.
This can happen by variable fixing as long as the sum of all potential possible shiftings
is higher than alpha*slack or slack variables with a strong penalty on the objective function.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_REPAIR_H__
#define __SCIP_HEUR_REPAIR_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the repair primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurRepair(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_rins.h
* @ingroup PRIMALHEURISTICS
* @brief LNS heuristic that combines the incumbent with the LP optimum
* @author Timo Berthold
*
* RINS is a large neighborhood search improvement heuristic, i.e., it requires a known feasible solution. It solves a
* sub-SCIP that is created by fixing variables which take the same value in the incumbent and the current node's LP
* relaxation.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_RINS_H__
#define __SCIP_HEUR_RINS_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates RINS primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurRins(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_rootsoldiving.h
* @ingroup PRIMALHEURISTICS
* @brief LP diving heuristic that changes variables' objective values using root LP solution as guide
* @author Kati Wolter
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_ROOTSOLDIVING_H__
#define __SCIP_HEUR_ROOTSOLDIVING_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the rootsoldiving heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurRootsoldiving(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_rounding.h
* @ingroup PRIMALHEURISTICS
* @brief LP rounding heuristic that tries to recover from intermediate infeasibilities
* @author Tobias Achterberg
*
* Rounding heuristic that starts from an LP-feasible point and reduces the number of fractional variables by one in
* each step. As long as no LP row is violated, the algorithm iterates over the fractional variables and applies a
* rounding into the direction of fewer locks, updating the activities of the LP rows after each step. If there is a
* violated LP row, the heuristic will try to find a fractional variable that can be rounded in a direction such that
* the violation of the constraint is decreased, using the number of up- and down-locks as a tie breaker. If no
* rounding can decrease the violation of the constraint, the procedure is aborted.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_ROUNDING_H__
#define __SCIP_HEUR_ROUNDING_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the rounding heuristic with infeasibility recovering and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurRounding(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_shiftandpropagate.h
* @ingroup PRIMALHEURISTICS
* @brief preroot heuristic that alternatingly fixes variables and propagates domains
* @author Timo Berthold
* @author Gregor Hendel
*
* Preroot primal heuristic that fixes variables and propagates these fixings. In each step, the heuristic fixes a
* variable such that the number of violated LP rows gets maximally reduced. The fixing is then propagated to reduce
* further variable domains. In case that the domain propagation detects the infeasibility of the current partial
* solution, the domain is reset to its previous state and the variable is postponed.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_SHIFTANDPROPAGATE_H__
#define __SCIP_HEUR_SHIFTANDPROPAGATE_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the shiftandpropagate primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurShiftandpropagate(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_shifting.h
* @ingroup PRIMALHEURISTICS
* @brief LP rounding heuristic that tries to recover from intermediate infeasibilities and shifts continuous variables
* @author Tobias Achterberg
*
* This heuristic is similar to the Rounding heuristic (see @ref heur_rounding.h), but it tries to continue in the case
* that no rounding can decrease the violation of a linear constraint. In this case, the value of a continuous variable
* or an integer variable with integral value will be shifted in order to decrease the violation of the constraint. To
* avoid cycling, the procedure terminates after a certain number of non-improving shifts.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_SHIFTING_H__
#define __SCIP_HEUR_SHIFTING_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the shifting heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurShifting(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_simplerounding.h
* @ingroup PRIMALHEURISTICS
* @brief Simple and fast LP rounding heuristic
* @author Tobias Achterberg
*
* Simple rounding is a very cheap heuristic that iterates over the set of fractional variables of an LP-feasible
* point. It only performs roundings for variable that have zero up- or downlocks. Hence, they are guaranteed to keep
* all constraints satisfied. If all fractional variables can be rounded that way, the resulting solution will bve
* integral and LP-feasible.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_SIMPLEROUNDING_H__
#define __SCIP_HEUR_SIMPLEROUNDING_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the simple rounding heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurSimplerounding(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_subnlp.h
* @ingroup PRIMALHEURISTICS
* @brief NLP local search primal heuristic using sub-SCIPs
* @author Stefan Vigerske
*
* This heuristic applies a NLP local search to a nonlinear CIP after fixing all discrete variables.
* That is, the CIP is copied, all discrete variables are fixed, presolving is applied,
* and if the resulting CIP has a nonlinear relaxation, then it is tried to solve this relaxation
* by an NLP solver.
* The heuristic only runs if continuous nonlinearities are present (@ref SCIPhasNLPContinuousNonlinearity()).
*
* Fixing values for discrete values are either taken from a solution of the LP relaxation which
* satisfies all integrality constraints, or are provided by SCIPupdateStartpointHeurSubNlp().
*
* This heuristic is orthogonal to the undercover heuristic (@ref heur_undercover.h), which fixes
* variables in a nonlinear CIP in a way that a (possibly mixed-integer) linear subproblem is obtained.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef HEUR_SUBNLP_H_
#define HEUR_SUBNLP_H_
#include "scip/def.h"
#include "scip/type_heur.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_sol.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the NLP local search primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurSubNlp(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup PRIMALHEURISTICS
*
* @{
*/
/** updates the starting point for the NLP heuristic
*
* Is called, for example, by a constraint handler that handles nonlinear constraints when a check on feasibility of a solution fails.
*/
SCIP_EXPORT
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp(
SCIP* scip, /**< SCIP data structure */
SCIP_HEUR* heur, /**< subNLP heuristic */
SCIP_SOL* solcand, /**< solution candidate */
SCIP_Real violation /**< constraint violation of solution candidate */
);
/** main procedure of the subNLP heuristic */
SCIP_EXPORT
SCIP_RETCODE SCIPapplyHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur, /**< heuristic data structure */
SCIP_RESULT* result, /**< pointer to store result of: solution found, no solution found, or fixing is infeasible (cutoff) */
SCIP_SOL* refpoint, /**< point to take fixation of discrete variables from, and startpoint for NLP solver; if NULL, then LP solution is used */
SCIP_Longint itercontingent, /**< iteration limit for NLP solver */
SCIP_Real timelimit, /**< time limit for NLP solver */
SCIP_Real minimprove, /**< desired minimal relative improvement in objective function value */
SCIP_Longint* iterused, /**< buffer to store number of iterations used by NLP solver, or NULL if not of interest */
SCIP_SOL* resultsol /**< a solution where to store found solution values, if any, or NULL if to try adding to SCIP */
);
/** for a given solution, resolves the corresponding subNLP and updates solution values for continuous variables, if NLP solution is feasible in original problem */
SCIP_EXPORT
SCIP_RETCODE SCIPresolveSolHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur, /**< heuristic data structure */
SCIP_SOL* sol, /**< solution for which to solve NLP, and where to store resolved solution values */
SCIP_Bool* success, /**< buffer where to store whether a feasible solution was found */
SCIP_Longint itercontingent, /**< iteration limit for NLP solver, or -1 for default of NLP heuristic */
SCIP_Real timelimit /**< time limit for NLP solver */
);
/** adds all known linear constraint to the NLP, if initialized and not done already
* This function is temporary and will hopefully become obsolete in the near future.
*/
SCIP_EXPORT
SCIP_RETCODE SCIPaddLinearConsToNlpHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur, /**< heuristic data structure */
SCIP_Bool addcombconss, /**< whether to add combinatorial linear constraints, i.e., linear constraints that involve only discrete variables */
SCIP_Bool addcontconss /**< whether to add continuous linear constraints, i.e., linear constraints that involve not only discrete variables */
);
/** gets sub-SCIP used by NLP heuristic, or NULL if none */
SCIP_EXPORT
SCIP* SCIPgetSubScipHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur /**< heuristic data structure */
);
/** gets mapping of SCIP variables to sub-SCIP variables */
SCIP_EXPORT
SCIP_VAR** SCIPgetVarMappingScip2SubScipHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur /**< heuristic data structure */
);
/** gets mapping of sub-SCIP variables to SCIP variables */
SCIP_EXPORT
SCIP_VAR** SCIPgetVarMappingSubScip2ScipHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur /**< heuristic data structure */
);
/** gets startpoint candidate to be used in next call to NLP heuristic, or NULL if none */
SCIP_EXPORT
SCIP_SOL* SCIPgetStartCandidateHeurSubNlp(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur /**< heuristic data structure */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif /*HEUR_SUBNLP_H_*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* 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 heur_sync.h
* @ingroup PRIMALHEURISTICS
* @brief primal heuristic that adds given solutions
* @author Leona Gottwald
*
* This heuristic takes solutions from somewhere else via the function SCIPheurSyncPassSol(). It
* then tries to commit this solution. It is used by the concurrent solvers, when solutions are
* communicated between solvers, but cannot directly submitted because SCIP might be in a stage where
* this is not allowed.
* If multiple solutions are passed it will keep the best N solutions depending on the parameter setting
* "concsolvers/sync/maxnsols"
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_SYNC_H__
#define __SCIP_HEUR_SYNC_H__
#include "scip/def.h"
#include "scip/type_sol.h"
#include "scip/type_scip.h"
#include "scip/type_heur.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the sync primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurSync(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup PRIMALHEURISTICS
*
* @{
*/
/** pass solution to sync heuristic */
SCIP_EXPORT
SCIP_RETCODE SCIPheurSyncPassSol(
SCIP* scip, /**< SCIP data structure */
SCIP_HEUR* heur, /**< sync heuristic */
SCIP_SOL* sol /**< solution to be passed */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_trivial.h
* @ingroup PRIMALHEURISTICS
* @brief trivial primal heuristic
* @author Timo Berthold
*
* pre-root heuristic that tries some trivial (but often feasibile) solutions: all variables at their upper bounds, all
* variables at their lower bounds, all variables zero, all variables at the bound with the fewer locks. This will,
* e.g., find a start solution for all pure set covering or set packing problems.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_TRIVIAL_H__
#define __SCIP_HEUR_TRIVIAL_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the trivial primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurTrivial(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_trivialnegation.h
* @ingroup PRIMALHEURISTICS
* @brief trivialnegation primal heuristic
* @author Jakob Witzig
*
* template file for primal heuristic plugins
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_TRIVIALNEGATION_H__
#define __SCIP_HEUR_TRIVIALNEGATION_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the trivialnegation primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurTrivialnegation(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_trustregion.h
* @ingroup PRIMALHEURISTICS
* @brief Large neighborhood search heuristic for Benders' decomposition based on trust region methods
* @author Stephen J. Maher
*
* The Trust Region heuristic draws upon trust region methods for solving optimization problems, especially in the
* context of Benders' decomposition. This heuristic has been developed to improve the heuristic performance of the
* Benders' decomposition algorithm within SCIP.
*
* The Trust Region heuristic copies the original SCIP instance and adds a constraint to penalize changes from the
* incumbent solution. Consider a problem that includes a set of binary variables \f$\mathcal{B}\f$. Given a feasible
* solution \f$\hat{x}\f$ to the original problem, we define the set \f$\mathcal{B}^{+}\f$ as the index set for the
* binary variables that are 1 in the input solution and \f$\mathcal{B}^{-}\f$ as the index set for binary variables
* that are 0. The trust region constraint, which is added to the sub-SCIP, is given by
*
* \f[
* \sum_{i \in \mathcal{B}^{+}}(1 - x_{i}) + \sum_{i \in \mathcal{B}^{-}}x_{i} \le \theta
* \f]
*
* The variable \f$\theta\f$ measure the distance, in terms of the binary variables, of candidate solutions to the input
* solution.
*
* In addition, an upper bounding constraint is explicitly added to enforce a minimum improvement from the heuristic,
* given by \f$f(x) \le f(\hat{x}) - \epsilon\f$. The parameter \f$\epsilon \ge 0\f$ denotes the minimum improvement
* that must be achieved by the heuristic.
*
* The objective function is then modified to \f$f(x) + M\theta\f$, where \f$M\f$ is a parameter for penalizing the
* distance of solutions from the input solution \f$\hat{x}\f$.
*
* If a new incumbent solution is found by this heuristic, then the Trust Region heuristic is immediately
* re-executed with this new incumbent solution.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_TRUSTREGION_H__
#define __SCIP_HEUR_TRUSTREGION_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates local branching primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurTrustregion(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_trysol.h
* @ingroup PRIMALHEURISTICS
* @brief primal heuristic that tries a given solution
* @author Marc Pfetsch
*
* This heuristic takes a solution from somewhere else via the function SCIPheurPassSolTrySol(). It
* then tries to commit this solution. It is mainly used by cons_indicator, which tries to correct a
* given solution, but cannot directly submit this solution, because it is a constraint handler and
* not a heuristic.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_TRYSOL_H__
#define __SCIP_HEUR_TRYSOL_H__
#include "scip/def.h"
#include "scip/type_heur.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_sol.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the trysol primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurTrySol(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup PRIMALHEURISTICS
*
* @{
*/
/** pass solution to trysol heuristic */
SCIP_EXPORT
SCIP_RETCODE SCIPheurPassSolTrySol(
SCIP* scip, /**< SCIP data structure */
SCIP_HEUR* heur, /**< trysol heuristic */
SCIP_SOL* sol /**< solution to be passed */
);
/** pass solution to trysol heuristic which just gets added (without checking feasibility */
SCIP_EXPORT
SCIP_RETCODE SCIPheurPassSolAddSol(
SCIP* scip, /**< SCIP data structure */
SCIP_HEUR* heur, /**< trysol heuristic */
SCIP_SOL* sol /**< solution to be passed */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_twoopt.h
* @ingroup PRIMALHEURISTICS
* @brief Primal heuristic to improve incumbent solution by flipping pairs of variables
* @author Timo Berthold
* @author Gregor Hendel
*
* The Twoopt heuristic attempts to improve a feasible MIP solution by altering the solution values of pairs of
* variables. Only variables which share a pre-defined ratio of LP rows are considered as pairs. Each step of the
* heuristic consists of improving the objective value by shifting one variable, and then compensating the resulting
* infeasibilities by shifting a second variable, without completely losing the objective improvement. Similarly to
* Oneopt (see @ref heur_oneopt.h), pairs are processed in non-decreasing order of their impact on the objective.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_TWOOPT_H__
#define __SCIP_HEUR_TWOOPT_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the twoopt primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurTwoopt(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_undercover.h
* @ingroup PRIMALHEURISTICS
* @brief Undercover primal heuristic for MINLPs
* @author Timo Berthold
* @author Ambros Gleixner
*
* The undercover heuristic is designed for mixed-integer nonlinear programs and tries to fix a subset of variables such
* as to make each constraint linear or convex. For this purpose it solves a binary program to automatically determine
* the minimum number of variable fixings necessary. As fixing values, we use values from the LP relaxation, the NLP
* relaxation, or the incumbent solution.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_UNDERCOVER_H__
#define __SCIP_HEUR_UNDERCOVER_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
/** creates the undercover primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurUndercover(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup PRIMALHEURISTICS
*
* @{
*/
/** computes a minimal set of covering variables */
SCIP_EXPORT
SCIP_RETCODE SCIPcomputeCoverUndercover(
SCIP* scip, /**< SCIP data structure */
int* coversize, /**< size of the computed cover */
SCIP_VAR** cover, /**< pointer to store the variables (of the original SCIP) in the computed cover
* (should be ready to hold SCIPgetNVars(scip) entries) */
SCIP_Real timelimit, /**< time limit */
SCIP_Real memorylimit, /**< memory limit */
SCIP_Real objlimit, /**< objective limit: upper bound on coversize */
SCIP_Bool globalbounds, /**< should global bounds on variables be used instead of local bounds at focus node? */
SCIP_Bool onlyconvexify, /**< should we only fix/dom.red. variables creating nonconvexity? */
SCIP_Bool coverbd, /**< should bounddisjunction constraints be covered (or just copied)? */
char coveringobj, /**< objective function of the covering problem ('b'ranching status,
* influenced nonlinear 'c'onstraints/'t'erms, 'd'omain size, 'l'ocks,
* 'm'in of up/down locks, 'u'nit penalties, constraint 'v'iolation) */
SCIP_Bool* success /**< feasible cover found? */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_vbounds.h
* @ingroup PRIMALHEURISTICS
* @brief LNS heuristic uses the variable lower and upper bounds to determine the search neighborhood
* @author Timo Berthold
* @author Stefan Heinz
* @author Jens Schulz
* @author Gerald Gamrath
*
* More details about the heuristic can be found in "Structure-Based Primal Heuristics for Mixed Integer Programming"
* by Gamrath, Berthold, Heinz, Winkler: http://link.springer.com/chapter/10.1007%2F978-4-431-55420-2_3
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_VBOUNDS_H__
#define __SCIP_HEUR_VBOUNDS_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the variable bounds primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurVbounds(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_veclendiving.h
* @ingroup PRIMALHEURISTICS
* @brief LP diving heuristic that rounds variables with long column vectors
* @author Tobias Achterberg
*
* Diving heuristic: Iteratively fixes some fractional variable and resolves the LP-relaxation, thereby simulating a
* depth-first-search in the tree. Vectorlength Diving chooses the variable with the smallest ratio of potential
* objective change and number of affected constraints and fixes it. One-level backtracking is applied: If the LP gets
* infeasible, the last fixings is undone, and the opposite fixing is tried. If this is infeasible, too, the procedure
* aborts.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_VECLENDIVING_H__
#define __SCIP_HEUR_VECLENDIVING_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the veclendiving heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurVeclendiving(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_xyz.h
* @ingroup PRIMALHEURISTICS
* @brief xyz primal heuristic
* @author Tobias Achterberg
*
* template file for primal heuristic plugins
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_XYZ_H__
#define __SCIP_HEUR_XYZ_H__
#include "scip/scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the xyz primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurXyz(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_zeroobj.h
* @ingroup PRIMALHEURISTICS
* @brief heuristic that tries to solve the problem without objective. In Gurobi, this heuristic is known as "Hail Mary"
* @author Timo Berthold
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_ZEROOBJ_H__
#define __SCIP_HEUR_ZEROOBJ_H__
#include "scip/def.h"
#include "scip/type_heur.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the zeroobj primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurZeroobj(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup PRIMALHEURISTICS
*
* @{
*/
/** main procedure of the zeroobj heuristic, creates and solves a sub-SCIP */
SCIP_EXPORT
SCIP_RETCODE SCIPapplyZeroobj(
SCIP* scip, /**< original SCIP data structure */
SCIP_HEUR* heur, /**< heuristic data structure */
SCIP_RESULT* result, /**< result data structure */
SCIP_Real minimprove, /**< factor by which zeroobj should at least improve the incumbent */
SCIP_Longint nnodes /**< node limit for the subproblem */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file heur_zirounding.h
* @ingroup PRIMALHEURISTICS
* @brief ZI Round primal heuristic
* @author Gregor Hendel
*
* ZI Round (C. Wallace, Journal of Heuristics 2009) reduces the integer infeasibility of an LP solution step-by-step by
* shifting fractional values towards integrality, but not necessarily rounding them. For each integer variable with
* fractional solution value, the heuristic calculates bounds for both possible rounding directions such that the
* obtained solution stays LP-feasible. The solution value is then shifted by the corresponding bound into the direction
* which reduces the fractionality most.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_HEUR_ZIROUNDING_H__
#define __SCIP_HEUR_ZIROUNDING_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** creates the zirounding primal heuristic and includes it in SCIP
*
* @ingroup PrimalHeuristicIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeHeurZirounding(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif