Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
personal:blog:2017:0203_jump_for_gams_users [2023/12/22 11:24] antonello [Declaration of the model] |
personal:blog:2017:0203_jump_for_gams_users [2023/12/22 11:37] antonello [Further help] COMPLETED UPDATING OF THE PAGE |
||
---|---|---|---|
Line 196: | Line 196: | ||
==== Resolution of the model ==== | ==== Resolution of the model ==== | ||
- | It is at this point that the solver is called and the model is passed to the solver engine for its solution. The return value is the status of the optimisation (": | + | It is at this point that the solver is called and the model is passed to the solver engine for its solution. The return value is the status of the optimisation ('' |
<code julia> | <code julia> | ||
- | status = solve(trmodel) | + | optimize!(trmodel) |
+ | status = termination_status(trmodel) | ||
</ | </ | ||
Line 207: | Line 208: | ||
<code julia> | <code julia> | ||
- | if status == :Optimal | + | if status == MOI.OPTIMAL |
- | println(" | + | println(" |
- | println(getvalue(x)) | + | println(" |
+ | println(value.(x)) | ||
println(" | println(" | ||
- | [println(" | + | [println(" |
println(" | println(" | ||
- | [println(" | + | [println(" |
+ | |||
else | else | ||
println(" | println(" | ||
Line 223: | Line 226: | ||
==== Editing and running the script ==== | ==== Editing and running the script ==== | ||
Differently from GAMS you can use whatever editor environment you wish to code a JuMP script. If you don't need debugging features, a simple text editor like Notepad++ (in windows), gedit or kate (in Linux) will suffice. They already have syntax highlight for Julia.\\ | Differently from GAMS you can use whatever editor environment you wish to code a JuMP script. If you don't need debugging features, a simple text editor like Notepad++ (in windows), gedit or kate (in Linux) will suffice. They already have syntax highlight for Julia.\\ | ||
- | If you want advanced features and debugging capabilities you can use a dedicated Julia IDE, like e.g. [[http://junolab.org/|Juno]]. | + | If you want advanced features and debugging capabilities you can use a dedicated Julia IDE, like the [[https://www.julia-vscode.org/|Julia extension for VSCode]]. |
- | If you are using instead the Julia console, you can run the script as '' | + | If you are using instead the Julia terminal, you can run the script as '' |
===== Further help ===== | ===== Further help ===== | ||
- | Documentation of JuMP is available from [[https:// | + | Documentation of JuMP is available from [[https:// |
Happy modelling with JuMP ;-) | Happy modelling with JuMP ;-) |