I am solving an optimization problem using PYSCIPOPT in Python. I know that I don't need to specify the problem type, that it will automatically detect for me. But I have a special situation where it may be useful.
My original problem is MINLP, but PYSCIPOPT is having trouble solving it. So I am using an external code to suggest guesses for the integer variables, after which I fix the integer variables thereby making the problem effectively NLP. For coding convenience, and because I may sometimes not fix all the integer variables, I am using the same MINLP formulation, but specifying the values of the integer variables using the .fixVar()
method. After pre-solve, it says 0 integer variables, so I assume it's treating the problem as NLP. But because the initial model contains integer variables, I wonder if it's still trying to solve it like a MINLP; e.g. using heuristics that were fine-tuned for MINLP rather than NLP. In that case, explicitly telling SCIP to solve it like a NLP might have benefits.
I looked through the SCIP and PYSCIPOPT documentations, but couldn't find a parameter to specify the problem type, like what GAMS has. I also didn't see any relevant question on StackOverflow.
If anyone knows,
.fixVar()
to fix the integer variablesthat would be great. Or if this doesn't matter because,
that would also be good to know.
There is no need to force a problem type. SCIP will realize when there are no integer variables left after applying all variable fixings.
The algorithm SCIP uses for NLPs is not much different than for MINLPs. It just skips a number of techniques to deal with integer variables if there aren't any. But there is very little where SCIP says that now that the problem is only a NLP, it would do something special. The multistart heuristic would be something that only runs in case of a NLP.
To answer the points directly: