nosnoc
nosnoc copied to clipboard
What does the `plugin` mean in `nosnoc.solver.mpccsol` and how should it be passed.
The current interface for mpccsol
is designed to be similar to nlpsol
i.e. mpccsol(solver_name, plugin, problem, options)
. In its current state we only support nosnoc.solver.MpccSolver
as a backend for mpccsol
which is a relaxation solver for MPCCs. This means plugin
is used to pass the relaxation method to mpccsol
. This is in my opinion problematic as it both makes changing the relaxation mode a bit unintuitive and will become more confusing as other solver backends are added.
We have as I see it several options:
- Continue as is but then add other plugins.
- Drop the plugin as a part of the interface and simply pass it as part of the options.
- Change the plugin name for the current
MpccSolver
backend to something likerelaxation
(name open to change) and have the relaxation mode as part of the solver options.
I view 3 as the best option as it is relatively ergonomic and makes it clear which solver backend is being used. 2 is also passable for me though it moves away from the nlpsol
interface which may be undesirable in terms of user ergonomics.