the VarsList which contains this Variable
the name of this Variable; this will be underscorized so the English name can be passed in here. See Util.toName.
the localized name of this Variable
A function with no arguments that returns the value of this Variable
Optional
setter: ((v) => void)An optional function with one argument that sets the value of this Variable
Protected
seq_Sequence numbers, to detect discontinuity in a variable, see Variable.getSequence.
Protected
varsthe VarsList which contains this Variable
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
A Variable whose value is defined by a JavaScript function.
For example, suppose the variable 'position' is at index 0 in the VarsList. This script will create a new variable that gives the position offset by a fixed amount.
You can then choose that variable to show in a graph or time graph.