Skip to content

Feature request: Support custom objective functions in UniversalFallback #1085

@martinbiel

Description

@martinbiel

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions