Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
home_test_julia [2017/02/07 10:11] antonello removed |
home_test_julia [2017/02/07 10:15] antonello |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | not in code | + | ===== Installation ===== |
- | < | + | **Step 1:** |
+ | * Option a: Get an account on [[https:// | ||
+ | * Option b: Install Julia for your platform ([[http:// | ||
+ | **Step 2:** | ||
- | test | + | 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 |
- | # | + | |
- | #This problem finds a least cost shipping schedule that meets | + | |
- | # | + | |
- | a = [" | + | 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 | ||
</ | </ | ||
- | ~~NOCACHE~~ | + | ==== 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 = [" | ||
+ | </ |