Not seeing intermediate output when using Xpress, and three more issues.

206 views
Skip to first unread message

Marc Meketon

unread,
Feb 2, 2018, 12:49:29 PM2/2/18
to Pyomo Forum
Four issues when I try to use the Xpress solver:

  • When I use the 'nl' format:
opt = po.SolverFactory("amplxpress")
results = opt.solve(model, tee=True)

I do not see any intermediate output of the solver.  I do see it when using CBC, SCIP, GLPK, GUROBI.  But not Xpress.
  • However, Xpress runs, and gives back results, although the
results.solver.status

does not return
 
po.SolverStatus.ok

when Xpress stops due to time limit.  Instead it returns a warning.  This is different behavior than for other solvers.

  • Also when using amplxpress, I do get a message saying that it was not given a valid MIP Solution.  It's looking to see if I had already some solution of the problem.  
    • This might be a PYOMO issue or it might be an ampxpress issue.
    • Is there a way in PYOMO to give Xpress an MIP solution?  For my problem, I can easily generate a good solution (but not optimal) solution.
  • When I use the 'lp' format
opt = po.SolverFactory("xpress")
results
= opt.solve(model, tee=True)

Xpress does not solve the MIP problem it was given, rather it solves the relaxed LP problem.  Don't know how to make it solve the MIP.  Is PYOMO passing in wrong arguments?

Gabriel Hackebeil

unread,
Feb 2, 2018, 1:47:47 PM2/2/18
to pyomo...@googlegroups.com
  • When I use the 'nl' format: ...
You might need to provide amplxpress with an additional option to enable output. Try generating the .nl file manually (e.g., model.write(‘junk.nl’)), and launching amplxpress manually on the command line using something like:

$ amplxpress junk.nl -AMPL
or 
$ amplxpress -s junk.nl

Let us know if one of these works, or if you have to specify an additional option setting.
  • However, Xpress runs, and gives back results, although ...
This seems to be the case for all solvers that go through our AMPL interface. When they return a solve result status that indicates the solve was stopped by a limit (see the solve_result_table on this page: https://ampl.com/NEW/statuses.html), then we tag the result with a warning status. If you want to argue that this status should be tagged with SolverStatus.ok, feel free to open up a ticket on GitHub (I could be easily convinced, but I’m sure there are other sides to this issue).

If you would like to avoid the annoying warning in the short term, you can do something like:

from pyomo.opt import SolverStatus
results = opt.solve(model, load_solutions=False)
if <something about the results>:
    results.solver.status = SolverStatus.ok
model.solutions.load_from(results)
  • Also when using amplxpress, I do get a message saying that it was not given a valid MIP Solution ...
If you have values stored in your variables before you call the solve, these values will be placed in the NL file given to amplxpress. For variables that did not have a value, it is up to amplxpress to decide what that value should be (e.g., zero). It could be that amplxpress is assuming a value of zero, or that you are initializing your variables to something that is not feasible. Note that our other interfaces do not provide a warmstart by default. One has to specify “warmstart=True” in the solve call to activate this, but this functionality is not available for every solver.

  • When I use the 'lp' format
opt = po.SolverFactory("xpress")
Our LP interface to xpress is not very well tested and likely has bugs. I don’t know any developers who have a test license either, so it’s not something anyone can really work on.

Gabe

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marc Meketon

unread,
Feb 2, 2018, 3:20:57 PM2/2/18
to pyomo...@googlegroups.com
Thanks for the prompt answers.  Gives me something to explore.

I also contacted FICO (the Xpress-MP folks) and suggested that they give you a test license.  Don't know if anything will come out of that.

-Marc

To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Pyomo Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyomo-forum/0PyZk8THFkQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyomo-forum+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages