Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| home_test_julia [2017/02/07 09:15] – antonello | home_test_julia [2025/07/01 13:57] (current) – antonello | ||
|---|---|---|---|
| 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: | Run, only once, the following code to install JuMP language and a couple of open source solvers: | ||
| <code julia> | <code julia> | ||
| - | Pkg.update() | + | |
| - | Pkg.add(" | + | Pkg.update() |
| - | Pkg.add(" | + | Pkg.add(" |
| - | Pkg.add(" | + | Pkg.add(" |
| - | Pkg.add(" | + | Pkg.add(" |
| + | Pkg.add(" | ||
| </ | </ | ||
| - | ===== Model components ===== | ||
| - | |||
| - | ==== Importing the libraries ==== | ||
| - | |||
| - | You will need to import as a minima the '' | ||
| <code julia> | <code julia> | ||
| Line 27: | Line 15: | ||
| </ | </ | ||
| - | ==== 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> | <code julia> | ||
| - | ## Define sets ## | + | # Define sets # |
| # Sets | # Sets | ||
| # | # | ||
| Line 41: | Line 23: | ||
| markets = [" | markets = [" | ||
| </ | </ | ||
| + | |||
| + | {{: | ||
