FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
Demonstrating Map Array Initialization and Population
View full article
FlexSim 2025 LTS is now available for download.   You can view the Release Notes in the online user manual.   FlexSim 25.0.12 Release Notes   If you have bug reports or other feedback on the software, please create a new post in FlexSim Forums.
View full article
FlexSim 2026 Stable is now available for download.   You can view the Release Notes in the online user manual.   FlexSim 26.0.1 Stable Release Notes   If you have bug reports or other feedback on the software, please create a new post in FlexSim Forums.
View full article
Gather the statistics of total travel distance of a task executer that is created via process flow
View full article
When working with complex hierarchical models in FlexSim, referencing objects deep inside a structure can quickly become difficult to manage. When not using multiple centre port connections (which gets messy)  users often rely on manually created labels and pointers, but that in turn can  introduce extra work and inconsistency—especially when deciding whether a label should reference a single object or an array. This post describes a small set of user commands, packaged as an auto-installing user library, that automatically builds and maintains hierarchical object references based on each object’s role. The goal is simple: allow users to reference objects using intuitive chains like: current.printerCell.rewinder.turret without manually creating or maintaining those labels. What this does This system automatically: creates label pointers based on object roles (functionname) builds those references up the hierarchy optionally propagates system-level references downward handles single vs multiple objects automatically rebuilds everything on reset so it stays consistent How it is set up The functionality is delivered as: an auto-installing user library containing the commands a template container that includes: a reset trigger that calls: containerReset(current) predefined labels: functionname systemContainer Users can drop this container into their model and begin assigning functionname labels to objects. The rest is handled automatically at reset. Core concept Each object declares its role using a label such as: functionname = "rewinder" From this, the system builds references dynamically using only the tree hierarchy. A key point is that this is not limited to containers. Any object, including standard FlexSim fixed resources such as processors, sources, queues, and sinks, can and should also be given a functionname when you want it to participate in the reference structure. That means this system maps not just structure, but function. How it works 1. Reset seeds the reference map On reset, each relevant container calls: containerReset(current) This starts the process of rebuilding all references from the current tree structure. 2. Objects register themselves upward If an object has a non-empty functionname, it adds a reference to itself on the next relevant level above it. So if a rewinder contains a turret, the rewinder can gain: rewinder.turret 3. Non-functional levels are skipped If an intermediate object has no functionname, the logic recurses through it rather than making it part of the reference chain. That means purely structural levels can exist in the tree without cluttering the reference path. So a structure like: printerCell   └─ layoutContainer        └─ rewinder             └─ turret can still produce: printerCell.rewinder.turret even though layoutContainer exists physically in the tree. 4. System containers propagate references downward If an object has: systemContainer = true then its own functionname is pushed down to all contained objects. So if printerCell is marked as a system container, nested objects can directly reference: current.printerCell This makes it easy for deeply nested components to find the root system they belong to. 5. Repeated roles become arrays automatically If a label already points to one object and a second different object needs to be stored under the same role name, the value is automatically converted into an array. So if one rewinder contains multiple turrets, then: rewinder.turret becomes an array of turret pointers instead of a single pointer. Users do not need to decide this in advance. Works for both machines and factories A useful feature of this approach is that a “system” does not have to mean a single tightly integrated machine. A system can be: one complex interconnected machine acting as a whole one cell within a larger process a factory made up of linked but physically distinct cells As long as those objects live under a meaningful tree structure, the same logic works. A printer cell can be used as a standalone system, then placed inside a larger factory container and reset again to gain one more level of functional context. That makes the approach scalable from machine-level modeling to line-level or factory-level organization. Example model I’m also including an example printer cell model where the labels are not pre-populated. You can: open the model press Reset inspect the created labels on the objects Then you can place that same printer cell inside a factory container, reset again, and inspect the results after the hierarchy changes. That gives a simple way to see the library working in both a standalone and larger-system context. Implementation details Below are the three user commands that make this work. 1. containerReset(<container>) Purpose This is the reset entry point. It does three things: registers the current object upward on its parent if it has a functionname if the current object is a systemContainer, propagates a reference to itself downward through everything beneath it calls the recursive function that builds the rest of the pointer map below it So this command seeds both the upward and downward context, then delegates the deeper hierarchy building. 2. assertReference(<objectToAddReference>, <referenceName>, <referenceObject>) Purpose This utility adds a reference safely and automatically handles whether the label should be: a single pointer or an array of pointers If the label is empty, it stores a single object pointer. If it already points to a different object, it converts the value into an array. If it is already an array, it adds the new object only if it is not already present. This is what removes the need for users to decide ahead of time whether a role is unique or repeated. 3. assertallobjectpointers(<involved>, <container>) Purpose This is the recursive traversal function. It walks downward through the tree under container and looks for objects with a non-empty functionname. When it finds one, it adds a reference on current using that object’s function name. When it encounters an object with no functionname, it does not stop. Instead, it recurses further downward through that object’s children. This is the key to skipping non-functional levels in the tree. In effect, this command says: Starting from the current functional object, keep searching downward until you find the next lower functional objects, then create references to them. That is what allows the reference chain to reflect logical structure rather than every structural level. Why this is useful This approach gives you: cleaner, more readable code no manual label maintenance automatic support for one-or-many references a functional map of the model rather than just a physical tree better reuse of machines, cells, and factory-level groupings Instead of writing search logic, you can work with meaningful chains such as: current.printerCell.rewinder.turret Best practices Use role-based names Set functionname based on what the object does, not its instance name. Good examples: printerCell rewinder turret infeedQueue Less useful examples: object1 machineA testNode Be consistent across models If you reuse systems or templates, keep the same functionname values so code remains portable. Add functionname only where it adds value Not every object needs one. Use it on objects you want to reference directly in logic. Include fixed resources too Do not treat this as a container-only feature. Fixed resources such as processors, sources, queues, and sinks can also participate and often should as these will be the objects your want to setup, load or listen to. Use systemContainer deliberately Mark the objects that represent meaningful system roots. That may be a machine, a cell, a line, or a factory-level grouping. Expect arrays when a role repeats If multiple objects with the same function appear under the same functional parent, that reference will become an array. Keep the hierarchy meaningful Since this works purely from tree structure, the physical organization of the tree should support the logical organization of the model. Use it to remove search logic If you find yourself repeatedly searching for the same kind of object, that is often a sign that it should have a functionname. Summary This approach turns the model hierarchy into a self-maintaining functional reference map. By assigning functionname labels to meaningful objects and rebuilding relationships during reset with containerReset(current), the model can automatically expose useful object references without manual wiring. That works whether the model represents a single complex machine or a larger factory made up of linked but physically distinct cells. The result is cleaner code, easier maintenance, and a more consistent way to navigate hierarchical models.
View full article
The FlexSim Application Models is a collection of example models, techniques, and reusable solutions from the FlexSim Knowledge Base. 
View full article
This article lists off application models of AGV / AMR & Navigation Logic: AGV Systems, Visualizations and Analysis, Advanced AGV Behavior, GIS.
View full article
This article lists off application models of Material Handling: Material Handling Systems, Logistics & Supply Chain
View full article
This article lists off application models of Warehouse examples: Warehouse Systems, Order Fulfillment and Logistics, Logistics and Supply Chain.
View full article
This article lists off application models of Process & Utility Examples: Visualization, Utility and Specialized Tools, Process Flow Logic.
View full article
This article lists off application models of Statistic Examples: Custom Statistic Collectors, Custom Performance Measures, Visualization of Metric in Model view, Other
View full article
This article lists off application models of Optimization, AI, ML & Python Integration: Machine Learning, Optimization Models, Experimentation and Distribution Computing, Data Integration and Messaging, Python.
View full article
This article lists off application models of conveyor systems: Conveyor System Types and Applications, Routing and Sorting Systems, and Packaging and Item Handling
View full article
This article lists off application models for Module, Integration, & Library Examples: Modules, Integration and Development
View full article
This article lists off application models of Healthcare: Patient Flow Behavior, Facility and Resource Constraints, and Reference and Learning Models
View full article
This article lists off application models of Games and VR: Games, VR and Visualizations
View full article
Missed the FlexSim Summit or want to revisit your favorite sessions? The recordings are now available to watch on demand.   The summit featured presentations from FlexSim users, partners, and Autodesk experts covering a wide range of topics—from manufacturing and healthcare simulation to AMR fleets, system design, and the latest FlexSim product updates.   You can explore all the sessions here: https://www.autodesk.com/campaigns/flexsim-summit/overview   Highlights include: FlexSim product roadmap and developer Q&A Real-world customer case studies Advanced simulation applications and workflows What’s new in FlexSim Take a look and continue the conversation with the FlexSim community!
View full article
  When modeling arrivals or failures, it is common to reuse the inter-arrival time distribution as the one used to sample the time to first event. Except for memoryless processes (e.g., negative exponential), this is not statistically correct and introduces a left-bias where early events occur sooner than they should. The user command in the attached library generates a statistically valid time-to-first-event distribution from a definition of inter-arrival times.   Problem Being Addressed Inter-arrival distributions describe time between events, not time to the first event Reusing the same distribution biases early arrivals/failures Bias is most visible in: Short simulation runs Models without warm-up periods Models initialized with work-in-progress What the Command Does The command generates a sample set for time to first event using inter-arrival data provided as: A FlexScript distribution expression (string) An array of inter-arrival samples An existing Empirical Distribution object The process: Generates a timeline of events using inter-arrival samples Selects random observation points along the timeline Measures time to the next event Stores these values in a new Empirical Distribution object Runs the Fit function to suggest a best-fit distribution and parameters Output A new Empirical Distribution representing time to first event A fitted distribution expression (name + parameters) suitable for direct use Option to sample empirically or via the fitted distribution Typical Use Cases Time to first failure fields Arrival processes where warm-up is undesirable Short-term forecasting models Models requiring statistically defensible early-run behavior Why Use This Approach Avoids bias introduced by reusing inter-arrival distributions Produces statistically defensible results Reduces reliance on warm-up periods Especially beneficial when early statistics matter   How to Use the Command Loading the attached user library will auto-install the required user commands. The command createTTFeventDist creates an Empirical Distribution that represents the time to first event, derived from an inter-arrival time definition. Parameters P1 (string) Name of the new Empirical Distribution object to create. P2 (overloaded) Definition of the inter-arrival times. One of: A FlexScript distribution expression (string) An array of inter-arrival samples The name of an existing Empirical Distribution object P3 (optional integer) Number of time-to-first-event samples to generate and store in the new Empirical Distribution. (Default is suitable for most use cases.) P4 (optional integer) Number of inter-arrival samples used to construct the event timeline. (Larger values improve stability at the cost of run time.)   Example: Time to First Failure from a Weibull Inter-Arrival Process Assume failures follow a Weibull inter-arrival distribution, but the model starts at an arbitrary point in time and does not use a warm-up period. Instead of reusing the Weibull distribution directly for the first failure, generate a statistically correct time-to-first-failure distribution.  Open a script window and run this command with the example parameters: createTTFeventDist( "FirstFailureDist", "weibull(0,120, 1.8)", 5000, 100000);   This command: Generates a large inter-arrival timeline from 100000 samples of  the Weibull distribution Samples valid times to the next failure Creates an Empirical Distribution named FirstFailureDist Fits a theoretical distribution and reports suggested parameters (eg.  beta(-0.08, 356.54, 1.20, 4.89)) Using the Result in the Model You can now use the generated distribution in either of the following ways: Use the fitted distribution expression Copy the suggested distribution name and parameters into a Time to First Failure or arrival field. Reference the Empirical Distribution directly Sample from the Empirical object where a time-to-first-event value is required, choosing either: Fitted distribution sampling, or Empirical data sampling Both approaches ensure the first event is statistically consistent with the defined inter-arrival process.
View full article
FlexSim 2026 is now available for download.   You can view the Release Notes in the online user manual.   FlexSim 26.0.0 Release Notes   If you have bug reports or other feedback on the software, please create a new post in FlexSim Forums.
View full article
FlexSim 2026 Beta is now available.   FlexSim 26.0.0 Release Notes   To get the beta, log in to your account at https://account.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list.   The More Versions button does not appear when logged in as a guest account. The beta is available only to licensed accounts and accounts that have a license shared with them. Learn more about downloading the best version of FlexSim for your license here. If you have bug reports or other feedback on the software, please create a new post in FlexSim Forums.
View full article
Top Contributors