Skip to content

[FEATURE] Add JuMP.copy_model for InfiniteModels #422

@dnguyen227

Description

@dnguyen227

JuMP's stock copy_model(::GenericModel) does its work by asking MOI to clone the backend (MOI.copy_to). That works because a regular Model is a thin wrapper over an MOI backend.

InfiniteModel is structured differently: variables, parameters, constraints, derivatives, and measures are stored in InfiniteOpt-owned CleverDict registries directly on the model struct. The MOI backend (TranscriptionBackend) is empty until you call optimize!, at which point it gets populated by transcribing the infinite-dimensional structures down to a finite MOI model. So MOI.copy_to has nothing to copy for an unsolved InfiniteModel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions