Scippy

SCIP

Solving Constraint Integer Programs

heur_subnlp.h File Reference

Detailed Description

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 (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 (heur_undercover.h), which fixes variables in a nonlinear CIP in a way that a (possibly mixed-integer) linear subproblem is obtained.

Definition in file heur_subnlp.h.

#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeHeurSubNlp (SCIP *scip)
 
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp (SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *solcand, SCIP_Real violation)
 
SCIP_RETCODE SCIPapplyHeurSubNlp (SCIP *scip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_SOL *refpoint, SCIP_Longint itercontingent, SCIP_Real timelimit, SCIP_Real minimprove, SCIP_Longint *iterused)
 
SCIP_RETCODE SCIPresolveSolHeurSubNlp (SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol, SCIP_Bool *success, SCIP_Longint itercontingent, SCIP_Real timelimit)
 
SCIP_RETCODE SCIPaddLinearConsToNlpHeurSubNlp (SCIP *scip, SCIP_HEUR *heur, SCIP_Bool addcombconss, SCIP_Bool addcontconss)
 
SCIPSCIPgetSubScipHeurSubNlp (SCIP *scip, SCIP_HEUR *heur)
 
SCIP_VAR ** SCIPgetVarMappingScip2SubScipHeurSubNlp (SCIP *scip, SCIP_HEUR *heur)
 
SCIP_VAR ** SCIPgetVarMappingSubScip2ScipHeurSubNlp (SCIP *scip, SCIP_HEUR *heur)
 
SCIP_SOLSCIPgetStartCandidateHeurSubNlp (SCIP *scip, SCIP_HEUR *heur)
 

Function Documentation

SCIP_RETCODE SCIPincludeHeurSubNlp ( SCIP scip)

creates the NLP local search primal heuristic and includes it in SCIP

Parameters
scipSCIP data structure
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp ( SCIP scip,
SCIP_HEUR heur,
SCIP_SOL solcand,
SCIP_Real  violation 
)

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.

Parameters
scipSCIP data structure
heursubNLP heuristic
solcandsolution candidate
violationconstraint violation of solution candidate
SCIP_RETCODE SCIPapplyHeurSubNlp ( SCIP scip,
SCIP_HEUR heur,
SCIP_RESULT result,
SCIP_SOL refpoint,
SCIP_Longint  itercontingent,
SCIP_Real  timelimit,
SCIP_Real  minimprove,
SCIP_Longint iterused 
)

main procedure of the subNLP heuristic

Parameters
sciporiginal SCIP data structure
heurheuristic data structure
resultpointer to store result of: solution found, no solution found, or fixing is infeasible (cutoff)
refpointpoint to take fixation of discrete variables from, and startpoint for NLP solver; if NULL, then LP solution is used
itercontingentiteration limit for NLP solver
timelimittime limit for NLP solver
minimprovedesired minimal relative improvement in objective function value
iterusedbuffer to store number of iterations used by NLP solver, or NULL if not of interest
SCIP_RETCODE SCIPresolveSolHeurSubNlp ( SCIP scip,
SCIP_HEUR heur,
SCIP_SOL sol,
SCIP_Bool success,
SCIP_Longint  itercontingent,
SCIP_Real  timelimit 
)

for a given solution, resolves the corresponding subNLP and updates solution values for continuous variables, if NLP solution is feasible in original problem

Parameters
sciporiginal SCIP data structure
heurheuristic data structure
solsolution for which to solve NLP, and where to store resolved solution values
successbuffer where to store whether a feasible solution was found
itercontingentiteration limit for NLP solver, or -1 for default of NLP heuristic
timelimittime limit for NLP solver
SCIP_RETCODE SCIPaddLinearConsToNlpHeurSubNlp ( SCIP scip,
SCIP_HEUR heur,
SCIP_Bool  addcombconss,
SCIP_Bool  addcontconss 
)

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.

Parameters
sciporiginal SCIP data structure
heurheuristic data structure
addcombconsswhether to add combinatorial linear constraints, i.e., linear constraints that involve only discrete variables
addcontconsswhether to add continuous linear constraints, i.e., linear constraints that involve not only discrete variables
SCIP* SCIPgetSubScipHeurSubNlp ( SCIP scip,
SCIP_HEUR heur 
)

gets sub-SCIP used by NLP heuristic, or NULL if none

Parameters
sciporiginal SCIP data structure
heurheuristic data structure
SCIP_VAR** SCIPgetVarMappingScip2SubScipHeurSubNlp ( SCIP scip,
SCIP_HEUR heur 
)

gets mapping of SCIP variables to sub-SCIP variables

Parameters
sciporiginal SCIP data structure
heurheuristic data structure
SCIP_VAR** SCIPgetVarMappingSubScip2ScipHeurSubNlp ( SCIP scip,
SCIP_HEUR heur 
)

gets mapping of sub-SCIP variables to SCIP variables

Parameters
sciporiginal SCIP data structure
heurheuristic data structure
SCIP_SOL* SCIPgetStartCandidateHeurSubNlp ( SCIP scip,
SCIP_HEUR heur 
)

gets startpoint candidate to be used in next call to NLP heuristic, or NULL if none

Parameters
sciporiginal SCIP data structure
heurheuristic data structure