Error generated when an invalid Input given to Statistics block

Error generated when an invalid Input given to Statistics block

Statistics block accepts only double, integer or long values at the Stats_data port. If an invalid data such a datastructure is sent to the input port, following error will be generated.

VisualSim.kernel.util.IllegalActionException: Block: Statistic_Name
Data Structure not Integer, Long, Double, or String Token convert to double: 
{BLOCK = "Traffic", 
DELTA = 0.0, 
DS_NAME = "Header_Only", 
ID          = 1, 
INDEX = 0, 
TIME = 1.0}
at VisualSim.actor.util.SimFunctions.getDouble(Unknown Source)
at VisualSim.actor.lib.Stats_Basic.fire(Unknown Source)
at VisualSim.simulators.de.kernel.DEDirector.fireVisualSim(Unknown Source)
at VisualSim.simulators.de.kernel.DEDirector.fire(Unknown Source)
at VisualSim.actor.CompositeActor.fire(Unknown Source)
at VisualSim.actor.Manager.iterate(Unknown Source)
at VisualSim.actor.Manager.execute(Unknown Source)
at VisualSim.actor.Manager.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
at VisualSim.kernel.util.VisualSimThread.run(Unknown Source)


Solution: Listen to input port and make sure valid data is coming to input port.