Hi all,
I looked at the problem and solved it for you. The problem was not in your
code, but in the dsol-full-1.6.2.jar. A fix is as such included in the
dsol-template/lib/dsol-full-1.6.2.jar.
In order for you guys to download this new code, simply update the
dsol-template project and make sure you use this new jar file
Peter
Ps I changed your code a bit, update it as well please.
_____
From: dso...@li...
[mailto:dso...@li...] On Behalf Of Hendy Gunawan
Sent: Saturday, October 16, 2004 11:29 AM
To: Dso...@li...
Subject: [Dsol-java] Problem in implementing counter
Hi all,
Our project's name is BenHenMan Trial 1. We try to make a model of flowing
products or customers through many servers.
We try to use as clear comment as possible so hopefully anyone can
understand the model quickly.
We will like to use counter. The command lines for counter can be seen in
class Model, near the bottom, in statistics part.
The problem is that we do not know if our commands are correct. We think not
because the simulator did not run the model correctly after we added the
lines.
If the lines were deleted, the model could be run just fine.
If any of you has suggestion, it will be very great.
Here is the error statement we saw in the dsol logging:
21) 10:19:26 PM WARNING: For input string : "0.0"
Origin: nl.tudelft.simulation.dsol.formalisms.flow.Release#receiveObject
java.lang.NumberFormatException: For input string: "0.0"
at java.lang.NumberFormatException.forInputString(Unknown
Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.<init>(Unknown Source)
at
nl.tudelft.simulation.jstats.statistics.Counter.notify(Counter.java:116)
at
nl.tudelft.simulation.dsol.statistics.Counter.notify(Counter.java:122)
at
nl.tudelft.simulation.event.EventProducer.fireEvent(EventProducer.java:212)
at
nl.tudelft.simulation.event.EventProducer.fireEvent(EventProducer.java:239)
at
nl.tudelft.simulation.event.EventProducer.fireEvent(EventProducer.java:435)
at
nl.tudelft.simulation.event.EventProducer.fireEvent(EventProducer.java:345)
at
nl.tudelft.simulation.dsol.formalisms.flow.Station.releaseObject(Station.jav
a:84)
at
nl.tudelft.simulation.dsol.formalisms.flow.Release.receiveObject(Release.jav
a:78)
at
nl.tudelft.simulation.dsol.formalisms.flow.Station.releaseObject(Station.jav
a:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
nl.tudelft.simulation.dsol.formalisms.devs.SimEvent.execute(SimEvent.java:14
1)
at
nl.tudelft.simulation.dsol.simulators.Animator.run(Animator.java:100)
at
nl.tudelft.simulation.language.concurrent.WorkerThread.run(WorkerThread.java
:85)
Best regards,
Hendy
|