User Tools

Site Tools


gams:parallel_versus_sequential_assignments_-_or_beware_of_loop_-statements

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
gams:parallel_versus_sequential_assignments_-_or_beware_of_loop_-statements [2009/05/08 15:43]
support
gams:parallel_versus_sequential_assignments_-_or_beware_of_loop_-statements [2009/05/08 15:45] (current)
support
Line 1: Line 1:
-====== Parallel versus sequential assignments - or Beware ​of "​Loop"​-Statements ======+====== Parallel versus sequential assignments - or beware ​of "​Loop"​-Statements ======
  
-Indexed assignments within GAMS are done using simultaneous or parallel assignments. ​ In most cases you don’t need explicit loops, an assignment is an implicit loop. The ''​loop''​ statement is only necessary when parallel assignments are not sufficient.  +Indexed assignments within GAMS are done using simultaneous or parallel assignments. ​ In most cases you don’t need explicit loops, an assignment is an implicit loop. The ''​loop''​ statement is necessary when parallel assignments are not sufficient ​- an example is provide below. However, a loop statement is **not** executed in parallel, but sequentially. This may slow down the execution of your code tremendously. ​ Below are some examples:
- +
-An example ​for a necessary loop statement ​is the calculation of a cumulative sum. However, a loop statement is **not** executed in parallel, but sequentially. This may slow down the execution of your code tremendously. ​ Below are some examples:+
  
 ===== A simple example ===== ===== A simple example =====
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/parallel_versus_sequential_assignments_-_or_beware_of_loop_-statements.txt · Last modified: 2009/05/08 15:45 by support