SolverStudio and Julia/JuMP

As of 2015-03-26, SolverStudio includes beta support for the Julia language and the associated JuMP modelling framework. JuMP allows you to easily build optimisation models in Julia which run nearly as fast as the commercial AMPL system. For more information on JuMP, see juliaopt.org and this paper by Iain Dunning and Miles Lubin.

SolverStudio 0.08 (20150616) introduces a new Julia console which is launched once, and then used to run your model. This gives faster code development times, but is less safe as variables are not cleared between runs. Although this is now used by default, you can still run using a fresh julia.exe each time, but this will be slower. (See the Julia menu for controlling this option.) You can also send commands to the Julia console using an experimental (and rather primitive) console available from the Julia menu.

This version also fixes the interaction with Julia (and other executables) to better handle stdout redirecting, and so now works with all Julia versions. (Old versions used to fail.)

If you use the un-released 0.4 Julia version, then please be aware that dictionary syntax has been changed. SolverStudio’s internal code works fine on 0.3 and 0.4 versions of Julia, but your code (and some of the examples) will run with “deprecated” warnings in v0.4.

The SolverStudio “Julia Examples.xlsx” file is the best way to understand how data items on the spreadsheet are mapped to Julia variables. As well as data items, SolverStudio also defines and makes available the following items which contain a few values from the ActiveWorkbook and ActiveSheet VBA objects (with thanks to Leonardo for suggesting this):

ActiveWorkbook_Path
ActiveWorkbook_FullName
ActiveWorkbook_Name
ActiveSheet_Name

JuMP v0.13 Changes in use of Capitals
Julia and JuMP is a moving target in the sense that the language is evolving rapidly. As an example, on 30 April 2016, Miles announced that JuMP (from v0.13) was adopting the new Julia conventions on camelCase (i.e. the use of capitals in macro names etc); please see this announcement for details. The SolverStudio examples will be updated.

4 thoughts on “SolverStudio and Julia/JuMP

  1. Well, I could confine solving time with the following string:
    m=Model(solver=CbcSolver(seconds=1000))

    Are you going to make SolverStudio for Mac?
    Thank you.

    • I’d love to do SolverStudio for Mac, but Microsoft need to build the tools first; C# and Office on Mac don’t play well together. Andrew

  2. Thanks for Julia in SolverStudio!
    Is it possible not to wait for solution completed?
    When solving large models it is necessary sometimes to interrupt solving and get the current nonoptimal result.
    Thanks.

    • Thanks. We would like to let users interript long runs and still get a solution. Do you know how we can do this in Julia? Do we send Julia a Control-C (which is not trivial under Windows…)? Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *