Assemble vs Combine vs Pack

139 views
Skip to first unread message

Trevor Miles

unread,
Aug 5, 2021, 8:57:03 AM8/5/21
to Jaamsim Users Discussion Group
I am trying to model a Sales or Purchase order that requires a certain quantity, where the quantity is either determined randomly in the case of an SO and through ROP, MOQ, ROQ logic for a PO. At this stage I am modeling a single item. 

I've created an attribute Qty for the order entity. 

The question is how do I pull items from inventory to fulfill the order? The obvious choices as Assemble, Combine, and Pack. The issue is that the quantity is stored as an attribute of the order entity, and it is not clear to me that it is the order entity that is triggering the Assemble, Combine, or Pack.

In the hover help of Combine the NumberRequired example is { DiscreteDistribution1 { 'this.obj.Attrib1 + 1' }. To which entity does 'this.obj' refer? In the PDF help document there is no reference to the example.

I also looked at Assemble. This definitely does not seem to work because the number of items to be picked is on the entity in the order Queue, and it is referring to inventory Queue, so { 'this.obj.Qty' } doesn't make sense.

Is there another to model this that I am not thinking about? I also looked at EntityGate, but this doesn't seem to provide the functionality I need either.

I presume others have tried to model this situation and have come up with clever models.

Harry King

unread,
Aug 5, 2021, 11:19:52 AM8/5/21
to Jaamsim Users Discussion Group
Hi Trevor,

Take a look at the example model "Fill Order Example - with NextEntity and SelectionCondition". You can find it under Help > Examples.

Would that approach work for your model?

Harry

Trevor Miles

unread,
Aug 6, 2021, 11:17:21 AM8/6/21
to Jaamsim Users Discussion Group
Hi Harry

Thanks for the tip. For a single product type 

I managed to solve the issue by using Assemble with the NumberRequired as {1} {[OrderQueue].QueueList(1).Quantity} for orders and items respectively.

However, I learned a lot from  your example model. For example, my model had 1 entity for every item, whereas yout entities represent the delivery batch. I simplified your example by simply having a list Attribute on Assign 4 that is incremented by the delivery lot size and decremented by the order lot size.

In pharma lot traceability is absolutely key, so some of the mfgs have adopted a "lot-for-lot" approach, meaning that the downstream processes have to consume a full lot upstream material, which reduces the traceability needs tremendously, especially in multi-API drugs. But this would mean that the order quantity has to be adjusted tot he delivery lot size. This would require scanning the inventory for a lot size close to the order size, and then adjusting the order size to the lot size. I'll leave this for another day. 

It would be interesting to test all sorts of picking rules. One rule could be to scan the Order queue for an order that can be satisfied. by the quantity in inventory. This will prioritize small orders implicitly.

However, in my experience it is better to batch orders and promise/commit/pick on a fixed cadence so that demand satisfaction can be prioritized by any number of factors. I'll modify the model to take this into account.

Regards
Trevor

Order Picking.cfg

trevor.i...@gmail.com

unread,
Aug 6, 2021, 5:42:00 PM8/6/21
to Jaamsim Users Discussion Group

Hi Harry

 

I modelled the batch promising using a TimeSeries and TimeSeriesThreshold and that worked fine. I used a simple priority of order size/10, so the bigger orders having priority.

 

I also wanted to enhance the visuals by having different symbols for the orders. I tried using SetGraphics in the model attached, but I keep on getting the error below on the Choice. I may just use two EntityGenerator so that I can see the different types, but I’d like to understand whether I’m making an error in how I am using SetGraphics or if this is a bug.

  

 

This is the LogViewer

--
You received this message because you are subscribed to the Google Groups "Jaamsim Users Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaamsim-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jaamsim-users/1ea3ecb3-ea21-4a1d-ae0d-38af411da8fcn%40googlegroups.com.

image001.png
image002.png
Order Picking.cfg

Harry King

unread,
Aug 6, 2021, 7:39:42 PM8/6/21
to Jaamsim Users Discussion Group
Hi Trevor,

Your input of '{ this.obj.Type == "A" ? 1.0 : 2.0 }' to the Choice keyword is the problem. This expression returns an array containing a number, i.e. either { 1.0 } or { 2.0 }. What you need is just a number, not an array containing a number.

Change your input to 'this.obj.Type == "A" ? 1.0 : 2.0'

Harry

Trevor Miles

unread,
Aug 7, 2021, 3:38:20 AM8/7/21
to Harry King, Jaamsim Users Discussion Group
Ah. The complexities of syntax. Thanks Harry. 

You received this message because you are subscribed to a topic in the Google Groups "Jaamsim Users Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jaamsim-users/TtxHW3qKgbM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jaamsim-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jaamsim-users/f66d763a-cd74-4b5e-8dde-05e45f90d67an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages