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

Pluto Notebook support. #2540

Closed
waltsims opened this issue Mar 25, 2021 · 6 comments
Closed

Pluto Notebook support. #2540

waltsims opened this issue Mar 25, 2021 · 6 comments
Labels

Comments

@waltsims
Copy link

Is your feature request related to a problem? Please describe.
I am frustrated when I am trying to explore the JuMP exmaple in a Pluto notebook, and I cannot define a variable as described in the quickstart.

Describe the solution you'd like
I would like pluto notebook support

Describe alternatives you've considered
...

Additional context
This is the Minimal example that I am having issues with:

### A Pluto.jl notebook ###
# v0.12.21

using Markdown
using InteractiveUtils

# ╔═╡ 36b05920-8d98-11eb-1f1d-0b78df1fd03d

using JuMP

# ╔═╡ 26b6a19c-8d97-11eb-167a-b7ee62efa687
import Pkg; Pkg.add("JuMP")

# ╔═╡ 8e86a862-8d97-11eb-157c-8150efc5af6f
Pkg.add("GLPK")

# ╔═╡ 3af47c50-8d98-11eb-31f0-9bf25ff6f8d9
import GLPK

# ╔═╡ b25513e6-8d9c-11eb-3f3d-1d1b82813655
model = Model(GLPK.Optimizer)

# ╔═╡ 8b026044-8d9e-11eb-3aa5-39546b88dc15
@variable(model, 0 <= x <= 2)

# ╔═╡ Cell order:
# ╠═26b6a19c-8d97-11eb-167a-b7ee62efa687
# ╠═8e86a862-8d97-11eb-157c-8150efc5af6f
# ╠═36b05920-8d98-11eb-1f1d-0b78df1fd03d
# ╠═3af47c50-8d98-11eb-31f0-9bf25ff6f8d9
# ╠═b25513e6-8d9c-11eb-3f3d-1d1b82813655
# ╠═8b026044-8d9e-11eb-3aa5-39546b88dc15

I get the error:

cannot assign a value to variable workspace3.x from module workspace85

macro [email protected]:102[inlined]
top-level scope@Local: 1
@odow odow added the wontfix label Mar 25, 2021
@odow
Copy link
Member

odow commented Mar 25, 2021

This issue a problem with Pluto: It doesn't understand macros fonsp/Pluto.jl#196 or mutation fonsp/Pluto.jl#564.

These two issues mean that there is no way to use JuMP in Pluto.

@odow odow closed this as completed Mar 25, 2021
@waltsims
Copy link
Author

Thanks for the fast response. Hope that change soon.

-walter

@odow
Copy link
Member

odow commented Mar 25, 2021

I wouldn't expect it to change anytime soon. Pluto has a strong vision for reactivity, and that is at odds with JuMP's workflow.

@waltsims
Copy link
Author

waltsims commented Mar 25, 2021 via email

@joaquimg
Copy link
Member

Pluto initialises any variable?
Maybe we can check if in Pluto and display a pretty error...

@odow
Copy link
Member

odow commented Mar 25, 2021

The Pluto dev's are aware of the issue, including this specific error message: fonsp/Pluto.jl#196 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants