question

Douwe Jd avatar image
0 Likes"
Douwe Jd asked Douwe Jd commented

how to get the state chart of truck flow item in dashboard (and 2 other issues)

Hi everyone,

For my thesis i am simulating a warehouse where trucks arrive to pick up goods. I am almost done with building the process as it currently goes. I have 3 issues that i can not get fixed due to my lack of expertise.

1. Ultimately, my goal is to reduce the truck congestion. I added a dashboard with some interesting statistics for this. Unfortunately I can not figure out how to add the most important one - the composite state chart of all trucks that flow through the model. This statistic should tell me the percentage of time the trucks are 'blocked', 'idle', or 'travelling empty/loaded'. As i want to reduce the truck congestion, it is important to know for instance the amount of time they are blocked, as i can compare this to situations where i alter things. When the trucks flow through the model, I can see their state, so I assume it is possible to grasp this in a composite chart, right? I have tried with custom code to add the created trucks to a group called Trucks, but the charts in the dashboard that are supposed to show the state of this group is not working.

2. In my model, two types of shipments are created to be picked up by trucks. They are LooseCargo, which exists of one or many boxes, and ULD's which exists of one or multiple pallets. I am happy with the way my shipments are created and moved to the staginglane of the dockdoor that is acquired by a specific truck. However, I want to model it in such a way that DockDoor1 is the only door that can be acquired by trucks picking up the ULD shipments. DockDoor2 until DockDoor12 can be used for picking up LooseCargo shipments. I have tried to assign individual labels for ULD and LooseCargo and pull these but keep getting error messages or the model does not do what I want. I think I made a bit of a mess with all the labels and tokens (at least i lost track).

3. Thirdly, I want my 'Shipments' list to show for each shipment what is its type (LooseCargo or ULD), what the quantity of the shipment is (how many boxes or pallets), which DockDoor it is assigned to, and how long it has been on the list. I only managed to fix the last one.


It would be really helpful if someone could take a look at these three issues to help me forward!! This would be greatly appreciated.

truckloading-3issuesremain.fsm

FlexSim 22.1.2
listacquire resourcetruckdashboard chart
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Douwe Jd commented

1)

The internal state chart collector normally creates the table rows on reset. Because the group is empty at that point, no data is collected. Instead it should add (and later finish) rows throughout the model run.

First, to get access to the statistics collector, you have to install the chart components. This will make the statistics collector (and in case of the composite chart also a calculated table) available in the toolbox.

1656755365877.png

Now, we can add two new events to it. One just after the truck is created and one just before it gets destroyed. In both cases the reference to the object will be given through the token label 'Truck' (data.token.Truck)

The code in the 'Row Values' field of the default reset event creates a row for each state of each group member. We can adjust it so it instead only creates rows for each state of the new truck (Replace the 'objects' array with a single Object variable and remove the first for-loop, that would normally loop through the array).

The event before the truck gets deleted should 'finish' the rows, because the collector should stop to update the rows. Otherwise the data would get lost, when it tries to read data from the no longer existing truck.

If you want to plot the data by truck, then the 'Object' column value should be replaced by 'data.rowValue[1]' (a pointer to the truck), because the 'getID' method doesn't work for FlowItems. This will enter the name of the truck into the column, so it should be changed to be unique after the creation of the truck. (Truck_1, Truck_2, ...)


2) & 3)

These can both be solved by adding some labels to the shipment token. One of them should be a label that stores the type ("LooseCargo", "ULD"). A quantity label can also be added, with the value being the length of the array that holds the created items.

Both of these labels can then be added as fields to the shipment list. To show the assigend dock, an empty label can be created together with the other two and later filled in once a dock has been acquired. The list field for this label then has to be set as 'Dynamic', so it updates after the label value has changed.

To control which dock can be acquired, you can compare the cargo type label with a label on the queues in the query field of the acquire activity. So only objects with a matching label can be acquired.

1656756873818.png

truckloading-3issuesremain_fm.fsm


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Douwe Jd avatar image Douwe Jd commented ·
Wow Felix, thank you very much! Everything works exactly as I want it to now. Great!
0 Likes 0 ·