Difference between revisions of "Time index"

 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
  
Dynamic simulation time periods are specified in the system variable <code>Time</code>. To perform dynamic simulation, you must provide a definition for <code>Time</code>.
+
Dynamic simulation time periods are specified in the system variable [[Time]]. To perform dynamic simulation, you must provide a [[definition]] for '''Time'''.
  
To edit the definition of <code>Time</code>, select '''Edit Time''' from the '''Definition''' menu to open the '''Object''' window for <code>Time</code>.
+
To edit the definition of [[Time]], select '''Edit Time''' from the [[Definition menu]] to open the [[Object window]] for '''Time'''.
  
<code>Time</code> is defined by default as a list of three numbers 0, 1, and 2. You might want to define <code>Time</code> as a list of years, as in the following example.
+
[[Time]] is defined by default as a list of three numbers 0, 1, and 2. You might want to define '''Time''' as a list of years, as in the following example.
  
[[File:Chapter17_1.png]]
+
:[[File:Chapter17_1.png]]
  
<code>Time</code> becomes the index for the array that results from the <code>Dynamic()</code> function.
+
[[Time]] becomes the index for the array that results from the [[Dynamic]] function.
  
<tip tilte="Tip"> A model can have only one definition <code>Time</code> — that is, one set of time periods for '''[[Dynamic]]()'''  functions. Any number of variables in the model can be defined using '''[[Dynamic]]()'''.
+
<tip tilte="Tip"> A model can have only one definition '''Time''' — that is, one set of time periods for Dynamic functions. Any number of variables in the model can be defined using [[Dynamic]]().
 
</Tip>
 
</Tip>
  
<tip title= "Tip">A variation, '''Dynamic[T]()''', can be used to represent recurrences over indexes other than <code>Time</code>, but placing the index name in square brackets. This provides a way to express secondary recurrences if you’ve already used your <code>Time</code> index for sometime else. The dynamic concepts are introduced thoroughly in this chapter using <code>Time</code>, but if you have a loop using a different index, just substitute your other index for <code>Time</code> in what follows.
+
<tip title= "Tip">A variation, [[Dynamic]][T](), can be used to represent recurrences over indexes other than '''Time''', but placing the index name in square brackets. This provides a way to express secondary recurrences if you’ve already used your [[Time]] index for sometime else. The dynamic concepts are introduced thoroughly in this chapter using '''Time''', but if you have a loop using a different index, just substitute your other index for [[Time]] in what follows.
 
</Tip>
 
</Tip>
  
 
==See Also==
 
==See Also==
* [[Dynamic]]()
+
* [[Arrays and indexes]]
 +
* [[Time]]
 +
* [[Dynamic]]
 +
* [[Tutorial: Dynamic system model]]
 +
* [[Date and time values]]
  
  
 
<footer>Dynamic Simulation / {{PAGENAME}} / Dynamic function</footer>
 
<footer>Dynamic Simulation / {{PAGENAME}} / Dynamic function</footer>

Latest revision as of 23:24, 22 August 2016


Dynamic simulation time periods are specified in the system variable Time. To perform dynamic simulation, you must provide a definition for Time.

To edit the definition of Time, select Edit Time from the Definition menu to open the Object window for Time.

Time is defined by default as a list of three numbers 0, 1, and 2. You might want to define Time as a list of years, as in the following example.

Chapter17 1.png

Time becomes the index for the array that results from the Dynamic function.

Tip
A model can have only one definition Time — that is, one set of time periods for Dynamic functions. Any number of variables in the model can be defined using Dynamic().
Tip
A variation, Dynamic[T](), can be used to represent recurrences over indexes other than Time, but placing the index name in square brackets. This provides a way to express secondary recurrences if you’ve already used your Time index for sometime else. The dynamic concepts are introduced thoroughly in this chapter using Time, but if you have a loop using a different index, just substitute your other index for Time in what follows.

See Also


Comments


You are not allowed to post comments.