You should use Julia 0.4.0 or later. Binaries of Julia for all platforms are available here.
- Windows and Linux users should choose the 64-bit version, unless using a very old computer.
Jupyter is a convenient notebook-based interface to present documents which interleave code, text, and equations. Follow the instructions here to set up IJulia.
To start off, we will be using the following packages:
- JuMP
- Ipopt
- Clp
- GLPKMathProgInterface
Install each one by running Pkg.add("xxx")
where xxx
is the package name
from a Julia prompt or notebook. If you have a previous installation of Julia,
be sure to update your packages to the latest version by running Pkg.update()
.
To test that your installation is working, run the following code:
using JuMP
m = Model()
@variable(m, x >= 0)
@variable(m, y >= 0)
@constraint(m, 2x + y <= 1)
@objective(m, Max, x+y)
status = solve(m)
@show status
@show getvalue(y)
The output should be:
status = :Optimal
getvalue(y) = 1.0
We will not have the time to go through all of the basic syntax points of Julia. For more materials on learning Julia, see here. The JuMP documentation is located here. During the tutorial, we will be though through some of these example notebooks.