Differences
This shows you the differences between two versions of the page.
home_test_julia [2017/02/07 10:15] antonello |
home_test_julia [2018/06/18 15:11] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Installation ===== | ||
- | **Step 1:** | ||
- | * Option a: Get an account on [[https:// | ||
- | * Option b: Install Julia for your platform ([[http:// | ||
- | |||
- | **Step 2:** | ||
- | |||
- | Run, only once, the following code to install JuMP language and a couple of open source solvers: | ||
- | <code julia> | ||
- | Pkg.update() | ||
- | Pkg.add(" | ||
- | Pkg.add(" | ||
- | Pkg.add(" | ||
- | Pkg.add(" | ||
- | </ | ||
- | |||
- | ===== Model components ===== | ||
- | |||
- | ==== Importing the libraries ==== | ||
- | |||
- | You will need to import as a minima the '' | ||
- | |||
- | <code julia> | ||
- | # Import of the JuMP and DataFrames modules (the latter one just to import the data from a header-based table, as in the original trasnport example in GAMS | ||
- | using JuMP, DataFrames | ||
- | </ | ||
- | |||
- | ==== Defining the " | ||
- | |||
- | JuMP doesn' | ||
- | While many works with position-based lists, I find more readable using dictionaries instead. So the " | ||
- | One note: it seems that Julia/JuMP don't like much the " | ||
- | |||
- | <code julia> | ||
- | ## Define sets ## | ||
- | # Sets | ||
- | # | ||
- | # | ||
- | plants | ||
- | markets = [" | ||
- | </ |