Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
personal:blog:2017:0203_jump_for_gams_users [2023/12/22 11:19]
antonello [Importing the libraries]
personal:blog:2017:0203_jump_for_gams_users [2023/12/22 11:20]
antonello [Definition of the "parameters"]
Line 96: Line 96:
 #      seattle          2.5           1.7          1.8 #      seattle          2.5           1.7          1.8
 #      san-diego        2.5           1.8          1.4  ; #      san-diego        2.5           1.8          1.4  ;
-d_table = wsv"""+d_table = CSV.read(IOBuffer("""
 plants     new_york  chicago  topeka plants     new_york  chicago  topeka
 seattle    2.5       1.7      1.8 seattle    2.5       1.7      1.8
 san_diego  2.5       1.8      1.4 san_diego  2.5       1.8      1.4
-"""+"""), DataFrame, delim=" ", ignorerepeated=true,copycols=true)
 d = Dict( (r[:plants],m) => r[Symbol(m)] for r in eachrow(d_table), m in markets) d = Dict( (r[:plants],m) => r[Symbol(m)] for r in eachrow(d_table), m in markets)
 # Here we are converting the table in a "(plant, market) => distance" dictionary # Here we are converting the table in a "(plant, market) => distance" dictionary
personal/blog/2017/0203_jump_for_gams_users.txt · Last modified: 2023/12/22 11:39 by antonello
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0