-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
It would be useful to be able to implement function calls into constraints. Pyomo has a similar functionality under the external() module. Here you can supply a function call, such as a function or an external library (DLL) call, to calculate a value. This value, along with its derivatives, can then be applied to a constraint or logicalConstraint. I am thinking of a functionality like the following:
using DisjunctiveProgramming
using HiGHS
m = GDPModel(HiGHS.Optimizer)
@variable(m, 0 <= a)
function quadratic(x)
return y = (x + 2)^2 + 1
end
@constraint(m, 0 == quadratic(a))
Metadata
Metadata
Assignees
Labels
No labels