Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@variable and @constraint macros are very slow when defining over sets in v0.6 #114

Closed
dlcole3 opened this issue Aug 19, 2024 · 1 comment

Comments

@dlcole3
Copy link
Collaborator

dlcole3 commented Aug 19, 2024

The @variable and constraint macros seem really slow under the new version of Plasmo when defining over sets. For example, the last line below in Plasmo v0.5.4 runs in <0.1 seconds, but it runs in >5 seconds in Plasmo v0.6.1.

using Plasmo, JuMP

g = OptiGraph()

X = 100
Y = 100

@optinode(g, n)
@time @variable(n, x[1:X, 1:Y] >= 0);

Perhaps it has something to do with how the names are set. When I run the code below, it takes approximately the same amount of time in both v0.5.4 and v0.6.1.

@time begin
    for i in 1:X
        for j in 1:Y
            @variable(n)     
        end
    end
end

I believe the same problem arises with constraints based on some other code I am running.

@jalving
Copy link
Member

jalving commented Aug 22, 2024

should be fixed by #116

@jalving jalving closed this as completed Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants