|
From: | Beckman, Jeffrey L (AS) |
Subject: | [Help-glpk] GLPK non-determanistic solution |
Date: | Fri, 10 Jul 2009 05:17:17 +0300 |
GLPK non-determanistic solutionHi, I am currently using the GLPK in a S-function for Simulink (Compiled using Visual Studio 2008 into MATLAB R2008a). I am having problems with the solution being repeatable. Even with the same input to the solver, the glpk solver is giving different outputs each time. I searched in the documentation for any signs of a random seed and found none in the options. I was wondering what would cause this to happen. Here is the options being passed in one of the simulations: glp_set_obj_dir (lp, GLP_MIN); glp_init_smcp( sParam); sParam.meth = GLP_DUALP; sParam.pricing = GLP_PT_PSE; sParam.tol_bnd = 1e-7; sParam.tol_dj = 1e-7; sParam.tol_piv = 1e-9; sParam.obj_ll = -DBL_MAX; sParam.obj_ul = DBL_MAX; sParam.it_lim = INT_MAX; sParam.presolve=GLP_ON; glp_init_iocp( parm); parm.presolve = GLP_ON; A: 0 1 2 3 4 5 6 7 8 9 10 11 12 0: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 1: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 2: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 3: 0.0 -1511.0 8575.0 -5098.0 0.0 1516.0 -8573.0 5098.0 0.0 0.0 -1.0 0.0 0.0 4: -367.0 0.0 -6982.0 8702.0 -367.0 0.0 -6982.0 8702.0 -367.0 -367.0 0.0 -1.0 0.0 5: 14675.0 -11597.0 -6982.0 -8702.0 -14675.0 11597.0 6982.0 8702.0 -14675.0 14675.0 0.0 0.0 -1.0 6: -0.0 1511.0 -8575.0 5098.0 -0.0 -1516.0 8573.0 -5098.0 -0.0 -0.0 -1.0 0.0 0.0 7: 367.0 -0.0 6982.0 -8702.0 367.0 -0.0 6982.0 -8702.0 367.0 367.0 0.0 -1.0 0.0 8: -14675.0 11597.0 6982.0 8702.0 14675.0 -11597.0 -6982.0 -8702.0 14675.0 -14675.0 0.0 0.0 -1.0 9: -0.0 1511.0 -8575.0 5098.0 -0.0 -1516.0 8573.0 -5098.0 -0.0 -0.0 0.0 0.0 0.0 10: 367.0 -0.0 6982.0 -8702.0 367.0 -0.0 6982.0 -8702.0 367.0 367.0 0.0 0.0 0.0 11: 14675.0 -11597.0 -6982.0 -8702.0 -14675.0 11597.0 6982.0 8702.0 -14675.0 14675.0 0.0 0.0 0.0 Any help or insight would be great. Thanks -Jeffrey
Hi,
I am currently using the GLPK in a S-function for Simulink (Compiled using Visual Studio 2008 into MATLAB R2008a). I am having problems with the solution being repeatable. Even with the same input to the solver, the glpk solver is giving different outputs each time. I searched in the documentation for any signs of a random seed and found none in the options. I was wondering what would cause this to happen.
Here is the options being passed in one of the simulations:
glp_set_obj_dir (lp, GLP_MIN);
glp_init_smcp(&sParam);
sParam.meth = GLP_DUALP;
sParam.pricing = GLP_PT_PSE;
sParam.tol_bnd = 1e-7;
sParam.tol_dj = 1e-7;
sParam.tol_piv = 1e-9;
sParam.obj_ll = -DBL_MAX;
sParam.obj_ul = DBL_MAX;
sParam.it_lim = INT_MAX;
sParam.presolve=GLP_ON;
glp_init_iocp(&parm);
parm.presolve = GLP_ON;
A:
0 1 2 3 4 5 6 7 8 9 10 11 12
0: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0
1: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0
2: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0
3: 0.0 -1511.0 8575.0 -5098.0 0.0 1516.0 -8573.0 5098.0 0.0 0.0 -1.0 0.0 0.0
4: -367.0 0.0 -6982.0 8702.0 -367.0 0.0 -6982.0 8702.0 -367.0 -367.0 0.0 -1.0 0.0
5: 14675.0 -11597.0 -6982.0 -8702.0 -14675.0 11597.0 6982.0 8702.0 -14675.0 14675.0 0.0 0.0 -1.0
6: -0.0 1511.0 -8575.0 5098.0 -0.0 -1516.0 8573.0 -5098.0 -0.0 -0.0 -1.0 0.0 0.0
7: 367.0 -0.0 6982.0 -8702.0 367.0 -0.0 6982.0 -8702.0 367.0 367.0 0.0 -1.0 0.0
8: -14675.0 11597.0 6982.0 8702.0 14675.0 -11597.0 -6982.0 -8702.0 14675.0 -14675.0 0.0 0.0 -1.0
9: -0.0 1511.0 -8575.0 5098.0 -0.0 -1516.0 8573.0 -5098.0 -0.0 -0.0 0.0 0.0 0.0
10: 367.0 -0.0 6982.0 -8702.0 367.0 -0.0 6982.0 -8702.0 367.0 367.0 0.0 0.0 0.0
11: 14675.0 -11597.0 -6982.0 -8702.0 -14675.0 11597.0 6982.0 8702.0 -14675.0 14675.0 0.0 0.0 0.0
Any help or insight would be great.
Thanks
-Jeffrey
[Prev in Thread] | Current Thread | [Next in Thread] |