Choosing the shortest Queue with Branch

Skip to first unread message

Wafi Seif Sungkar

Jan 14, 2023, 3:50:29 AMJan 14
to JaamSim Users Discussion Group

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.


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

Jan 16, 2023, 7:51:22 AMJan 16
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?
Reply all
Reply to author
0 new messages