Skip to content

Fast deletion of vector of constraints for Utilities.AbstractModel #1102

@blegat

Description

@blegat

There is not specialized implementation for the deletion of vector of constraints.
Because of this, deleting n constraints of the same type were there are m constraints in total is O(n * m) while it could be O(m).
Here are the O(m) operations:
https://github.com/JuliaOpt/MathOptInterface.jl/blob/525cf612602f48a77797ec5708349703ec3ea82d/src/Utilities/model.jl#L29
https://github.com/JuliaOpt/MathOptInterface.jl/blob/525cf612602f48a77797ec5708349703ec3ea82d/src/Utilities/model.jl#L562-L564
See https://discourse.julialang.org/t/jump-0-21-how-to-efficiently-delete-non-binding-constraints-in-an-lp/40650

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions