iterator.py File Reference

This example shows different ways on how to iterate the GamsSymbols in a GamsDatabase and records of a specific symbol The example shows two different ways on how to iterate the records of a GamsSymbol: More...

Go to the source code of this file.

Functions

def iterator.get_data_text ()
 

Variables

 iterator.ws = GamsWorkspace(system_directory = sys.argv[1])
 
 iterator.job = ws.add_job_from_string(get_data_text())
 
 iterator.t_start = time()
 
 iterator.rec_tmp = rec
 
 iterator.rec = job.out_db['p'].first_record()
 

Detailed Description

This example shows different ways on how to iterate the GamsSymbols in a GamsDatabase and records of a specific symbol The example shows two different ways on how to iterate the records of a GamsSymbol:

  • Using a for-loop, every iteration creates a brand new instance of a subclass of '_GamsSymbolRecord'.
  • Using _GamsSymbolRecord.move_next(), every iteration just moves the existing record forward.

Definition in file iterator.py.