Optano GLPK Parameters

19 views
Skip to first unread message

Marcelo Lopes (mlopes)

unread,
Mar 19, 2023, 9:31:10 PM3/19/23
to OPTANO Modeling
Dear all,
I am using the Optano classes with GLPK solver I am getting problems running the solver when I do it sequentially.
Even keeping the input data the same, after calling the solver 8 times (with the same input data), it returns "LP HAS NO PRIMAL FEASIBLE SOLUTION".
There is plenty of memory for the solver execution.

I have tried to set some of the GLPKSolverConfiguration parameters. The LogFile parameter works fine (the log file is generated), but the ModelOutputFile does not generate any output file (I would like to check if is anything wrong with the input data sent to the GLPK, in order to get an unfeasible solution).

I have also tried to set the SimplexParameters.meth to OPTANO.Modeling.GLPK.glp_smcp.GLP_DUALP, but the solver keeps running with the simplex configuration.
Is there anything I am missing here?
The configuration code is shown below.
Thank you for your attention,
Marcelo.

 using (var solver = new OPTANO.Modeling.GLPK.GLPKSolver())
                    {
                        GLPKSolverConfiguration glpkcfg = solver.Configuration;

                        string glpkSuffix = DateTime.Now.ToString("_yyyyMMddHHmmss");
                        string glpkLogFileName = "glpk" + glpkSuffix + ".log";
                        glpkcfg.LogFile = new FileInfo(glpkLogFileName);

                        string glpkModelFileName = "glpkModel" + glpkSuffix + ".txt";
                        glpkcfg.ModelOutputFile = new FileInfo(glpkModelFileName);
                        glpkcfg.OptimalityTolerance = 0.05;

                        glpkcfg.SimplexParameters.msg_lev = OPTANO.Modeling.GLPK.glp_smcp.GLP_MSG_ALL;
                        //glpkcfg.SimplexParameters.meth = OPTANO.Modeling.GLPK.glp_smcp.GLP_DUALP;
                        glpkcfg.SimplexParameters.presolve = OPTANO.Modeling.GLPK.glp_smcp.GLP_OFF;



OPTANO Team

unread,
Mar 20, 2023, 3:10:49 AM3/20/23
to OPTANO Modeling
Hi

are the models feasible, when you solve them each on their own? 
Does the solver generate some error? 

Best
jp

OPTANO Team

unread,
Mar 20, 2023, 3:14:12 AM3/20/23
to OPTANO Modeling
one more: what version of glpk are you using? Quite some time ago, we have seen an issue in the mip presolve: Models became infeasible, as long as presolve was enabled (which is default)

Marcelo Lopes (mlopes)

unread,
Mar 20, 2023, 2:10:19 PM3/20/23
to OPTANO Modeling
Hello,
Thank you for your attention.
In fact, there was some invalid input data being sent to the solver.
After correcting this issue, the glpk problems are not happening anymore.
Anyway, it still does not generate the model file and the DUALP configuration has not been applied.
Is there any issue with the configuration method I have used?
Thank you again and Best Regards,
Marcelo.

Reply all
Reply to author
Forward
0 new messages