'Setting constraints with variables as exponents in PySCIPOpt
I want to solve an MINLP problem with SCIP in Python and therefore use PySCIPOpt. I already introduced the variables, the objective function, and set the constraints (as far as it was possible, given my issue).
Within one constraint, there is a variable in the exponent of another pair of variables. Currently, it looks like this (x_1, x_2, y_1, y_2, z, v all are variables):
model.addCons( x_1 * x_2 * ( (y_1/y_2)**((z-1)/z) -1 ) - v == 0 )
This gives back the following error:
NotImplementedError: exponents must be numbers
I was reading about a builtin exp() method, but did not find a good example of how to use it in my specific code.
The only alternative I could imagine would be using the constraint handler, which of course is more work than just putting in exp().
Does anyone has an idea on how to implement the respective constraint in PySCIPOpt?
Thanks for your help in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
