|
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
heur_indicator.c
Go to the documentation of this file.
17 * @brief handle partial solutions for linear problems with indicators and otherwise continuous variables
20 * For linear problems with indicators and otherwise continuous variables, the indicator constraint handler can produce
21 * partial solutions, i.e., values for the indicator variables. This partial solution can be passed to this heuristic,
22 * which then fixes these values and solves an LP. Additionally a local search for a better solution is added.
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 #define HEUR_DESC "indicator heuristic to create feasible solutions from values for indicator variables"
177 SCIPdebugMessage("One-opt found solution candidate with value %g.\n", SCIPgetSolTransObj(scip, sol));
187 SCIPdebugMessage("Finished one-opt (tried variables: %d, found sols: %d).\n", cnt, *nfoundsols);
218 SCIPdebugMessage("Trying to generate feasible solution with indicators from solution candidate ...\n");
236 /* Fix binary variables not in cover to 1 and corresponding slack variables to 0. The other binary variables are fixed to 0. */
412 /* The heuristic will only be successful if there are no integral variables and no binary variables except the
417 SCIP_CALL( trySolCandidate(scip, heur, heurdata, heurdata->nindconss, heurdata->indconss, heurdata->solcand, &nfoundsols) );
449 /* The heuristic will only be successful if there are no integral variables and no binary variables except the
451 if ( SCIPgetNIntVars(scip) > 0 || SCIPconshdlrGetNConss(heurdata->indicatorconshdlr) < SCIPgetNBinVars(scip) )
481 SCIPdebugMessage("Trying to improve best solution of value %f.\n", SCIPgetSolOrigObj(scip, bestsol) );
SCIP_RETCODE SCIPsolveProbingLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff) Definition: scip.c:32398 Definition: type_result.h:33 SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name) Definition: scip.c:5847 Definition: type_result.h:47 Definition: struct_scip.h:53 SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy))) Definition: scip.c:7266 SCIP_RETCODE SCIPbacktrackProbing(SCIP *scip, int probingdepth) Definition: scip.c:31860 void SCIPwarningMessage(SCIP *scip, const char *formatstr,...) Definition: scip.c:1220 SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr) Definition: cons.c:4262 Definition: struct_var.h:196 constraint handler for indicator constraints SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, unsigned int timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata) Definition: scip.c:7221 SCIP_VAR * SCIPgetBinaryVarIndicator(SCIP_CONS *cons) Definition: cons_indicator.c:7274 SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound) Definition: scip.c:32162 SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored) Definition: scip.c:35909 SCIP_RETCODE SCIPheurPassIndicator(SCIP *scip, SCIP_HEUR *heur, int nindconss, SCIP_CONS **indconss, SCIP_Bool *solcand) Definition: heur_indicator.c:546 SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var) Definition: scip.c:34593 Definition: struct_sol.h:50 SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: scip.c:3516 Definition: type_result.h:35 Definition: struct_cons.h:36 #define SCIPfreeBlockMemoryArrayNull(scip, ptr, num) Definition: scip.h:20403 Definition: struct_cons.h:116 SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur) Definition: scip.c:33612 Definition: type_retcode.h:33 handle partial solutions for linear problems with indicators and otherwise continuous variables ... Definition: struct_heur.h:75 void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata) Definition: heur.c:1068 Definition: type_lp.h:34 SCIP_RETCODE SCIPincludeHeurIndicator(SCIP *scip) Definition: heur_indicator.c:503 SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit))) Definition: scip.c:7298 static SCIP_RETCODE tryOneOpt(SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, int nindconss, SCIP_CONS **indconss, SCIP_Bool *solcand, int *nfoundsols) Definition: heur_indicator.c:65 SCIP_RETCODE SCIPchgVarUbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:31962 SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree))) Definition: scip.c:7282 SCIP_RETCODE SCIPchgVarLbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:31928 #define SCIPduplicateBlockMemoryArray(scip, ptr, source, num) Definition: scip.h:20397 static SCIP_RETCODE trySolCandidate(SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, int nindconss, SCIP_CONS **indconss, SCIP_Bool *solcand, int *nfoundsols) Definition: heur_indicator.c:195 SCIP callable library. SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros) Definition: scip.c:35007 |