FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
FloWorks 22.2.0 is now available (31 August 2022). This version of FloWorks is intended for use with FlexSim 2022 Update 2. If you are using FloWorks with FlexSim 2022 Update 1, please use FloWorks version 22.1.1. If you are using FlexSim 2022 (LTS) please use FloWorks version 22.0.2. All versions can be found in the Downloads section of your FlexSim account on the 3rd party modules tab. Please do not hesitate to report any bugs, usability improvements and feature requests to support@talumis.com. About FloWorks FloWorks is a 3rd party module developed and maintained by Talumis BV ( talumis.com). It provides faster and more accurate modelling and calculation of fluid systems than the default FlexSim fluid library. It is especially useful within the oil, gas, and bulk industry both for production and supply chain optimization. This module requires a FloWorks license with active maintenance. For any questions, please email support@talumis.com. Release notes FloWorks 22.2.0 New: Added a Flow Gauge object to measure and visualize the flow through a connection New: Added a Time Series object to the Toolbox as a source of daily, weekly or monthly changing values Improvement: Added several alternative shapes for Flow Source such as Plant and Well Improvement: Level Triggered Event now has an OnTriggerFired event that ProcessFlow can await Bug fix: Some additional issues with incorrect scaling when not using meters Bug fix: Flow tank level triggers issue with multiple levels (not) firing All bug fixes in FloWorks 22.0.2 below. Backwards Compatibility Note: The following change may change the way updated models behave. Flow Impact Event has been deprecated and may be removed in the future. Picklist options for applying impact factors have been added to FlexSim's own MTBF/MTTR and Timetable. As an improvement, the same picklist options are also available in Down Behaviors. FloWorks 22.1.1 All bug fixes in FloWorks 22.0.2 below. FloWorks 22.1.0 (12 May 2022) All bug fixes in FloWorks 22.0.1 below. FloWorks 22.0.2 Bug fix: FlowMixer.loadRecipe can handle re-ordered product tables Bug fix: Statistics are now correctly initialized for flow tanks created during run. FloWorks 22.0.1 (12 May 2022) Added support for Object Property Tables Bug fix: incorrect MassFlowConveyor content Bug fix: LoadingPoint issue with not-released positions (and status) Bug fix: Object created at incorrect scale when not using meters
View full article
O link que segue leva a um vídeo no qual é apresentada UMA entre várias formas de criar a lógica de alocação de peças no Rack. Os tópicos abordados no vídeo são: Objeto Rack Configurações lógicas do Rack Exemplo prático Vídeo Tutorial: https://youtu.be/tTeRwjt--Eo
View full article
Update: FloWorks 17.2.1 has been released on September 18. FloWorks 17.2.0 for FlexSim 2017 Update 2 has been released. This new version of FloWorks has some major changes to align it with recent updates to FlexSim, such as dot syntax, Process Flow templates, and a revised user manual. The bug fixes in this version are also available for FlexSim 2017 Update 1 as FloWorks version 17.1.3 and for FlexSim 2017 (LTS) as FloWorks version 17.0.6. FloWorks downloads can be found in the Downloads section of your FlexSim account on the 3rd party modules tab. Please do not hesitate to report any bugs, usability improvements and feature requests to support@talumis.com. About FloWorks FloWorks is a 3rd party module developed and maintained by Talumis BV ( talumis.com). It provides faster and more accurate modelling and calculation of fluid systems than the default FlexSim fluid library. It is especially useful within the oil, gas, and bulk industry both for production and supply chain optimization. This module requires a FloWorks license with active maintenance. For any questions, please email support@talumis.com. Release notes FloWorks 17.2.1 Bug fix: Adding charts using "Pin" buttons would show error message. Bug fix: Incorrect reference in Wait For Event activity in Mixer recipe schedule template for Process Flow; disabled Repeat Schedule by default. Bug fix: FloWorks objects remove pending events from the list when they are destroyed. FloWorks 17.2.0 (September 1, 2017) For FlexSim version 17.1.x use FloWorks 17.1.3. For FlexSim version 17.0.x (LTS) use FloWorks 17.0.6. Added FlowObject class interface ("dot syntax") for majority of FloWorks objects. Can now access products by name when using FloWorks product table ( e.g. source.product = "Raw material" instead of source.product = 3 ). Can define recipes for products in the products table and dynamically load / execute them on Flow Mixers. Added Process Flow templates for mixers executing production schedule and flow tank with cleaning / certification. Updated Pin to Dashboard buttons to use Statistics Collectors to collect data. Revised most of the user manual (tutorials are missing, will be re-released in a future version). Bug fix: Calling SelectFlowIp and SelectFlowOp with multiple ports produced FlexSim error. Bug fix: When using a product table, sometimes the Product dropdown would not show the correct product when opening Properties. Bug fix: Flow Conveyor would not suspend correctly when output flow restricted. FloWorks 17.1.3 For FlexSim version 17.2.x use FloWorks 17.2.0. For FlexSim version 17.0.x (LTS) use FloWorks 17.0.6. Bug fix: Calling SelectFlowIp and SelectFlowOp with multiple ports produced FlexSim error. Bug fix: When using a product table, sometimes the Product dropdown would not show the correct product when opening Properties. Bug fix: Flow Conveyor and Mass Flow Conveyor can cause FlexSim to crash, when used in combination with a product table. Bug fix: Flow Conveyor would not suspend correctly when output flow restricted. FloWorks 17.0.6 For FlexSim version 17.2.x use FloWorks 17.2.0. For FlexSim version 17.1.x (LTS) use FloWorks 17.1.3. Bug fix: Calling SelectFlowIp and SelectFlowOp with multiple ports produced FlexSim error.
View full article
The Statistics Collector is a powerful object. Its purpose is to record data about the model run as a table, and it is very effect at doing that. However, it is very abstract; being abstract allows it to be highly flexible, but makes it more difficult to learn. This article is meant to help you understand (or remember) how the Statistics Collector models the problem of converting model data from objects and events into a table of data. This article compares a Statistics Collector to a train being loaded an unloaded. It is NOT an article about how to model a trainyard or other rail-industry systems. The purpose is to compare the Statistics Collector, which is very abstract, to something most people understand. So we'll start by talking about the story of a simple freight train. This story has the following elements: Starting - the train starts its journey a the beginning of the line Loading Stops - the train makes several stops along the way to load goods Unload Planning - unlike a normal train, this train determines where it needs to go after this point based on what was loaded into the train Unloading Stops - the train makes several stops along the way to unload goods This is a very simple story. Just keep the sequence in mind - the train starts, makes several load stops, figures out its destinations, and then makes several unload stops. To see how this is like a Statistics Collector, take a look at this model: StatsCollectorVisualization.fsm This model is very simple. It consists of a Source, Queue, Processor, and a final Queue: Items are generated at the Source and flow through the Model. Items have a Type label, so that there are three Types of items: Type 1, Type 2, and Type 3. If you zoom out, you'll see a much bigger section of the model: This section simulates the logic of a Statistics Collector. As the model runs, you'll see AGVs run along the track, like a train. You'll see them make several stops and pick up boxes. Then you'll see them stop at the "Table" (the bigger black box in the image above) and "unload" data into the table. The Statistics Collector tool is a lot like this simulation. It has an internal "train", and you reference that train with the keyword data. When you use the Statistics Collector, you are configuring the journey of the train, which determines what data is recorded in your table. Starting the Train The statistics collector creates a train (the data object) when it observes an event. You configure which events a Statistics Collector cares about on the Events tab. You can listen to many different things, including: A flowitem enters or exits an object A token enters or exits an activity The model is reset The model gets to the warmup time Whenever any of these things happen, the Statistics Collector creates a train (again, called data) and starts it going on its journey. In this example, the Statistics Collector listens for items to enter Queue1. It also listens for items to exit the processor. Either event will start a train. Loading the Train Once the train is going, the Statistics Collector "loads" the train with information. In reality, this happens by adding labels and setting values on data. First, data gets all the values associated with the event (the event parameters) assigned as labels. Then, data gets all the labels specified in the "Additional Labels" section. Finally, data visits the Row Value station. Here, the special property called rowValue is set. Note that as you load the train, you can use anything already on the train to get more information loaded on train. In the example model, the row value is set to "data.item.Type"; data is the train, and the "item" label is already on board, so the row value field can use that to load additional information. Unload Planning The next stop for the train is something that you can't really see, but that is very important. The Statistics Collector inspects the row value on data. The Statistics Collector remembers all row values that it has ever inspected, and it adds a row to the table for each unique row value. This is where the row value got its name. If the Statistics Collector sees a value it has never seen before, it adds a row to the table, and associates the new row with the row value. Once the row is either added or found, the Statistics Collector sets the property rowNum on data. So now, the train knows which row it is going to visit. All that is left in this phase is to figure out which columns the train will visit. First of all, if the row was added, the train will visit all the columns to set their initial value, which is called the Row Add Value (the value to set when the row is added). Whether or not the row was added by the event, the train will also visit any columns that are connected to the event, setting the value to the Event Value (the value to set when a connected event happens). So in summary, the Statistics Collector figures out which row the train will visit based on the row value, adding a row if necessary. If the row was added, then the train visits all columns in the row, to set the Row Add Value. If the event is connected to any columns, the train will also visit those columns, and set the Event Value. Unloading the Train Finally the train can unload data into the table. As it visits each cell, it unloads information into that cell. As the user, you configure what gets unloaded at each cell. You can unload anything into the cell, including anything on the train, anything connected to anything on the train, or anything globally accessible. In reality, whenever the Row Value or Event Value is evaluated, you can access and labels or properties on data. You can also use values on data to access other values. Or you can access global values, such as the current model time, or a Global Variable, or a value in a Global Table. In the example model, the Event Value field accesses the value that is currently in the table at the cell being visited by data. Does the statistics collector really have to travel? In the visualization model, the data train takes up time on the clock to load, plan, and unload. However, for the true Statistics Collector, all of that happens in zero time. For example, when an item enters Queue1, the real statistics collector in the model finishes updating instantaneously. In contrast, the visualized statistics collector train is still moving to get more labels. This is for illustration purposes only. What about "Update when accessed" columns? All Statistics Collectors know when something is trying to read their values. For example, if you have a chart pointed at a Statistics Collector, and that chart repaints, it will read the Statistics Collector. Or if you access the table through FlexScript with code like Table("MyStatisticsCollector")[1][1], that will read the Statistics Collector also. So in a way, it's just another event. However, there are two differences: You can't load custom labels on the train for this event; it "skips" those stops The train visits all rows in the table When you set a column to update when the value is accessed, you are basically connecting it the "OnAccess" event. So when the table is accessed, the data train visits all rows of the table. For each row, it gets the rowValue and rowNum properties set, and then it visits all the "update on access" columns. What about other features? This article just covers the basics, and doesn't cover other features of the Statistics Collector. Just know that there are many ways to configure the train's journey. For a full reference, see https://docs.flexsim.com/en/21.0/Reference/Tools/StatisticsCollector/ However, all of the features discussed in the reference add more detail; you can just improve your mental image of how the Statistics Collector works.
View full article
In version 2018 and on, you can make this chart by dragging the Throughput Per Hour by Type template from the dashboard library. If you install the template (available on the Advanced tab), you will see a Process Flow and a Statistics Collector appear in your toolbox. One of the most common questions from FlexSim users is as follows: How do I make a chart that shows the output every hour? You can make this chart in three steps. Configure the Statistics Collector First, you need a Statistics Collector. Make a new one in the toolbox (click the green plus button, select Statistics, and then select Statistics Collector). On the event listening tab, use the green plus button to add a timer event, and configure as shown here: This timer event will fire every hour (every 3600 seconds) in the model. Notice the shared label, that is storing all members of the Processors group as an array. We will use this label in the next step. Once you have configured the timer, then you need to set up the row mode for this collector. We want one row per processor, and we need to use the Processors label as the row value. Since the Processors label is an array, we will get three rows per timer event, each row corresponding to a processor. Finally, we can add the columns. The three columns are as follows: Time - use the pick list to select Model Date/Time from the Time menu Object - use the pick list to select ID of row value from the IDs menu Output - use the pick list to select Statistic by Object from the Object Statistics menu Use data.rowValue as the object value in the popup If you use the pick options to choose these options, then the storage type and display format options should be set automatically. With these three columns in place, we can watch the table populate. Reset and run the model at high speed. Every model hour, you should see a new set of rows appear, one for each processor in the group. The table will look something like this: Configure the Calculated Table The Statistics Collector table from the previous steps is close to what we want, except that the output value always increases as the model runs. But what about the output for just a single hour? To get that value, we can use a Calculated Table. Make a new calculated table, and give it the following query (in the Query field): SELECT Time, Object, ISNULL(Output - LAG(Output) OVER (PARTITION BY Object), 0) AS OutputPerHour FROM StatisticsCollector1 This query uses SQL window functions. Basically, it says that each row's value should subtract the previous row's value for the object. In addition, if that value is NULL (because it's the first row), then just use a value. If you reset and run the model, so that the collector table has at least a few rows in it, click the Update button to run the query. Notice that the Time and Object columns show numbers. This is because the Calculated Table can't infer the formatting of the column. To set the formatting, use the Display Format Tab. You may also wish the table to update every hour, with the Statistics Collector. Make the Chart Now that our data is correct, we can make a chart. Make a new dashboard, and create a Time Plot chart. Point the chart to the calculated table. Let's use the Time column for the X values, and let's use the OutputPerHour column for the Y values. In addition, make sure to split by the Object column. If the calculated table updates every hour, then running the model should create the chart shown at the beginning of the model. Here is the model used to create this chart (should work in 2017 Update 2 Beta or later; beta must be built on or after August 21, 2017). outputperhourdemo.fsm
View full article
Have you received this licensing error?   Operations error: 7288 The activation of the fulfillment is denied by the activation policy because fulfill count exceeded the available seat count.     Here are some common reasons you may encounter this error, along with some possible solutions.   All seats are already in use   Problem: All the seats of this license are already activated. There are no available seats left to activate.   Solution: You must return a seat from a computer where it is currently activated. Once a seat has been successfully returned it is available for a new activation.   If you are not sure where your license is currently activated, there are two main methods for finding out:   Go on a hunt: On each computer where the license may be activated, check the license status by opening FlexSim and going to Help > License Activation > View Licenses tab > press the View Licenses button. This will show you the license information for the current PC. Check the history: You can view your activation/return history from your FlexSim account's licenses page. On the Licenses page, expand the folders until you can see the Activation ID you are trying to track down. Click the Activation ID to load the history for this license. This history includes dates/times of the activations and returns. If the information is available it will also list the computer name where the license was last activated and the Windows username of the logged in user who completed the action. If the computer where your license was activated has been stolen, destroyed, wiped, etc., please contact your local distributor to discuss a solution.   Activation ID is obsolete   Problem: You are trying to activate an obsolete activation ID. An activation ID can become obsolete if it has been cancelled, replaced, or upgraded.   Solution: Make sure to use the most up-to-date version of your license. Log in to your FlexSim account to view your latest license codes.   Consider the following scenario: You purchased a FlexSim license and were emailed a license code. You used that license on your laptop for several years, upgrading FlexSim as new versions were released and following the prompts to upgrade your license as needed. Now you have purchased a new laptop. You successfully returned your license from your previous laptop. On the new PC you installed FlexSim and needed to get it licensed. You looked up your original license code from your years-old email, but when attempting to activate you received error 7288.   The reason is that over the years as you upgraded FlexSim you also upgraded your license code. The old, original license code is obsolete. You must log in to your FlexSim account to get the most recent license code. With the new license code you are able to successfully activate your license on your new laptop.
View full article
UPDATE (January 22, 2021): FloWorks 20.0.5 is now available. Except for critical bug fixes, this is likely to be the final bug fix release for FloWorks 2020. Please consider upgrading to FlexSim & FloWorks 2021. UPDATE (December 23, 2020): FloWorks 20.0.4 is now available. UPDATE (June 15, 2020): FloWorks 20.1.2 is now available. UPDATE (February 4, 2020): FloWorks 20.0.1 is now available. FloWorks 20.0.0 is now available (16 December 2019). This version of FloWorks is intended for use with FlexSim 2020. If you are using FloWorks with FlexSim 2019 LTS, please use FloWorks version 19.0.8. If you are using FlexSim 2019 Update 2, please use FloWorks version 19.2.2. All versions can be found in the Downloads section of your FlexSim account on the 3rd party modules tab. Please do not hesitate to report any bugs, usability improvements and feature requests to support@talumis.com. About FloWorks FloWorks is a 3rd party module developed and maintained by Talumis BV ( talumis.com). It provides faster and more accurate modelling and calculation of fluid systems than the default FlexSim fluid library. It is especially useful within the oil, gas, and bulk industry both for production and supply chain optimization. This module requires a FloWorks license with active maintenance. For any questions, please email support@talumis.com. Release notes FloWorks 20.1.3 (20 August 2020) All bug fixes included in FloWorks 20.0.2 below. FloWorks 20.1.2 (15 June 2020) Bug fix: Fixed exception in release of Flow To Item. Bug fix: Removed internal output to console. Bug fix: Removed redundant license check in old solver. FloWorks 20.1.1 (23 April 2020) Bug fix: Update script for FloWorks Custom Action activities. Bug fix / improvement: Library grid updated. FloWorks 20.1.0 (17 April 2020) Release for FlexSim 2020 Update 1. FloWorks 20.0.5 Bug fix: All products shown as black in some cases where product color table was broken. Bug fix: Items would sometimes not exit from previously blocked Item To Flow. Bug fix: Network solver gave incorrect result in some models using output ratios. FloWorks 20.0.4 Bug fix: Flow conveyor sometimes lags because of unnecessarily many content blocks. Bug fix: Removed redundant license check in model limit panel. Backwards Compatibility Note: The following change may change the way updated models behave. Bug fix: Several issues in the network flow calculation resolved. Bug fix: Flow pipe passes name instead of product ID in first On Product Out Change after reset. FloWorks 20.0.3 (02 September 2020) Bug fix: Input / output triggers were sometimes scheduled at infinity. FloWorks 20.0.2 (20 August 2020) Bug fix: Set content activity uses FlowTank in code header. Added "Max. content" option to picklist. Bug fix: Process Flow activity did not correctly set relative output trigger amount. Bug fix: Flow item tank reset content at end of warmup. Bug fix: Adding Process Flow activity created module dependency. Bug fix: Documentation for flow processor updated. Bug fix: Update script for FloWorks Custom Action activities. Bug fix / improvement: Library grid updated. Bug fix: Fixed exception in release of Flow To Item. Bug fix: Removed internal output to console. Bug fix: Removed redundant license check in old solver. FloWorks 20.0.1 (04 February 2020) Bug fix: Fixed incorrect berth configurations. Bug fix: Removed popup during startup. Bug fix: MODE_RESTART_FALLING was sometimes incorrectly #define d the same as MODE_RESTART_RISING . Bug fix: Several bug fixes and improved stability for the new (beta) solver. Documentation: updated Tank trigger levels description. FloWorks 20.0.0 (13 December 2019) Feature: Added Process Flow activities for FloWorks. Feature: Added Process Flow templates for Basic Berth and Tank Pool. User request: Added option not to checkout FloWorks license. Bug fix: Removed inconsistent behavior after (de)activating license. Bug fix: Tank level trigger could cause event list to become unsorted. Bug fix: Max. Object Depth setting in FloWorks charts was ignored.
View full article
FloWorks 18.1.0 is now available (10 April 2018). This version of FloWorks is intended for use with FlexSim 2018 Update 1. Update: Bug fix version 18.1.1 has been released on 18 April. In addition, FloWorks 18.0.2 has been released, containing bug fixes for FlexSim 2018 (LTS) users. All versions can be found in the Downloads section of your FlexSim account on the 3rd party modules tab. Please do not hesitate to report any bugs, usability improvements and feature requests to support@talumis.com. About FloWorks FloWorks is a 3rd party module developed and maintained by Talumis BV ( talumis.com). It provides faster and more accurate modelling and calculation of fluid systems than the default FlexSim fluid library. It is especially useful within the oil, gas, and bulk industry both for production and supply chain optimization. This module requires a FloWorks license with active maintenance. For any questions, please email support@talumis.com. Release notes Changes in FloWorks 18.1.1 Bug fix: "Change" field should be hidden on all Task Executers except Flow Task Execture. Bug fix: Changing configuration of Flow Task Executer would cause strange behavior because the window was closed before all scripts had finished executing. Bug fix: Some objects like Berth and Loading Arm no longer worked because code properties got untoggled. Changes in FloWorks 18.1.0 Pumps, valves, blenders and splitters are now different shapes of the same "Flow Processor". Truck loading points and Berths are now different shapes of the same "Loading Point". Cylindrical tanks, rectangular tanks, tanks with polygon base area and flow piles are now different shapes of the same "Flow Tank". Added button to flow tank to calculate physical size based on specified max. content. Flow pipe has animation to help visualize if material is flowing and how fast. Added post-step delay and trigger to multi-compartment loading controller steps. Added Start Impact Event and End Impact Event triggers. FloWorks chart templates have been added to the library. All changes to version 18.0.2 listed below. Changes in FloWorks 18.0.2 (for FlexSim 2018 LTS) Bug fix: Conveyor sometimes stops incorrectly. Improvement: Objects try to avoid On State Change when state has not changed.
View full article
The latest release of FloWorks 19.0.4 is now available (19 July 2019). This version of FloWorks is intended for use with FlexSim 2019 LTS. FloWorks 19.1.2 is available (19 July 2019) for use with FlexSim 2019 Update 1. FloWorks 2019 introduced some major changes in the way FloWorks works internally. These changes include the following: Flow rates and content are now tracked in the standard statistics variables, requiring us to override fewer FlexSim features. This means, for example, that you can use all of FlexSim's included Statistics Collectors and Chart Templates out-of-the-box. FloWorks now tries to schedule fewer events. This means that models will run faster and debugging your model by stepping through has become much more transparent. This release includes the beta version of the next-generation solver. This solver is particularly suited for networks with many connections, most of which are closed or blocked, or long 'chains' of objects with a single connection in and out. By simplifying the flow network before calculating the flow rates, the solver should become much faster overall. Since this solver is likely to give (valid but) different outcomes, it is not enabled by default - you can test it by enabling the "Optimize networks before solving" option in your Flow Control. The Flow Tank level triggers functionality has been overhauled. For more information, please see the detailed release notes below. All versions of FloWorks can be found in the Downloads section of your FlexSim account on the 3rd party modules tab. Please do not hesitate to report any bugs, usability improvements and feature requests to support@talumis.com. Thanks to the active users who have done this in the past weeks, we appreciate your ongoing support in helping us to improve FloWorks! About FloWorks FloWorks is a 3rd party module developed and maintained by Talumis BV (talumis.com). It provides faster and more accurate modelling and calculation of fluid systems than the default FlexSim fluid library. It is especially useful within the oil, gas, and bulk industry both for production and supply chain optimization. This module requires a FloWorks license with active maintenance. For any questions, please email support@talumis.com. Release notes Changes in FloWorks 19.1.2 (19 July 2019): Bug fix: dragging in a shape from a group will no longer create the first shape in the group. All changes included in version 19.0.4. Changes in FloWorks 19.1.0 (30 April 2019): This version is for FlexSim 2019 Update 1. For FlexSim version 19.0.x use FloWorks 19.0.3. Added support for unconstrained flows. All changes included in version 19.0.3 described below. Backwards compatibility note: The following change may change the way updated models behave. Option "Unchanged" removed from "Set flow rate" triggers -- this is now considered as "Unconstrained". Use the "Set maximum input/output rate" option instead of "Set maximum rates" if you only want to change either the input or the output rate. Changes in FloWorks 19.0.4 (19 July 2019): Various bug fixes to the Mass Flow Conveyor. Bug fix: Utiliation returns (flow rate)/(max flow rate) at time zero. Bug fix: Solved exception when dragging different object shape into the model. Backwards Compatibility Note: The following change may change the way updated models behave. Bug fix: 'Time until event is 0' exception due to rounding errors fixed. Bug fix: Mixer On Empty event will only fire once (when mixer is actually internally idle). Changes in FloWorks 19.0.3 (30 April 2019): This version is for FlexSim 2019 LTS. For FlexSim 2019 Update 1 use FloWorks 19.1.0. Loading arm state will show Blocked and Starved instead of Idle while transporter is connected. "Pass product downstream" option added to product change trigger of flow processors. Bug fix: Transporters were sometimes positioned incorrectly when entering Loading Point. Bug fix: Flow object states were not updated. Bug fix: Fixed error when calling state() with no arguments. Bug fix: On Entry and On Exit in trigger list of Flow To Item and Item To Flow fixed. Bug fix: "Pass product downstream trigger" threw exception when connected to Flow To Item. Changes in FloWorks 19.0.2 (3 April 2019): For FlexSim 2019 Update 1 beta use FloWorks 19.1.0 (beta). Feature: Flow tank can scale in both directions (elliptical) instead of only using x-size for diameter. Bug fix: Various bug fixes to beta version of new optimizer/solver. Bug fix: Removed "content is larger than max. content" message during reset. Bug fix: Fixed exception in "Pass product downstream" when pipe is not connected to anything. Bug fix: Corrected normals on flow blender and flow splitter shapes. Bug fix: FlowObject.input /output.ports[index] now accepts Variant (e.g. token.Port ) as index and does bounds checking on index . Bug fix: Spheres no longer drawn outside flow pipes shorter than 2 m. Bug fix: Quick Properties only shows a single flow rate for flow pipes; output rate set to input rate on reset. Changes in FloWorks 19.0.1 (8 March 2019): Beta: Flow control can optimize network before solving. (Optimization is disabled by default, can be enabled for models with many (effective) single connections.) Content-holding objects now have On Trigger Level event that allows e.g. Process Flow to wait for a specific level trigger. Optimized event scheduling: obsolete events are removed from the event list instead of ignored. FlowToItem and ItemToFlow added to script so that rates and impact factors can be read and set. Added more shapes for Flow Tank and Mixer. Added "Change product by case" to trigger options. Bug fix: Flow conveyors now have state profile consistent with that of Flow Tank. Bug fix: Product color picker samples colors instead of objects again. Bug fix: Fixed incorrect layers being drawn during filling of Flow Mixer when multiple steps require input from the same port. Bug fix: Fixed incorrect states on Loading Point due to duplicate state_current node. Bug fix: Product field or dropdown will now preserve selected value instead of resetting to current product when switching property tab pages. Bug fix: Flow Task Executer connects itself to default network navigator on creation. Bug fix: Flow statistics now behave correctly under model warmup. User manual: Corrected description of FlowObject.stop() in documentation. User manual: Documented manual loading feature when Loading Points have 0 loading time. Backwards Compatibility Note: The following change may change the way updated models behave. Statistics are now kept in standard FlexSim tracked variables under the stats node. If you use dashboards, you may need to rebuild some charts. You can mostly use the standard FlexSim chart templates, listening to the On Rate Change event or the On Content Change Update (not Change). Tank trigger levels rewritten: Trigger levels are now specified using absolute level instead of percentage. Legacy limitations (max. 20 levels, no duplicate levels, 0% or 100%) have been removed. Separate trigger condition has been added to avoid coding ( if(mode == falling) { ... } ). Modes rising and falling are now called MODE_RISING and MODE_FALLING . Bug fix: Sometimes input and output triggers would not fire if trigger was reached precisely when flow was recalculated. (Mass) flow conveyor now closes input/output when stopped, instead of input/output ports. Loading point continues with next transporter after releasing completed item instead of waiting for it to exit. Bug fix: (Mass) flow conveyor only closed input when stopping; now closes both output and input.
View full article
FlexSim 2018 Update 1 is available. If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Development space. Release Notes Added a Database Connector tool and Database FlexScript API. Updated the Emulation module and added it to the toolbox. Updated object triggers to be dynamically added and executed to improve performance and flexibility. Added an option to store StatisticsCollector bundle data on the hard drive. Added a global preference for date and time formats, which will default to the system's locale settings. Updated the stick() command to be able to get information about the VR headset by passing -1 for the stick number. Added a Box Plot chart type. Added a visual Walls object, which can be connected to A* as a member. Added an option to reverse rows on a gantt chart. Updated how the gantt chart handles colors. Added a time window option to several charts. Improved axis title options on several charts. Added a y-axis range option to the time plot. Output, system, and compiler consoles now wrap lines. Added a binoculars button to the bottom of properties windows. Fixed a bug with using local variable "a" within FlexScript lambda commands, such as findmatch(). Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Removed FlowNode, Reservoir, WatchList, and other unused library class objects. Changed transportincomplete() to be more fail-safe so that it only affects the object when called correctly. Fixed an issue with the Rack sometimes receiving items out of order when the upstream object is using a transport. Process Flow Added a Variable shared asset. Updated the Event-Triggered Source and Wait for Event activities to be able to match values. People Added a Waiting Line object and a Wait in Line activity. AGV Fixed a bug with preempting an AGV during a pre-arrival event. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Improved AGV proximity detection for stop-space-based accumulation. Fixed an issue with reversing direction on accumulating paths. A* Added a routing mode for traveling at right angles only. Added an option for stopping and turning when changing directions. Added an option for routing by travel time. Improved the usability of creating and editing barriers and dividers. Added an option for snapping dividers between grid points. Fixed some visual issues with various components. Fixed a bug with distancetotravel(). Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Improved the accuracy of the calculation of which grid points are affected by dividers. The mechanism for recovering from deadlock has been changed. The path costing system was slightly changed to allow for travel-time-based routing.
View full article
I'm attaching a user library and an example model that contains process flows for two types of merge controller. The main advantage of both of these is that the release strategy is consolidated into a single list pull query, so that you can have incredible flexibility in defining custom release strategies just by adjusting a single query. Several query examples are included and explained. The DPClearingMergeController uses the standard merge controller mechanism that utilizes decision points and the merge controller's lane clear table to determine when slug lanes are clear for release. Alternatively, the FixedGapMergeController customizes lane release times for an optimal target gap between released slugs. This, combined with a good release strategy, can maximize total merge throughput. Here's a view of the fixed gap merge control running. Notice how it tries to time the releases so the slugs line up pretty close on the take away lane (the target gap here is 3 feet). And below is a screenshot of the fixed gap merge control process flow. mergecontrollerprocessflows.zip This model and library were created in 16.1.0.
View full article
FlexSim 2021 Update 1 Beta is now available. 21.1 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. Subsequently 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 email dev@flexsim.com or create a new idea in the Development space.
View full article
Using Mixamo Fuse, Mixamo, and (optionally) 3ds Max, you can create animated characters for use with FlexSim. For modifying the existing operators' animations, see Adding More People Animations From Mixamo Character Creation You can customize a character’s look using Mixamo Fuse: After creating the character, you can save your character as a .fuse file in case you want to edit it again later in Mixamo Fuse. Character Rigging From Mixamo Fuse, you can press the Animate button in the upper-right corner to upload the character to Mixamo’s website to apply animations. You will need to log in with a Mixamo account. You will be presented with the Mixamo Auto-Rigger. After a few moments, your character will appear in a view with a default animation applied. Choose whether to enable facial blendshapes and select the appropriate level of detail for the skeleton, such as 2 Chain Fingers, and then press Update Rig. The auto-rigger will reapply and the view will be updated with the newly rigged character. If the settings are good for your needs, press the Finish button. Character Animating Once the character is rigged, you can select it on the Mixamo website and press Find Animations to find animations to apply to the character. You can search for animations and add them to packs. For each animation, you can adjust various parameters to fit your character to that animation better. Exporting the Character and Animations Once you have applied and customized animations for your character, you can add them to the Cart and checkout in order to have them available for download. After checking out, you can select an animation or animation pack to download on the My Animations page. You can apply the same animation sets to different characters using the Change Character button after selecting the animation set. Press the Queue Download button to tell the Mixamo server to create the files for download. You want to use the FBX format so that we can edit it with 3ds Max. The pose can probably be T-Pose or Original because the Original is probably a T-Pose anyway. I use 30 Frames per Second for consistency and ease of timing animations. Keyframe Reduction didn’t seem to do anything in my tests, and you can do it yourself with more control in 3ds Max so I use “none.” If you exported multiple animations, the output will contain one fbx file that is the character shape and several other fbx files that contain only animation data for each animation. (Update) Important Note: Starting with FlexSim 2017 Update 2, the rest of the steps in this document are no longer necessary. FlexSim 17.2 added support for embedded textures, specular maps, and gloss maps that fix the material issues directly without modification in 3ds Max. FlexSim 17.2 also added support for assigning animations to a shape from multiple files, so you can import the mixamo output files directly without having to merge all the animations into a single file. The following steps can be used if you want to optimize or otherwise modify the shape files, but are no longer required. Preparing the Character using 3ds Max Import the character shape .fbx file into 3ds Max and save the file as a .max file. You will want to resave as a .max file at different points with different file names as you progress so that you can easily revert back to a previously known working point if something messes up. The FBX Import window will show you lots of options you can modify. The defaults seemed to work fine. I tried messing with the “Units” scale factor and file unit conversions, but I was unable to find any options that improved the scaling in FlexSim. Ultimately, I found it best to just use Automatic and sort out the units myself using FlexSim’s shape factors. Export the file as fbx and bring it into FlexSim to see how it looks. Again, the default options seem to work fine. In FlexSim, the size will probably be 100x too big (no matter what “unit conversion” options I seemed to set in the import/export options). Resize the character to be 100x smaller. Fixing the Materials in 3ds Max When you first bring in a Mixamo Fuse character into FlexSim, it will probably look shiny and dark. That can be fixed in 3ds Max. Open the Material Editor using the button Double-click each material in the list of Scene Materials on the left to add it to the middle view for editing. Press the “Lay Out All – Vertical” button to arrange the nodes nicely in the middle view. When you imported the .fbx file, 3ds Max should have automatically unpacked its textures into a directory called CharacterFileName.fbm. When you double-click on a texture node in the Material Editor view, you should be able to see and edit the path where it is referencing each texture in the Material Parameter Editor pane on the right. Removing the shininess Each material has Ambient, Diffuse and Specular colors, in addition to any textures that are mapped to various channels. The operator is shiny everywhere because each material’s Specular color is set to White and their specular maps are mostly black. Since FlexSim doesn’t currently read specular maps and gloss maps, the white specular color is being applied everywhere instead of the black color from the specular maps. To fix it, click each specular map and gloss map in the center view and delete them with the Delete key. Then double-click on each main material and set its specular color to black to turn off the shininess. Save the .max file with a new name, and re-export the .fbx file to test it in FlexSim. The shininess should be gone. Brightening the darkness FlexSim uses Assimp to read fbx files. Assimp’s fbx importer is setting a default Ambient color value of dark gray to the materials instead of leaving it off. This is why the character looks darker than he should. To fix it, we can simply specify an ambient color of white on each material. For each material, set the ambient color to white and check the Ambient Color box under Maps: Save the .max file with a new name, and re-export the .fbx file to test it in FlexSim. The darkness should be fixed. Setting local texture paths Based on the procedure above, the texture paths are likely to be absolute paths when you export the fbx file. You can fix that by saving the .max file, the .fbx file, and the textures all in the same directory. In Windows Explorer, copy all the useful textures from the CharacterName.fbm directory into the same directory where you have been exporting the .fbx file. Then also save your .max to that same directory. Once everything is in the same directory, you can reselect the texture file paths for each material so that they are pointing at these files instead of the other files. Then, when you export the fbx file, each texture’s path will be relative so you can copy all the necessary files onto any computer and use them correctly. After changing all the materials, export the fbx file again. You should be able to copy the fbx file and all its textures into a directory on a different machine and have them display properly. Save your .max file with all the updated materials. Making part of the object change color To make a material show the FlexSim color, append _fsclr to its name in 3ds Max: Configuring Animations With the character loaded, you can import the fbx files with just animation data, and it will automatically apply that data to the shape. The slider at the bottom controls the currently applied keyframe. The buttons in the bottom corner play the animation, pause, or step between keyframes. Animation data can be stored beyond the relevant range. You can open the Time Configuration dialog by pressing the button in the bottom corner. In that dialog, you can specify the speed of the playback and set a Start Time (keyframe number) and End Time for the animation you want to see in the viewport when you play. This dialog is only changing the playback options in the software; the actual data outside the specified range is still preserved. You may need to adjust these values as you import/modify/combine animations into one Timeline. Keyframes If you push the button on the top toolbar, it will open the Track View – Curve Editor. You can edit and modify Keyframes through this view. Click in the left pane and press Ctrl-A to select everything in the model. You should see keyframes appear if you have animation data loaded. Sometimes this window doesn’t refresh correctly and you can’t find keyframes. You can try closing it and reopening it, or pressing the and buttons to re-center the view on the keyframes in the configured time range. To edit the animations, you need to be able to see the keyframes in this view. You can drag the current frame by dragging the yellow bar around. You can zoom by scrolling the mouse wheel. Ctrl-mouse wheel will zoom the timeline (X-axis) without zooming the key values (Y-axis). You can select keyframes by dragging a rectangle around them. You can delete selected keyframes with the Delete key. You can move keyframes by dragging them. If you hold Ctrl while dragging them, then it will force the movement to be only along the X-axis and not along the Y-axis so that you don’t actually edit the keyframe’s values, just its time. You can duplicate keyframes by holding Shift and dragging them. Again, holding Ctrl will prevent the new keyframes’ values from shifting by holding the Y-axis still. You can scale keyframes by selecting them, putting the key keyframe indicator on the first keyframe in the selection, picking the menu option Edit > Transform Tools > Scale Keys Tool, and then clicking and dragging on one of the selected keyframes to scale all of the selected keyframes towards the yellow bar. This can be helpful to sync the timing of animations, such as walking empty vs. walking loaded. Preparing Animations for Merging When you load an animation into the file, the Track View – Curve Editor will show you the individual components that have keyframe animations. Different animations may affect different components and the interpolation of transformation information between keyframes may get messed up when you merge different animations that affect different components together into one timeline. To fix this, you can stamp a keyframe at the beginning and end of each animation that stores each component’s position at that point. You can also duplicate the first and the last keyframes to make it easier to specify perfectly-repeating animation clips in FlexSim later. Stamp a keyframe by moving the current frame (yellow line) to the keyframe you want. Then select all within the Track View – Curve Editor to select every component. Finally, press the Set Keys button ( ) at the bottom of the main 3ds Max window to store each component’s value as a keyframe. Duplicate keyframes by holding Shift and dragging them. Also holding Ctrl will prevent the new keyframes’ values from shifting by holding the Y-axis still. Merging Multiple Animations into One File To merge multiple animations into one file, you need the export each of the animations as an animation file (XML Animation File (*.xaf)). Then you can import each of these animations into a specific range of keyframes in the timeline. From the .max file without any animations loaded, import one of the fbx animation files. It will automatically apply it to the shape. Click in the Perspective view and press Ctrl-A to select everything. Then prepare the animation using the information above. Lastly, select the menu option Animation > Save Animation to save the animation as an XML Animation File (*.xaf). Reload the .max file without any animations and repeat this process for each animation you want to merge. Reload the .max file without any animations loaded. Click in the Perspective view and press Ctrl-A to select everything. Then select the menu option Animation > Load Animation to load an animation into the timeline. On the right side of the Load XML Animation File dialog, you can specify the keyframe number at which the animation should be inserted. Do not insert the animation at keyframe 0; make sure that keyframe 0 is the bind T-pose. This will be important later if you want to edit the mesh without breaking the skeletal rigging. You also need to be sure to specify Absolute and not Relative. Select the animation you want to import, specify the keyframe you want to insert at, and then press Load Motion to load the keyframes into the animation. Do this for each animation file you want to merge. Use the Track View – Curve Editor to determine the keyframe at which to insert each subsequent animation. Save your .max file with all the merged animations to a new file. Modifying the Mesh without Breaking the Rigging Sometimes you may want to modify the mesh after you have applied animations. I can’t guarantee that this always works perfectly, but there is a way to make some tweaks even after animations have been applied. Before trying to edit a skinned mesh, be sure to save your work so you can revert back to a clean state if something don’t work correctly. First, you need to be sure that the bind pose is frame 0 and that you are set to frame 0 on the timeline. Second, click on a mesh in the scene and click on the Modifiers tab. You will probably see an Editable Poly with a Skin modifier applied. If you click on the Skin modifier and expand the Advanced Parameters, you will see an Always Deform checkbox. If you clear the Always Deform box, you can then click on the Editable Poly and modify it. You then need to recheck the Always Deform box on the Skin modifier once you are done making edits. Ensure that your animations still work after making edits. In my tests with the operator shape above, when I cleared Always Deform, the mesh moved up slightly. This made the Tops mesh not line up correctly with the Body mesh. To fix that, I cleared and immediately checked Always Deform for each mesh (each mesh then moved up the same amount). Then I verified that the animations still worked and that the arms still lined up correctly with the shirt. Reducing Polygon Count 3ds Max has features for reducing the polygon count of an object. You can apply these modifiers without breaking the rigging by following certain steps. You can display the polygon count of your shape by clicking in the Perspective view and pressing the 7 key on the keyboard. As stated above, before modifying the mesh, clear Always Deform on the Skin modifier. To reduce the polygon count, you can use the ProOptimizer modifier. After clearing Always Deform, click on the Editable Poly and then select ProOptimizer from the Modifier List to add it to the stack between the Editable Poly and the Skin modifiers. In the Optimization Options, be sure to check Keep Textures. Then press the Calculate button. Then you can specify a Vertex % and it will start to remove vertices from your mesh. After applying the ProOptimizer modifier, the normals on your mesh might be messed up. You can recalculate the normals based on a crease angle using the Smooth modifier. Apply the Smooth modifier after the ProOptimizer and before the Skin modifier. Check the Auto Smooth box and specify a Threshold. You can use a value of 89 to get a very smooth surface, only applying a crease to angles that are greater than 89 degrees. After making these changes, be sure to recheck Always Deform on the Skin modifier, and test your animation to make sure the rigging is all still working properly.
View full article
FlexSim 2022 Update 1 is now available for download. For more in depth discussion and videos of the new features, check out the official software release page: Official Software Release Page - FlexSim 2022 Update 1: Python Connector, Coroutines + more You can view the Release Notes in the online user manual. FlexSim 22.1.0 Release Notes If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Development space.
View full article
FlexSim requires modern graphics support to run well. Most modern computers from the last few years have no problem running most FlexSim models, but sometimes there are graphics configuration issues that keep FlexSim from working properly. Common symptoms The model 3D view is black or blank. You should see the model view default to a 3D grid. The 3D grid appears, but does not respond to user interaction. You should be able to click and drag the grid to pan (left-click-drag) and rotate (right-click-drag) the view. Click the grid to select it then scroll your mouse wheel - this should zoom the 3D view in and out. Unable to drag an object onto the grid. You should be able to click and drag an object from the Library and drop it onto the 3D grid. It should appear at the location of your mouse. Unable to interact with objects in the 3D view. You should be able to double-click an object to bring up its properties window, or single click to highlight, or click and drag to move it about the 3D grid. Conveyors or other objects are not drawing to the view. Unable to create connections between objects. User interface elements and other GUIs are not displaying correctly. Solutions If you are experiencing any of these issues, it is most likely a graphics compatibility issue. Here are common steps you can take to solve the problem: Open FlexSim's default workspace to reset any potentially corrupted view windows. To do so, from FlexSim's main menu, go to View > Open Default Workspace. Any open windows will be closed and the default 3D view and tool panels will be opened. This could clear up potential issues with 3D or Process Flow views, tools panels, or properties windows. Check that your computer meets FlexSim's minimum system requirements. Review FlexSim's minimum and recommended system requirements. Check this article for an in-depth explanation of hardware considerations. Update your graphics driver to the latest version. This almost always solves graphics issues and is the preferred solution whenever possible. It enables the maximum performance from your graphics hardware and eliminates bugs and glitches in previous drivers. Check out HowToGeek.com's article for a primer on updating graphics drivers. Always go directly to your graphics manufacturers website ( Intel, AMD, or Nvidia) to get the latest drivers for your graphics hardware. Do not trust that Windows Update always gives the latest graphics drivers - in fact it rarely does. Not every user has the proper administrator privileges on their computer necessary to update drivers, so you may need to contact someone in your IT department for help. Try a different graphics driver. If the graphics aren't working correctly and you downloaded the latest driver for your hardware directly from Intel, AMD, or Nvidia, try instead using the latest driver from the computer manufacturer such as HP/Dell/Lenovo/Asus/Acer, etc. If you are already using the latest driver from your computer manufacturer, try using the latest driver from the graphics card manufacturer: Intel, AMD, or Nvidia. Try starting FlexSim with higher permissions by right-clicking the program icon and choosing Run As Administrator. If you don't have admin rights, you will be prompted to enter credentials with admin rights. Enter the proper credentials and the software should start with elevated permissions. Does this solve the problem? Some users have reported certain linked libraries used by FlexSim are blocked by default, but can run properly when FlexSim is started with elevated privileges. If you find this is the case for you, work with your IT group to determine how to unblock the DLLs required by FlexSim. Try turning off Shadows by going to File > Global Preferences > Graphics tab, and uncheck the option Use Shadows. Click the Apply button, then close. Restart FlexSim to see how it responds with this changed setting. Try switching to a different OpenGL Context by going to File > Global Preferences > Graphics tab, and make a new selection for OpenGL Context. Hit Apply, then close. Restart FlexSim and see how it responds. Start with Recommended, then try Core Profile (3.3). If Core Profile (3.3) still doesn't work, try Generic. The Generic context is the last resort option, and is equivalent to the Compatibility mode option in versions of FlexSim previous to 2017. Compatibility mode/Generic Context is not intended for long term use. Revert to this mode only if you must use a computer that doesn't meet FlexSim's minimum system requirements. Test with other 3D applications. Your computer hardware or operating system may have an underlying problem that is causing your graphics issue. You may be able to test this by starting different 3D-accelerated applications or games on your computer. Do other applications besides FlexSim have graphics issues? If so, and you have already tried upgrading your graphics drivers as described above, you may need to contact your IT department or your computer's manufacturer for support. You may have hardware or other issues that prevent your 3D graphics from working properly. Contact FlexSim to let us know that your computer meets FlexSim's minimum system requirements you have installed the latest drivers for your graphics card other 3D-accelerated applications on your computer work just fine but your FlexSim installation still has graphics issues. If this is the case, there may be a software problem in FlexSim that should be addressed. When contacting us about your graphics problem, please include the following: Describe your symptoms in detail. Screenshots are very helpful. For each of the troubleshooting suggestions above, what did you try? What was the result? Please include a screenshot of your FlexSim installation's About FlexSim popup (from FlexSim's main menu > Help > About FlexSim...). This gives us info about your FlexSim version, your graphics hardware, and your graphics driver: A screenshot of your Windows Device Manager, with Display Adapters expanded, is also helpful for our troubleshooting. This gives us additional information about your graphics hardware: Special Cases Nvidia Quadro cards have many different driver versions. We have had good success using the ODE driver (‘Optimal Drivers for Enterprise’). Another option that sometimes improves Quadro compatibility with FlexSim is to open your Nvidia Control Panel and change 3D settings to "3D App - Game Development": Your laptop may have both Intel Integrated graphics and Nvidia/AMD accelerated graphics, and the ability to automatically switch between them depending on the application's 3D requirements. This is a great feature and helps to maximize your battery life. FlexSim should be automatically recognized as a program that should use discrete graphics acceleration, but in case it is not, you may need to set it manually within the Nvidia or AMD Control Panel. Here is the Nvidia Control panel. You can specify an acceleration profile for FlexSim under 3D Settings, Manage 3D settings, Program Settings tab: Click 'Add' and browse to the flexsim.exe executable (default install path is C:\Program Files\FlexSim <version>\program\flexsim.exe). You then have the ability to tweak any and all settings for your FlexSim graphics. The defaults are usually fine, but feel free to play around to tweak things to your liking.
View full article
Receiving products from the bottled water manufacturing plant using 11 Rial Guide Vehicles (RGVs) for transportation to the Automated Storage and Retrieval System (ASRS), which serves all three production lines. The RGVs' operation works as follows: when products are placed in the receiving buffer with two available positions, the system immediately sends commands to the RGVs to pick up the products from the buffer. The RGVs prioritize picking up the nearest products first. Consequently, the production line located farthest away (Production Line 1) experiences the highest downtime from January to May 2566, with an average downtime of 449.48 minutes. Production Line 2 has an average downtime of 65.12 minutes, while Production Line 3 experiences 76.00 minutes of downtime during the same period. If a production line stops for more than 20 minutes, it requires a complete drainage of the ongoing production process, including scrapping all unfinished goods. This significantly increases the production costs. Consequently, conducting experiments to address this issue becomes complicated, as full-scale production is necessary to identify the causes and implement effective solutions. Thus, stopping production for testing purposes is not a viable approach in this case.
View full article
This article explores an example model. In this model, items on downstream lanes are able to reserve dogs so that items on upstream lanes cannot use them: reservedogdemo.fsm About Dogs in FlexSim FlexSim simulates dogs on a power-and-free system in an extremely abstract and minimal way. A dog isn't a persistent entity at all. Instead, FlexSim calculates where dogs would be, given the speed, and when they would interact with items. This has a huge performance benefit. But if your logic needs items to interact with specific dogs, this can pose a problem: how do you interact with such an abstract entity? The Catch Condition The only time you can "see" a dog in FlexSim is during the Conveyor's Catch Condition: https://docs.flexsim.com/en/23.1/Reference/PropertiesPanels/ConveyorPanels/ConveyorBehavior/ConveyorBehavior.html#powerAndFree The catch condition fires when a dog passes by an item. If the catch condition returns a 1, the item catches the dog and transfers to the power and free conveyor. If the catch condition returns a 0, the item does not catch the dog. During the catch condition (and only during a catch condition), you can learn many things about a dog: ID - each dog has an ID. The ID is derived from the length of the conveyor and by the distance the conveyor has travelled. If a conveyor is 26 dogs long, the dogs will have IDs 1 through 26. Location - Since an item is trying to catch the given dog, you can derive the dog's location from the items location. Speed - The conveyor that owns the dog is "current" in the catch condition. So you can get the speed of the conveyor at that point. We'll use all these pieces of information in a moment. Creating Tokens to Represent Dogs The first real insight into this model is to make a dummy item. The purpose of this dummy item is to cause the Catch Condition to fire. It never gets on the conveyor. But when the catch condition fires, it makes a token that represents the dog. In this example, that item has a label called "DogFinder" Here is the relevant code from the catch condition: if (item.DogFinder?) { Object pe = current.DogPE; if (pe.stats.state(1).value == PE_STATE_BLOCKED) { return 0; } double dist = current.MaxDogDist; double speed = current.targetSpeed; double duration = dist / speed; if (!item.labels["DistAlong"]) { item.DistAlong = Vec3(item.getLocation(1, 0, 0).x, 0, 0).project(item.up, current).x; } Token token = Token.create(0, current.DogHandler); token.DistAlong = item.DistAlong; token.Conveyor = current.as(treenode); token.Duration = duration; token.DogNum = dogNum; token.Speed = speed; token.DetectTime = Model.time; token.release(1); return 0; } There's a lot going on in this code: This logic only fires for the fake dog finder item If the photo eye just upstream from the dog is blocked, that means there is an item, and this dog is not available. Return here if that's the case. Figure out how long this dog will last (the duration), assuming the conveyor runs at the same speed. In this model, there's a label on the conveyor called MaxDogDist. This is the distance from the PE to the end of the conveyor, minus 2 meters. If this is the first dog ever, calculate the position of the dog, given the position of the item. Store that on a label. Create a token with all kinds of labels. We'll need all this information to estimate where the dog is later, and to estimate how far it is from other items. Pushing Dog Tokens to a List Once the token is made, we need to push it to a list, so that items can pull them. If all your items are the same size, you can just push the token to a list directly. In this model, however, there are larger items that require two dogs. So there's a batch activity first. The dummy item is far enough back that it can detect two dogs and still push the first dog to the list in time for the first lane. So it holds the dog back in a Batch activity until one of two things happen: Either the next dog token appears, completing the batch. Or the max wait timer on the batch expires, indicating that the next dog is not available. Otherwise, there would have been a token. This duration is based on the conveyor's speed and dog interval. If the batch is complete, the first dog in the batch can be marked as a "double", meaning the dog behind it is also available. Once the flow has determined whether the dog is a single or double, it then pushes it to the list. Creating the DistToDog Field When pulling the dog from the list, an item needs to know the position of the dog relative to the item. Is it 0.3 meters upstream? Or is it 2 meters downstream? When we query the set of dogs, we need to filter out downstream dogs and order by upstream dogs, to reserve the closest one: WHERE DistToDog >= 0 ORDER BY DistToDog Here, DistToDog is positive if the dog is upstream, and negative if the dog is downstream. The code for this field is as follows: /**Custom Code*/ Variant value = param(1); Variant puller = param(2); treenode entry = param(3); double pushTime = param(4); double distAlong = Vec3(puller.getLocation(1, 0, 0).x, 0, 0).project(puller.up, value.Conveyor).x; double dt = Model.time - value.DetectTime; double dx = value.Speed * dt; double dogDistAlong = value.DistAlong + dx; return distAlong - dogDistAlong; This code assumes that the item waiting to merge is the puller. So we calculate the item's "dist along" the main conveyor. Then we estimate the location of the dog since the DogFinder item created the token. Then we can find the difference between the item's position and the dog's position. Pulling Dogs from the List Each incoming lane has a Decision Point. The main process flow creates a token when an item arrives there. At a high level, this token just needs to do something simple: pull an available downstream token. If all the items are the same size, it's that simple. But this example is more complicated! If the item is large, we also need to pull the upstream dog behind the dog we got, so that no other item can get that dog. And it gets even more complicated! It can happen that an item acquires the dog after a double dog. In that case, we need to mark the downstream dog as "not double", so that big items won't try to get it. So most of the logic in the ConveyorLogic flow is handling that case. Using the Dog Finally, the item must be assigned to that dog. The ConveyorLogic flow sets the DogNum label on the item. Then, the catch condition checks to see if the dog matches the item's DogNum. Upstream Items The final piece of this model is allowing upstream items to catch a dog on this conveyor. This model adds a special label to those items called "ForceCatch". The catch condition always returns true for those items.
View full article
If you've ever tried to nest groups of objects inside a hierarchy of planes, you may find the drawing of the planes suboptimal and lacking information: Using the container (modified plane) in the attached user library you can represent the container with just an outline. A settings dashboard is installed with the library along with some user commands and global variables. Corner prisms show the nesting layers under the prism: The option 'Use the container center' allows you to use it as either a plane as before or, when unselected, a bordered frame where dropping an object or clicking and dragging within the borders will behave as though you are dropping onto or clicking/dragging the model floor. You can also choose to hide the containers entirely for the cleanest visuals. I hope this will encourage users to use containers more, since when coupled with Templates and Object Process Flows they can increase the scaleability and make your developed assets more manageable. ( In those cases the container becomes the member instance of the process flow or template master and references to its components are made through pointer labels on the container rather than names which you may want to alter for reporting purposes. The pointer labels are updated automatically when creating a new instance of the container.) ContainerMarkers_v1.fsl If you want planes you already have in your model to adopt this style just add this to their draw code: return containerdraw(view,current);
View full article
MQTT is a communication protocol designed for IoT devices. Clients (the devices) connect to a Broker which allows them to publish (send) and subscribe (receive) messages. Each message is associated with a Topic. Each client can choose which topics to use for publishing and subscribing. Usually, the MQTT broker discards messages once they are sent to all subscribers. However, a publisher can mark a message as "retained." This means the broker will keep the last message for that topic and make it available to other subscribers. Only the most recent message is retained. When developing a digital twin, you may need to access these retained messages. This article describes how to do that using FlexSim's Python connection. This article is not meant as a comprehensive guide, but as a starting point, which you certainly will modify for your circumstances. Here are the python scripts and FlexSim model used in this example: MQTT.zip A quick note: since MQTT is a device communication protocol, support for MQTT in the Emulation module is in progress. This article describes how to import data from an MQTT broker like any other file/database/http server, rather than connecting for Emulation purposes. Step 1: Gaining Access to an MQTT Broker Your facility may already have an MQTT Broker running. In the end, your digital twin will need to connect to that broker to retrieve the latest retained messages. However, for testing, or if you don't have an MQTT Broker yet, you can easily get one. One possibility is to use Docker to run the EMQX Broker. However, there are dozens of brokers and installation steps You can download Docker Desktop here: https://www.docker.com/products/docker-desktop/ Once docker is running, you can use the following command in a terminal to download and run the EMQX Broker: docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx Note that this command runs a Linux container, so if Docker is in Windows mode, you'll need to switch before running this command. Step 2: Publishing Messages to an MQTT Broker A real facility will have many publishers and subscribers. However, for testing, it can be convenient to create publishers and subscribers that you control. Once your broker is running, you can use code like the following to create a publishing client: https://github.com/emqx/MQTT-Client-Examples/blob/master/mqtt-client-Python3/pub_sub_tcp.py For this example, I created two clients that publish tabular data: one that publishes a set of "raw materials" available for use in the process, and another that publishes a set of "finished goods" available to fulfill orders. To create some data, run the finished_goods_client.py and raw_materials_client.py files for a few seconds each. Note that both of these clients mark the messages to be retained, so FlexSim can access the latest message, even if neither client is actively running. Step 3: Writing a Python Script to Retrieve Messages This approach is demonstrated in fs_client.py, shown here: import paho.mqtt.subscribe as subscribe import json def get_retained_msgs(topics): auth = { 'username': 'emqx', 'password': 'public', } msgs = subscribe.simple( topics, qos=0, msg_count=len(topics), retained=True, hostname="localhost", port=1883, client_id=None, auth=auth, keepalive=5) if type(msgs) == list: return [json.loads(m.payload) for m in msgs] else: return [json.loads(msgs.payload)] if __name__ == "__main__": topics = ["python-mqtt/raw-materials", "python-mqtt/finished-goods"] print(get_retained_msgs(topics)) Run this script to verify that it returns the latest data from the two publishers. When FlexSim calls this function, FlexSim can convert python Lists and Dictionaries into FlexSim Arrays and Maps. So you can return complex data structures directly to FlexSim. Step 4: Writing a User Command to Call the Python Command In FlexSim, create a new user command, and edit the code. Be sure to toggle the node for external use, and set it to the following: /**external python: */ /**/"fs_client"/**/ /** \nfunction name:*/ /**/"get_retained_msgs"/**/ To use Python like this, you need python installed on the path. You also need the paho-mqtt package installed globally. Finally, you need to verify that your global preferences indicate the correct version of Python. For more information on connecting to python functions, see FlexSim's documentation: https://docs.flexsim.com/en/23.2/Reference/DeveloperAdvancedUser/ConnectingToExternalCode/ConnectingToExternalCode.html Step 5: Writing a User Command to Write Messages to Global Tables In this example, the messages we are interested in store tabular data, so it makes sense to store the data in Global Tables: Array tables = ; Array topics = ["python-mqtt/raw-materials", "python-mqtt/finished-goods" Array msgs = getRetainedMessages(topics); for (int m = 1; m <= msgs.length; m++) { Table fsTable = tables[m // header code elided; see example Array msgData = msgs .data; Table msgTable = Table(msgData); msgTable.cloneTo(fsTable); // header code elided; see example } If you run this new user command, you can see the latest data pulled in to FlexSim. Conclusion This example shows just one way you could import data from an MQTT broker into FlexSim. In addition, the kind of data you import or what you do with that data is up to you as the user.
View full article
In the attached model we use a Timetable and two MTBF/MTTR objects to define Schedule Loss, Availability Loss (breakdowns) and an element of Performance loss due to short stops (state Down). The processor sends 'bad' items to port 2 based on the send to percentage which account for QualityLosses. The processor's 'best' processing time per part (5 seconds) is stored as a label, while the processing time itself is a triangular distribution with the minumum as 5 seconds - so it also contributes to performance loss. When the Type of the item changes a setup time occurs which is the final contributor to performance loss. Two state profiles were added to the processor - one to track production time and another for availability. An object process flow on the processor detects production profile state changes (between On and off shift) and regular Flexsim state changes and determines the availability state that should prevail. A user command getOEEstat is used to access the values which it calculates on demand and stores in a label on the processor called statsMap. The syntax for this command is: getOEEstat(myMachine,"OEE") The list of stats: "ScheduleLoss","AvailabilityLoss","PerformanceLoss","QualityLoss","IdealProdTime","AvailabilityRatio", "QualityRatio","PerformanceRatio", "IdealProdTime", "RunTime", "OEE", "TEE". A group was used to indicate which objects have their OEE tracked, and a stats Collector reads the group members and adds rows at reset. Finally Performance Measures were added for the stats for processor 1. Processor_OEE_2.fsm 2023-08-22 Update: Added 'TEE' stat.
View full article
Top Contributors