Difference of values in the queue reports - Version 2.

19 views
Skip to first unread message

Cristiano Silva

unread,
Apr 10, 2021, 7:12:20 AM4/10/21
to Jaamsim Users Discussion Group
Hello.

Good Morning.

When I fill the StatAssignment field on "Server" (TimeInToll) and "Queue" (TimeInCarsQueue).

EntityLogger1: {this.obj.StateTimes}

The value that is generated in "Queue" (TimeInCarsQueue) appears to be correct.

In "Output Viewer - CarsQueue":
- AverageQueueTime: 59.4982 s
- In the values presented in the report "002_2_model_toll-EntityLogger1.log": 59.54748

=======

If I only fill in the StateAssignment field "Queue" (TimeInCarsQueue), and do not fill in the "Server" -> the value of the server appears in the report for the "StateAssignment" of "Queue".

"TimeInCarsQueue" takes the value of "TimeInToll".

=======

Please check the model I send attached.

Thank you very much.

Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'
002_2_model_toll.cfg

Cristiano Silva

unread,
Apr 10, 2021, 7:25:33 AM4/10/21
to Jaamsim Users Discussion Group
Great John.

Now I understood perfectly.

Thank you very much...

Congratulations on participating in such an important initiative.

I want to collaborate with your project.


=====================

Follows John's answer.

=====================


Hi there,

You have set the State of the object to "TimeInCarsQueue" as the object enters  CarsQueue. This line in your .cfg file:

CarsQueue StateAssignment { TimeInCarsQueue }

That's perfectly correct.

However, the State of the object will remain "TimeInCarsQueue" until it is changed to something else. In you model this doesn't happen anywhere so the time in this state that you get in the output file includes time in the queue AS WELL AS time in the server. That's why you get the "wrong" answer.

To fix it so that you are just measuring times in the queue, give the object a New State as it enters the Server.

I attached a fixed version of your model. I gave the object a new State of "TimeInToll" when it entered the server - this is the line in the .cfg file:

Toll StateAssignment { TimeInToll }

Now if you run this you'll see that some of cars don't wait (as expected) and if you calculate the average time in the queue from the report file it is 59.54748445 seconds. If you look at the Output Window for the Queue object in your model, you will see AverageQueueTime is 59.4982 s - essentially the same as the report result. 


Atenciosamente,
Cristiano Luís Turbino de França e Silva
==============================
                      GNU / Linux
    ,                ,       /       .-.
   /                  \     /      (e e)
  ((__-^^-,-^^-__))   /     _.`V'._
    `-_---' `---_-'      /    //~~W~~\\
  <__|o ` 'o|__>   /    //,           ,\\
        \   `  /       /    // |            | \\
         ):  :(      /      \) |            | (/
        :o_o:    /           \           /
          "-"    /              `w -  w'

Reply all
Reply to author
Forward
0 new messages