Choosing the shortest Queue with Branch

93 views
Skip to first unread message

Wafi Seif Sungkar

unread,
Jan 14, 2023, 3:50:29 AM1/14/23
to JaamSim Users Discussion Group
Hello,

I am Wafi. I am pretty new to JaamSim. I am trying to model the coal-handling system of a coal-fired power plant. Because I'm still learning to use JaamSim, I divided the system to some subsystems and model them one at a time. I found a difficulty when I try to model coal distribution system to a bunch of bunkers/silos. I use Branch object to distribute entities which represent coal.

random.PNG

There are 7 silos but I will use 3 for this example. One silo is represented by a queue-server pair with server acting as the silo gate. Let's say these are the rules of the model:
  1. Branch should choose the queue with the shortest QueueLength to fill.
  2. When a branch have chosen a queue, it won't fill other queues until the chosen queue reach a QueueLength of 12 entities or above.
  3. A server can't operate when its queue is being filled.
  4. A server can only start to operate when its queue has a QueueLength of 12 or above.
  5. Only one server can operate at a time.
  6. A server won't stop operating until its queue has a QueueLength of 2 or less.
The biggest problem are number 1 and 2. I tried to use IndexOfMin for each QueueLengths but it switches queue to fill before a queue that is being filled reach a QueueLength of 12.

For number 3 and 4, I use OpenCondition and CloseCondition of ExpressionThreshold object for each server.

I tried to incorporate rules 5 and 6 to ExpressionThreshold, but my expression doesn't work very well.

I'm hoping for an advice from anyone. Thank you in advance.

Wafi Seif Sungkar

unread,
Jan 16, 2023, 7:51:22 AM1/16/23
to JaamSim Users Discussion Group
I finally able to solve the problem. I use AttributeAssignmentList of the Branch. However, is there a better way than doing it this way?
latest_coal_distribtuion_method.PNG
coal_distribution_method.cfg

Emily Law

unread,
Apr 8, 2023, 3:28:41 AM4/8/23
to JaamSim Users Discussion Group
i believe there is an example you can refer to click  Help -> Branch Example - select shortest Queue
Reply all
Reply to author
Forward
0 new messages