gt_example1.py
Go to the documentation of this file.
8 
9 from gamstransfer import *
10 from gams import GamsWorkspace, GamsJob
11 import os
12 import sys
13 
14 if __name__ == "__main__":
15  if len(sys.argv) > 1:
16  ws = GamsWorkspace(system_directory=sys.argv[1])
17  else:
18  ws = GamsWorkspace()
19 
20  ws.gamslib("trnsport")
21  job = ws.add_job_from_file("trnsport.gms")
22  job.run()
23 
24  # load all gdx data
25  m = Container(os.path.join(ws.working_directory, job.out_db.name + ".gdx"))
26 
27  # in this example we will re-write all symbols into a new gdx file
28 
29  # add data to the new_gdx
30  m.write("transport_out.gdx")