Setting initial conditions of arrivals along trajectories

42 views
Skip to first unread message

Philemon Cyclone

unread,
Jan 15, 2024, 8:04:23 AM1/15/24
to simmer-devel
I have a complex simulation for the manufacture of various product types, with each product following a dynamically-generated trajectory unique to that product. The products share a pool of common resources (where each resource is a process step). 

I was wondering - is there a way to initialize the simulation with arrivals at specific points along their trajectories? I'm picturing something like the rollback() function with a target, except in this case it would be a "rollforward". I need this to replicate the current state of the real-world manufacturing line, then run simulations from that point on for optimization purposes.

Thanks!

Iñaki Ucar

unread,
Jan 15, 2024, 8:45:25 AM1/15/24
to simmer...@googlegroups.com
There's no such method to automagically initialize the state of the system. You could do that manually by defining one auxiliary generator per step, with the initial arrivals and remaining times. Then you could just pass each step of the trajectory to those generators just by subsetting it. See https://r-simmer.org/reference/extract.trajectory

Iñaki

--
You received this message because you are subscribed to the Google Groups "simmer-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simmer-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simmer-devel/88f0a06e-3d3f-4ac4-8e64-7efcf1132e60n%40googlegroups.com.


--
Iñaki Úcar

Philemon Cyclone

unread,
Jan 18, 2024, 12:57:58 PM1/18/24
to simmer-devel
Is there a way to search the trajectory for a unique step identifier (e.g., a "tag" name or log_ "message") to get the desired index of the corresponding activity? My trajectories can be of vastly differently lengths, depending on the arrival type, such that knowing the desired trajectory step index a priori is very difficult to determine manually (and would not be sustainable as far as code maintenance goes).

Thanks!
Phil

Iñaki Ucar

unread,
Jan 18, 2024, 1:15:27 PM1/18/24
to simmer...@googlegroups.com
This is currently not possible. But now that we have tags, we should
be able to subset by tag. I added an issue to track this:
https://github.com/r-simmer/simmer/issues/305. Thanks for the idea.

Iñaki
> To view this discussion on the web visit https://groups.google.com/d/msgid/simmer-devel/8f76d093-6fe1-4402-ba11-d5c55d66f1e2n%40googlegroups.com.



--
Iñaki Úcar

Philemon Cyclone

unread,
Jan 19, 2024, 9:35:02 AM1/19/24
to simmer-devel
Thanks for adding the issue. I think as a temporary workaround I can iterate over the trajectory indices and use capture.output() to save the strings otherwise printed to the console, then search those strings for my unique step identifier and use that to get the desired index.
Reply all
Reply to author
Forward
0 new messages