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

anonymous parameter not allowed #84

Closed
jd-lara opened this issue Mar 10, 2021 · 1 comment
Closed

anonymous parameter not allowed #84

jd-lara opened this issue Mar 10, 2021 · 1 comment

Comments

@jd-lara
Copy link
Contributor

jd-lara commented Mar 10, 2021

This syntax is no longer allowed

p = @variable(m, Param())
ERROR: LoadError: MethodError: no method matching parse_variable(::JuMP.var"#_error#86"{LineNumberNode,Tuple{Symbol,Expr}}, ::JuMP._VariableInfoExpr, ::Symbol)
Closest candidates are:
  parse_variable(::Function, ::JuMP._VariableInfoExpr, ::Symbol, ::Number, ::Any) at /Users/jdlara/.julia/packages/JuMP/qhoVb/src/macros.jl:1003
  parse_variable(::Function, ::JuMP._VariableInfoExpr, ::Symbol, ::Any, ::Any) at /Users/jdlara/.julia/packages/JuMP/qhoVb/src/macros.jl:994
  parse_variable(::Function, ::JuMP._VariableInfoExpr, ::Any, ::Symbol, ::Any, ::Symbol, ::Any) at /Users/jdlara/.julia/packages/JuMP/qhoVb/src/macros.jl:1026
Stacktrace:
 [1] @variable(::LineNumberNode, ::Module, ::Vararg{Any,N} where N) at /Users/jdlara/.julia/packages/JuMP/qhoVb/src/macros.jl:1245
in expression starting at REPL[12]:
@jd-lara
Copy link
Contributor Author

jd-lara commented Mar 10, 2021

my bad. This is allowed by

p = @variable(m, variable_type = Param())

@jd-lara jd-lara closed this as completed Mar 10, 2021
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

1 participant