Simplex method routines¶
-
Problem.simplex(SimplexControls controls)¶ Solve LP problem with the simplex method
-
Problem.exact(SimplexControls controls)¶ Solve LP problem in exact arithmetic
-
Problem.get_status()¶ Retrieve generic status of basic solution
-
Problem.get_prim_stat()¶ Retrieve status of primal basic solution
-
Problem.get_dual_stat()¶ Retrieve status of dual basic solution
-
Problem.get_obj_val()¶ Retrieve objective value (basic solution)
Returns: the objective value of the basic solution Return type: float
-
Problem.get_row_stat(row)¶ Retrieve row status
Parameters: row ( intorstr) – the index or name of the rowReturns: the row status, either 'basic','lower','upper','free', or'fixed'Return type: str
-
Problem.get_row_prim(row)¶ Retrieve row primal value (basic solution)
Parameters: row ( intorstr) – the index or name of the rowReturns: the solution value Return type: float
-
Problem.get_row_dual(row)¶ Retrieve row dual value (basic solution)
Parameters: row ( intorstr) – the index or name of the rowReturns: the solution value Return type: float
-
Problem.get_col_stat(col)¶ Retrieve column status
Parameters: col ( intorstr) – the index or name of the columnReturns: the column status, either 'basic','lower','upper','free', or'fixed'Return type: str
-
Problem.get_col_prim(col)¶ Retrieve column primal value (basic solution)
Parameters: col ( intorstr) – the index or name of the columnReturns: the solution value Return type: float
-
Problem.get_col_dual(col)¶ retrieve column dual value (basic solution)
Parameters: col ( intorstr) – the index or name of the columnReturns: the solution value Return type: float
-
Problem.get_unbnd_ray(names_preferred=False)¶ Determine variable causing unboundedness
Parameters: names_preferred ( bool) – whether to return the row or column name or index
Simplex controls¶
-
class
ecyglpki.SimplexControls¶ The simplex solver control parameter object
>>> r = SimplexControls()
-
it_lim¶ Iteration limit, an
int>>> r.it_lim # the GLPK default 2147483647 >>> r.it_lim = 10 >>> r.it_lim 10
-
meth¶ The simplex method, a
strThe possible values are
'primal': two-phase primal simplex'dual': two-phase dual simplex'dual_fail_primal': two-phase dual simplex and, if it fails, switch to primal simplex
>>> r.meth # the GLPK default 'primal' >>> r.meth = 'dual_fail_primal' >>> r.meth 'dual_fail_primal'
-
msg_lev¶ The message level, a
strThe possible values are
'no': no output'warnerror': warnings and errors only'normal': normal output'full': normal output and informational messages
>>> r.msg_lev # the GLPK default 'full' >>> r.msg_lev = 'no' >>> r.msg_lev 'no'
-
obj_ll¶ Lower limit of the objective function, a
Realnumber(Used only if meth is
'dual'.)>>> r.obj_ll # the GLPK default -1.7976931348623157e+308 >>> r.obj_ll = -1234.0 >>> r.obj_ll -1234.0
-
obj_ul¶ Upper limit of the objective function, a
Realnumber(Used only if meth is
'dual'.)>>> r.obj_ul # the GLPK default 1.7976931348623157e+308 >>> r.obj_ul = 123.4 >>> r.obj_ul 123.4
-
out_dly¶ Output delay [ms] of solution process information, an
int>>> r.out_dly # the GLPK default 0 >>> r.out_dly = 25 >>> r.out_dly 25
-
out_frq¶ Output frequency [ms] of informational messages, an
int>>> r.out_frq # the GLPK default 5000 >>> r.out_frq = 500 >>> r.out_frq 500
-
presolve¶ Whether to use the LP presolver, a
bool>>> r.presolve # the GLPK default False >>> r.presolve = True >>> r.presolve True
-
pricing¶ The pricing technique, a
strThe possible values are
'Dantzig': standard ‘textbook’'steepest': projected steepest edge
>>> r.pricing # the GLPK default 'steepest' >>> r.pricing = 'Dantzig' >>> r.pricing 'Dantzig'
-
r_test¶ The ratio test technique, a
strThe possible values are
'standard': standard ‘textbook’'Harris': Harris’s two-pass ratio test
>>> r.r_test # the GLPK default 'Harris' >>> r.r_test = 'standard' >>> r.r_test 'standard'
-
tm_lim¶ Time limit [ms], an
int>>> r.tm_lim # the GLPK default 2147483647 >>> r.tm_lim = 1e7 >>> r.tm_lim 10000000
-
tol_bnd¶ Tolerance to check if the solution is primal feasible, a
Realnumber>>> r.tol_bnd # the GLPK default 1e-07 >>> r.tol_bnd = 0.2 >>> r.tol_bnd 0.2
-