Mystic for non-convex MINLP

422 Views Asked by At

Can mystic optimizer be used to minimize a non-convex Mixed Integer Non-Linear Programming problem with only integer inputs?Because,the objective function is not continuous in x(the input),it is discretized in integers.

1

There are 1 best solutions below

1
On

I'm the mystic author... yes. Mystic can handle non-convex problems, with the Differential Evolution solver, or one of the Ensemble solvers. There is no MLP-specific solver, but instead handles integer programming as a spatial map that constrains solution space -- either pass np.round to the solver as a constraint, or use the integers decorator on a constraint.

For example, see:

Updated to respond to comments below To provide another example of constraints... if you want to impose a sum on the square of inputs, you could do it like this:

>>> import mystic as my
>>> squared = lambda x: [i*i for i in x]
>>> c = lambda x: my.constraints.impose_sum(24, squared(x))
>>> c([1.,2.,3.,4.])
[0.8, 3.2, 7.199999999999999, 12.8]
>>> sum(_)
24.0

mystic has several modules where you can find pre-built constraints functions, but the best places to start are: mystic.constraints and mystic.tools for general constraints, mystic.math.measures for statistical constraints, mystic.symbolic for symbolic constraints, and mystic.penalty for soft constraints (i.e. penalties).