esa / pagmo_plugins_nonfree

A pagmo affiliated package (https://github.com/esa/pagmo2) adding commercial solvers to the list of solvers/algorithms: SNOPT7, WORHP
GNU General Public License v3.0
10 stars 9 forks source link

Cannot specify SNOPT options that require string arguments #14

Open sanjeev-narayanaswamy opened 5 years ago

sanjeev-narayanaswamy commented 5 years ago

Hi @darioizzo,

I am trying to pass the following options to SNOPT

QPSolver QN
System information Yes

but I couldn't find a way to do that since the plugin only allows for integer and real valued options currently. Is there any way to specify these options and others that require string arguments?

I would deeply appreciate your thoughts on this. Thanks for your help.

darioizzo commented 5 years ago

What would be the snopt7 c routine to set these values?

As you see here (https://github.com/snopt/snopt-interface/blob/master/include/snopt_cwrap.h#L60) the snopt interface API seems to only define int and real params .... so maybe you want to ask your question in that project.

If you tell me what is that you want exposed, we can add it at the next release.

sanjeev-narayanaswamy commented 5 years ago

Thanks for your link to the file @darioizzo. As suggested, I have just posted a question at https://github.com/snopt/snopt-interface/issues/28 and will report back.

sanjeev-narayanaswamy commented 5 years ago

I just heard back from the maintainer of snopt-interface and it seems that setParameter https://github.com/snopt/snopt-interface/blob/master/include/snopt_cwrap.h#L59 is the function we want to add.

It works for all SNOPT options and we need to pass in the entire string containing the keyword and
corresponding setting: (i.e 'QPSolver QN', 'Scale tolerance 0.99', or 'New basis file 11').

Since this also works for integer options, we would need to add an additional check to prevent the user from setting Derivative option using setParameter.