Skip to content

Slow behavior for setting or deleting variable bounds #138

@dlcole3

Description

@dlcole3

JuMP.set_lower_bound and JuMP.delete_lower_bound (and their corresponding upper bound functions) are much slower on Plasmo OptiGraphs than in JuMP. In the following code, the Plasmo OptiGraph tests about 100x slower on my laptop:

using JuMP, Plasmo

m = Model()
@variable(m, x[1:10000], Bin)

g = OptiGraph()
@optinode(g, n)
@variable(n, y[1:10000], Bin)

@time begin
    unset_binary.(x)
    set_upper_bound.(x, 1)
    set_lower_bound.(x, 0)
end

@time begin
    unset_binary.(y)
    set_upper_bound.(y, 1)
    set_lower_bound.(y, 0)
end

I am not yet sure why this is, but I will try to take a closer look later this week. If anyone else knows already where this bottleneck might be, please reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions