gosiajagusiak Posted November 8, 2022 Share Posted November 8, 2022 Hi, I'm trying to keep track of the time traveled of each vehicle in my system. I'm attaching a basic file with the current model. Aly help will be highly appreciated. Nw_Working_All_Logic.spfx Link to comment Share on other sites More sharing options...
Khaled Khamis Posted January 4, 2023 Share Posted January 4, 2023 Hello Gosia, I recommend using two State Variables to record the start and end times using the function TimeNow upon the Vehicle’s arrival to a Node. A Decide step is needed to check if the Current Node is different from the Destination Node and that is when values of the State Variables are assigned using the Assign step. The Processes will be set at the Vehicle’s Add-On Process Triggers On Entered Node and On Exiting Node. You can visit the SimBit section under the Support ribbon and check the SimBit titled “Record Distance Traveled” to see a similar example. Another approach is to create a custom Vehicle Class and use a Level State Variable instead of the two Real State Variables to collect information of the travel time. I suggest exploring the Level State Variable in the Help pages under the chapter titled “States”. I recommend checking the SimBit titled “Using Level States (from project Infection Propagation Using Continuous And Flow)” as well. Best Regards, Khaled Link to comment Share on other sites More sharing options...
Recommended Posts