[AMPL 24514] Handling solver options with $

Hello,

I had some code that was running smoothly with past academic bundles of AMPL. However, when running it with the latest bundles I downloaded last week, I got an unexpected error handling the options. The following is a minimal working example illustrating it:

Dear Julio,

The ability to list solver options without spaces between them, as in

option gurobi_options 'outlev 0';
option gurobi_options $gurobi_options 'presolve 0';

is an undocumented feature of the original AMPL-solver library (ASL). Our Gurobi 10.0 distribution comes with a solver binary named “gurobiasl” that is built with ASL, and that includes this feature. (Try “option solver gurobiasl;”.) However, the same distribution includes a “gurobi” binary that is built on our new MP interface. As you have seen, MP does require spaces between solver options.

We are in the process of switching all linear/quadratic MIP solvers to the MP interface, which has been enhanced in a number of ways. Most importantly, from a modeler’s view, MP recognizes a significantly broader variety of convenient constraint expressions, and has a more consistent system for naming solver options (though old names are still recognized).

Thanks a lot Bob for your, once again, crystal clear explanation.

Best regards,
Julio.