InfiniteOpt/supports violate the domain bounds

Hi @blob, this is indeed a bug.

The problem is ultimately solved via discretization and all supports (i.e., discretization points) are rounded to a certain number of significant digits (the default is 12). Hence, the bug is that specifying domain bounds with a higher number of sigfigs can lead to the case where generated support points violate the bounds.

This will be fixed by Fix SigFig Bug by pulsipher · Pull Request #344 · infiniteopt/InfiniteOpt.jl · GitHub which will round the domain bounds to use the same number of sigfigs.

In the meantime, you can work around this by specifying a higher number of sigfigs via the sig_figs argument when defining your infinite parameter:

@infinite_parameter(model, z1 in [minimum(dRNotRAndom), maximum(dRNotRAndom)], sig_figs = 12)

Or you can first round your bounds like you already tried. For a given infinite parameter, you can check its sigfigs via the significant_digits function.

With respect to your problem, it appears you are solving a robust optimization problem. It is worth noting that InfiniteOpt has limited support for these types of problems and will only solve them via sample average approximation (i.e., enforcing that the constraints hold for each discretization point). Hence, you should control what support points are specified rather than relying on the default behavior which just generates 10 support points.

Also, one small note that status in status=optimize!(model) is unnecessary since optimize! will always return nothing. You can check the status via status = termination_status(model) (after optimize! has been called).

1 Like