Modeling perishable product

25 views
Skip to first unread message

Ralph Asher

unread,
Dec 21, 2023, 11:00:48 PM12/21/23
to simmer-devel
Anyone built a simmer model to simulate perishable product? I am in the ideation phase of a logistics network simulation. A product is made at the factory, then has 20 days before it spoils. It is transferred to a store, where it sits on the shelf. Variable demand "consumes" the product at the store, or the product spoils after 20 days. Purpose of the simulation is to understand the effectiveness of different stocking strategies at the store.

This is a different use case than most I've seen for simmer, so I'm not sure if this is the right modeling package - want to get thoughts.

Thanks!

Philemon Cyclone

unread,
Dec 22, 2023, 10:50:04 AM12/22/23
to simmer-devel
Using the branch(.trj, option, ...) function may work here. Once the product leaves the factory resource, it can enter a branch, where the option argument is a function that directs the product either to a "consumed", "unconsumed", or "spoiled" trajectory. The consumed vs. unconsumed decision could be made with some probability defined by your demand function, and "spoiled" is chosen if the time is >20 days. In the "unconsumed" trajectory, you could run the product arrival through an incremental timeout (for example 1 day or whatever time resolution you think reasonable) and rollback to re-enter the branch. Use set_attribute() to set the timestamp when the product leaves the factory, then check the current time using now(.env) within the branch option function.

One drawback from this approach is that the simulation computation will be slowed down by the repeated callbacks, which is more of an "activity-oriented approach" and somewhat antithetical to the simmer paradigm of being "process-oriented". An alternative option could be to model your store customers on their own trajectory, where a customer arrival sends a signal that the product has subscribed to using trap(). This might be more complicated to code upfront, but perhaps easier to deal with from a results handling perspective, depending on your exact scenario, because you can easily define customer arrival times with a more intuitive set of probability functions (e.g., arrival times and probability of buying). Here, both the product and customer behavior are also stored by simmer, whereas in the other case you would need to store the demand/consumption details externally.

ralph....@gmail.com

unread,
Dec 22, 2023, 11:09:25 AM12/22/23
to simmer...@googlegroups.com

The latter approach sounds preferable. The customer arrival times are highly uncertain, and I would want to try multiple scenarios of demand patterns. It gets even more complicated when I consider that there are actual multiple products, and an individual may be willing to buy substitute products. E.g., I may prefer 2% milk, but will buy skim milk if 2% is unavailable. You may want skim and only skim.

 

Appreciate the reply!

--
You received this message because you are subscribed to a topic in the Google Groups "simmer-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simmer-devel/kKW6jdp1Cf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simmer-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simmer-devel/f7cd4da3-cd93-4872-89ac-4d6a83840ee0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages