ANN: JuMP 0.13 released (or, JuMP dumps camelCase)

355 views
Skip to first unread message

Miles Lubin

unread,
Apr 29, 2016, 8:33:07 PM4/29/16
to julia-opt, julia...@googlegroups.com
The JuMP team is happy to announce the release of JuMP 0.13.

This is the most visible JuMP release in quite a while since all of JuMP's macros and most exported methods have been renamed to avoid the camelCase convention. The original naming scheme was put in place before the 0.1 release of Julia and was never updated after the Julia community converged to its current naming conventions. We don't take this change lightly since it will require an update of all existing JuMP code, but we believe that now, before a JuMP 1.0 release, is the best time to take these steps to correct previous decisions so that we can continue to grow and remain visually appealing to new users. All of these changes are simple renamings, and it is sufficient to perform a find and replace on existing code in order to update it. We have put deprecation warnings in place so that no existing code should break after updating to JuMP 0.13. We expect to leave these deprecations in place for quite a while (at least 6 months) to minimize the impact. For the definitive list of the new names, see our deprecation list.

Here's a preview of the new names:

m = Model()
@variable(m, x >= 0)
@variable(m, y >= 0)
@objective(m, Max, 3x-2y)
@constraint(m, x+y <= 1)
@constraint(m, 2x+y <= 3)
status
= solve(m)
@show getvalue(x)

Or, using the pretty block syntax:

m = Model()
@variables(m, begin
    x
>= 0
    y
>= 0
end)
@objective(m, Max, 3x-2y)
@constraints(m, begin
    x
+y <= 1
   
2x+y <= 3
end)
status
= solve(m)
@show getvalue(x)

We request the help of the community to update existing code that may be posted on the internet. If you've written a blog post, stackoverflow post, public Jupyter notebook, or book(!) containing JuMP code, please make an effort to update it to the new naming scheme to avoid confusing new users.

I'd like to thank those who participated in the various discussions (here and here) which helped steer this change in the right direction. While this release focused on simple renaming, we may have some more interesting syntax changes or additions in the next release, so keep an eye on the JuMP repository if you are interested. For a more complete list of changes in this release, see the NEWS entry.

Miles, Iain, and Joey

Changhyun Kwon

unread,
Apr 29, 2016, 9:04:20 PM4/29/16
to juli...@googlegroups.com, julia...@googlegroups.com
Great job!! 

Thanks,
Chang

--
Changhyun Kwon
--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-opt+...@googlegroups.com.
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.

Lyndon White

unread,
Apr 30, 2016, 12:57:56 AM4/30/16
to julia-users, juli...@googlegroups.com
I like new clean syntax.

I threw together a simple substitution script,
to apply the changes.
 
You can use it online on https://repl.it/CL6c/6
Just change the original text in the left, for what ever is being updated.
Then run it and copy from the right.


I am tempted to go through all StackOverflow posts about julia containing the word JuMP and update them.

http://stackoverflow.com/search?q=+%5Bjulia-lang%5D+"JuMP"
Its only about 35 questions.

Iain Dunning

unread,
Apr 30, 2016, 10:51:00 AM4/30/16
to julia-opt, julia-users

I'll do my ones tonight

Uwe Fechner

unread,
May 1, 2016, 7:41:00 AM5/1/16
to julia-opt, julia...@googlegroups.com
In the announcement you wrote: "no existing code should break after updating to JuMP 0.13".

Well, it broke my code, as described in the following issue:
https://github.com/JuliaOpt/JuMP.jl/issues/753

But I found a solution:
Replace  registerNLFunction "registerNLFunction" with "JuMP.register".

It took be a while to find the correct name in the documentation.

Nevertheless, keep up the good work!

Uwe

Miles Lubin

unread,
May 6, 2016, 2:19:08 PM5/6/16
to julia-opt, julia...@googlegroups.com
Thanks for reporting, JuMP 0.13.1 was released to fix this.
Reply all
Reply to author
Forward
0 new messages