Action chart element.
When defining some algorithm using action chart, you may need some local variables e.g. to store intermediate calculation results.You define variables using
blocks. Please note that local variable is visible only down the action chart starting from the declaration point.
To declare a local variable in an actionchart
Drag the Local Variable from the Actionchart palette onto the diagram of agent. While moving the mouse over the graphical editor you will see insertion points of action chart(s) indicated with little blue circles. Release the mouse button over the insertion point where you want to place the block. New "local variable" block will be inserted into this place.
Go to the Properties view.
Name – The name of the "local variable" element. The name is used to identify the element within its action chart.
Type – The type of the local variable. Choose, whether you want a variable of some most-used type (int, double, boolean, String), or of some Other Java class using the controls to the right.
Initial value – You can define the initial value for the variable here. The initial value of the variable can be changed afterwards during the model simulation. If an initial value is not specified, Java rules apply, for example a variable of type double is set to 0, a variable of type boolean is false.
Constant – If selected, the local variable is made constant, i.e. it has the same value at all times and can not be changed during the simulation.
Label – You can add here some comments, explaining the meaning of the local variable. The comments will be shown inside the block instead of the name of the variable.
Fill color – Sets the fill color for the element. Click inside the control and choose a color from the set of most used ones, or choose some custom color using the Colors dialog box.
Action charts. Defining algorithms visually
Editing action chart blocks