-
Notifications
You must be signed in to change notification settings - Fork 94
Description
I can create a custom MOI.AbstractFunction
and add support to it through bridges. The custom function can then be included in constraints, before attaching a bridged optimizer, because the UniversalFallback
supports any constraints. It would be nice if this also worked for the objective function.
Currently, if I add a custom objective function that is not supported by the MOIU.Model
it ends up in the modattr
dict of UniversalFallback
. When JuMP queries the objective function it first gets the ObjectiveFunctionType
from the MOIU.Model
so that ultimately a zero(ScalarAffineFunction{Float64})
will be returned, even if I have added support for my custom function in JuMP and MOI through bridges.
UniversalFallback
could handle custom objectives that are not supported by MOIU.Model
in the same way that it currently handles custom constraints.