Simplify MINLP problem to speed up results

No idea without a full stack trace of the error. I assume this is in Juno/Atom? Try running Julia from a terminal and include("/path/to/file.jl") your file.

You should also read Please read: make it easier to help you. It’s worth spending time simplifying the example, but removing unneeded packages (e.g., Plots) and parameters and providing dummy data instead of the files.

Also, some things to improve your performance. Variable bounds (e.g., the last two constraints) are better specified as

@variable(m, -0.2 <= dS_var[1:N] <= 0.2)