& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
[ FlexSim 21.2.0 ]
Hi. How can I set "traveler based" entry/exit time for elevator bank.?
The FlexScript code has only current as parameter, not the traveler.
Solved! Go to Solution.
If you print current.name
into an output console from a trigger, what name do you see?
EDIT: “current”, “traveler” or “ts” are just names. More important is, how they are declared. “current” is most often a reference to the owner of an object trigger. This means if you see ”current” in an elevator trigger or function it is pointing to the elevator. In a network node you get a reference to the involved taskexecuter as “traveler”. “current” is pointing to the network node. In process flow “current” points to the process flow and if the process flow is an instance of an object, then “current” references to this object. I suggest you explore what a declared pointer references to. It is better to know, than to assume what a source code does. There are different approaches to read source code variables values while a model runs. But you should know what a variable value is while a code is executed. print(current.name)
is one method to get those values. I prefer this method, because it was once the only way to understand a code. And I stick with it. There are better methods like debugging console, but it is your choice, how to achieve knowledge over your code.
Thanks @Joerg Vogel , I understand that . current points to the Elevator (Bank) object. I tried to find the traveler from the ElevatorBank/Elevator (car) tree and couldn't find it. Do you know if there is a way to get pointer to the traveler or find the traveler from the tree?
I also noticed that current points to the current elevatorbank object. If I want to get statistics from the elevator car (elevator bank contains for example 2 cars), I have to put ElevatorBank elebank = current.as(ElevatorBank);
Elevator is a taskexecuter. Then any objects on or in him is a subnode. If you need his content, you get it by current.subnodes.length
If you need the statistical value then you have to cast a treenode direct into an object current.as(object).stats.content.value
The travelers can be found as subnodes of the following node in the tree:
treenode Travelers = <ElevatorBankObject>.find(">stats/activeTravelers");
This includes all TaskExecuters that are currently entering or exiting an elevator, inside (one of) the elevator(s) or waiting in front. Maybe you can use the "OnAStarElevatorEntry" and "OnAStarElevatorBankArrival" events (on the TaskExecuters, weirdly only in event triggered sources in process flow) to set labels to distinguish between them.
Also note, that the "Entry/Exit Time" is only evaluated once per exit/entry cycle. So you would have to use the average value for all TaskExecuters that are involved, if there are multiple ones waiting to enter/exit. Assigning individual times is currently not possible to my knowledge.
See also the section on the Entry/Exit-algorithm in the documentation:
You can suggest this as an idea in the forum though. Seems like this would be a useful functionality to add.
Thanks @Felix Möhlmann . activeTravelers was actually what I was looking for. I think I can modify the entry time calculation so that if recognizes the traveler.
Entry/Exit time should be calculated from the slowest traveler as he/she determines the elevator car filling/emptying. Yes, it would be nice to have the traveler based entry/exit time ready.
As Felix have said, you have to use process flow to get an event for each person entering the elevator. I have not been able to find any documentation of the various events you can listen to, but "OnTravelerArrival" works. However, it doesn't wait for each traveller to enter before firing the next event, so it is still a problem to set the correct EntryTime. In the attached mode I listen to entries and set to entry time. I hope you can use it for inspiration.
Using Event-triggered Source and listning for for "OnTravelerArrival" combined with setvarnum could be useful. There is still some issues concerning detecting when an elevator is full and the operator have to wait for the next elevator car. I hope it can give you some inspiration.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name