Detailed Description
public methods for solutions
Definition in file scip_sol.c.
#include <ctype.h>
#include <stdarg.h>
#include <assert.h>
#include <string.h>
#include <strings.h>
#include "lpi/lpi.h"
#include "nlpi/exprinterpret.h"
#include "nlpi/nlpi.h"
#include "scip/benders.h"
#include "scip/benderscut.h"
#include "scip/branch.h"
#include "scip/branch_nodereopt.h"
#include "scip/clock.h"
#include "scip/compr.h"
#include "scip/concsolver.h"
#include "scip/concurrent.h"
#include "scip/conflict.h"
#include "scip/conflictstore.h"
#include "scip/cons.h"
#include "scip/cons_linear.h"
#include "scip/cutpool.h"
#include "scip/cuts.h"
#include "scip/debug.h"
#include "scip/def.h"
#include "scip/dialog.h"
#include "scip/dialog_default.h"
#include "scip/disp.h"
#include "scip/event.h"
#include "scip/heur.h"
#include "scip/heur_ofins.h"
#include "scip/heur_reoptsols.h"
#include "scip/heur_trivialnegation.h"
#include "scip/heuristics.h"
#include "scip/history.h"
#include "scip/implics.h"
#include "scip/interrupt.h"
#include "scip/lp.h"
#include "scip/mem.h"
#include "scip/message_default.h"
#include "scip/misc.h"
#include "scip/nlp.h"
#include "scip/nodesel.h"
#include "scip/paramset.h"
#include "scip/presol.h"
#include "scip/presolve.h"
#include "scip/pricer.h"
#include "scip/pricestore.h"
#include "scip/primal.h"
#include "scip/prob.h"
#include "scip/prop.h"
#include "scip/reader.h"
#include "scip/relax.h"
#include "scip/reopt.h"
#include "scip/retcode.h"
#include "scip/scipbuildflags.h"
#include "scip/scipcoreplugins.h"
#include "scip/scipgithash.h"
#include "scip/sepa.h"
#include "scip/sepastore.h"
#include "scip/set.h"
#include "scip/sol.h"
#include "scip/solve.h"
#include "scip/stat.h"
#include "scip/syncstore.h"
#include "scip/table.h"
#include "scip/tree.h"
#include "scip/var.h"
#include "scip/visual.h"
#include "xml/xml.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_general.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_var.h"
#include "scip/pub_cons.h"
#include "scip/pub_fileio.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/struct_scip.h"
Go to the source code of this file.
Function Documentation
◆ checkSolOrig()
|
static |
checks solution for feasibility in original problem without adding it to the solution store; to improve the performance we use the following order when checking for violations:
- variable bounds
- constraint handlers with positive or zero priority that don't need constraints (e.g. integral constraint handler)
- original constraints
- constraint handlers with negative priority that don't need constraints (e.g. Benders' decomposition constraint handler)
- Parameters
-
scip SCIP data structure sol primal CIP solution feasible stores whether given solution is feasible printreason Should the reason for the violation be printed? completely Should all violations be checked if printreason is true? checkbounds Should the bounds of the variables be checked? checkintegrality Has integrality to be checked? checklprows Do constraints represented by rows in the current LP have to be checked? checkmodifiable have modifiable constraint to be checked?
Definition at line 150 of file scip_sol.c.
References SCIP_Set::conshdlrs, SCIP_Prob::conss, FALSE, h, Scip::mem, Scip::messagehdlr, SCIP_Set::nconshdlrs, SCIP_Prob::nconss, NULL, SCIP_Prob::nvars, Scip::origprob, SCIP_Mem::probmem, SCIP_CALL, SCIP_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIPcheckStage(), SCIPconsCheck(), SCIPconshdlrCheck(), SCIPconshdlrGetCheckPriority(), SCIPconshdlrNeedsCons(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPmessagePrintInfo(), SCIPrelDiff(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsolGetVal(), SCIPsolResetViolations(), SCIPupdateSolBoundViolation(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetUbOriginal(), Scip::set, Scip::stat, TRUE, and SCIP_Prob::vars.
Referenced by SCIPcheckSol(), SCIPcheckSolOrig(), SCIPtrySol(), and SCIPtrySolFree().
◆ setupAndSolveFiniteSolSubscip()
|
static |
helper method that sets up and solves the sub-SCIP for removing infinite values from solutions
- Parameters
-
scip SCIP data structure subscip SCIP data structure of sub-SCIP origvars original problem variables of main SCIP norigvars number of original problem variables of main SCIP solvals array with solution values of variables; infinite ones are replaced success pointer to store if removing infinite values was successful
Definition at line 747 of file scip_sol.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VERBLEVEL_NONE, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPblkmem(), SCIPchgVarObj(), SCIPchgVarType(), SCIPcopyOrig(), SCIPcreateConsBasicLinear(), SCIPcreateVar(), SCIPfixVar(), SCIPgetBestSol(), SCIPgetSolVal(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPinfinity(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisInfinity(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsetIntParam(), SCIPsnprintf(), SCIPsolve(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIPcreateFiniteSolCopy().
◆ printDualSol()
|
static |
outputs dual solution from LP solver to file stream
- Parameters
-
scip SCIP data structure file output file (or NULL for standard output) printzeros should variables set to zero be printed?
Definition at line 2075 of file scip_sol.c.
References SCIP_Prob::conss, SCIP_Lp::dualfeasible, Scip::lp, Scip::messagehdlr, SCIP_Prob::nconss, NULL, Scip::origprob, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetName(), SCIPgetDualSolVal(), SCIPisInfinity(), SCIPisZero(), SCIPmessageFPrintInfo(), and SCIP_Lp::solved.
Referenced by SCIPprintDualSol().
◆ readSolFile()
|
static |
reads a given solution file and store the solution values in the given solution pointer
- Parameters
-
scip SCIP data structure filename name of the input file sol solution pointer partial pointer to store if the solution is partial (or NULL, if not needed) error pointer store if an error occured
Definition at line 2613 of file scip_sol.c.
References FALSE, TimInput::lineno, NULL, SCIP_Prob::nvars, Scip::origprob, SCIP_Bool, SCIP_CALL, SCIP_CALL_FINALLY, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_NOFILE, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_UNKNOWN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIP_VERBLEVEL_NORMAL, SCIPerrorMessage, SCIPfclose(), SCIPfeof(), SCIPfgets(), SCIPfindVar(), SCIPfopen(), SCIPgetStage(), SCIPinfinity(), SCIPisTransformed(), SCIPprintSysError(), SCIPsetSolVal(), SCIPsolIsPartial(), SCIPsolMarkPartial(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPverbMessage(), Scip::set, Scip::stat, TRUE, and SCIP_Prob::vars.
Referenced by SCIPreadSolFile().
◆ readXmlSolFile()
|
static |
reads a given xml solution file and store the solution values in the given solution pointer
- Parameters
-
scip SCIP data structure filename name of the input file sol solution pointer partial pointer to store if the solution is partial (or NULL if not needed) error pointer store if an error occured
Definition at line 2769 of file scip_sol.c.
References FALSE, NULL, SCIP_Prob::nvars, Scip::origprob, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_READERROR, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_UNKNOWN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIP_VERBLEVEL_NORMAL, SCIPerrorMessage, SCIPfindVar(), SCIPgetStage(), SCIPinfinity(), SCIPisTransformed(), SCIPsetSolVal(), SCIPsolIsPartial(), SCIPsolMarkPartial(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPverbMessage(), SCIPwarningMessage(), Scip::set, Scip::stat, TRUE, SCIP_Prob::vars, xmlFindNodeMaxdepth(), xmlFirstChild(), xmlFreeNode(), xmlGetAttrval(), xmlNextSibl(), and xmlProcess().
Referenced by SCIPreadSolFile().