Returns the localized strings corresponding to the possible values from getValues. See Internationalization.
the localized strings corresponding to the possible values
Name of this SubjectEvent, either the language-independent name for scripting purposes or the localized name for display to user.
The language-independent name should be the
same as the English version but capitalized and with spaces and dashes replaced by
underscore, see Util.toName and nameEquals
.
Optional
opt_localized: booleantrue
means return the localized version of the name;
default is false
which means return the language independent name.
name of this object
Returns the sequence number of this Variable. The sequence number is incremented whenever a discontinuity occurs in the value of the variable. See incrSequence.
For example, when the variables are set back to initial conditions that is a discontinuous change. Then a graph knows to not draw a connecting line between the points with the discontinuity.
Another example of a discontinuity: if the value of an angle is kept within 0
to
2*Pi
(by just adding or subtracting 2*pi
to keep it in that range), when the angle
crosses that boundary the sequence number should be incremented to indicate a
discontinuity occurred.
the sequence number of this Variable.
Returns the set of values corresponding to getChoices that this Parameter can be set to.
set of values that this Parameter can be set to, in string form.
Increments the sequence number of this Variable, which indicates that a discontinuity has occurred in the value of this variable. This information is used in a graph to prevent drawing a line between points that have a discontinuity. See getSequence.
Returns whether the value is being automatically computed; setting the value of this Parameter has no effect.
Examples of automatically computed Parameters: the variables that give the current energy of a simulation. Another example is when the size of a graph's SimView is under control of an AutoScale.
whether the value is being automatically computed
Whether this SubjectEvent has the given name, adjusting for the transformation to a language-independent form of the name, as is done by Util.toName.
the English or language-independent version of the name
whether this SubjectEvent has the given name (adjusted to language-independent form)
Sets whether the value is being automatically computed. See isComputed.
whether the value is being automatically computed.
Sets the value of this Variable without changing the sequence number which means it is a 'smooth' continuous change to the variable. See getSequence.
the value of this Variable
Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.
For an object whose main purpose is to represent another Printable object, it is
recommended to include the result of calling toStringShort
on that other object.
For example, calling toStringShort()
on a DisplayShape might return something like
this:
DisplayShape{polygon:Polygon{'chain3'}}
a minimal string representation of this object.
Generated using TypeDoc
Represents a variable with a numeric value; usually stored in a VarsList.
Variable extends Parameter so that EasyScriptParser can easily set a simulation's initial conditions (the set of starting Variables). EasyScriptParser can then use the same mechanisms for setting or reporting values of Parameters and Variables.
Variables differ from "normal" Parameters in that a Variable does not broadcast when its value changes. Except that you can tell a Variable to broadcast on a discontinuous change, see setBroadcast.