FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
FlexSim 2017 Update 1 Beta is available. (updated 5 Apr 2017) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 Changed FlexSim to store strings using UTF-8 encoding. Added support for Oculus Touch controllers. Implemented OpenVR for HTC Vive compatibility. Improved the shadow frustum calculation in VR so that shadows look better. Added a global preference for changing the resolution of the shadow map. Added support for nested queries in SQL. Added ROW_NUMBER as a SQL keyword. Implemented F2 and Esc functionality in tables. Updated the table view and labels tab to be more robust with different datatypes. Added Table(name) method for referencing Global Tables. Added more FlexScript classes, including List, AGV, Conveyor, and TrackedVariable. Added more properties and methods to existing FlexScript classes, including Object stats and additional string methods. Improved scientific notation for literals in FlexScript. Added a start value to tracked variables. All tracked variables in the model now reset on model reset. Changed itemtype references to referencing an item's type label instead. Improved the Person flowitem's 3D shape. Added repeating events to time tables. Added a short description field to user commands. Made the gantt charts and time charts scroll with a fixed time window. Removed the global table Clear on Reset checkbox and replaced it with a reset trigger. Added new visualization options for the Rack. Added duplicate buttons to the Excel Interface window. Added a duplicate option to the Toolbox's context menu. Taskbar now shows experimenter/optimizer status and runtime based upon stop time. Disabled deleting objects while the model is running. Fixed an issue with the undo history when pasting over nodes with pointer data. Fixed issues with using the ternary operator after properties. Fixed an issue with writing to Access databases with read-only fields. Included fixes listed in 17.0.3. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Removed the FlexSim WebServer application from the default installation and developed a new WebServer application using Node.js that streams the 3D view much faster. The new WebServer can be downloaded through FlexSim's Online Content. Existing models will continue to work with itemtype, but new models should be built using a type label instead of the itemtype attribute and commands. Process Flow Added an Assign Released Resource(s) To field on the Release Resource activity. Added functionality to allow you to Ctrl+Drag activities in an activity block. Added a right-click menu option and Alt+Click to open the Token View. Added a sampler to the assign labels Label Name field so you can sample other activities or tokens to get label names. Added a right-click menu option to open multiple views of a Process Flow. Added an Assign To property to the Create Tokens activity. Added a Make Array label aggregation type to the Batch. Added Center in View buttons for fields with pointer data. Added a name property to the Token FlexScript class. Fixed a bug with duplicating Process Flows using the Toolbox. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Updated the Pull From List activity so it does not assign a null label when nothing was pulled or the token was released early (manually). Previously, if you used a Max Wait Timer or Max Idle Timer (or some other mechanism) to release a token from a Pull from List prematurely, the label specified in the Assign To field would be created with a value of NULL. Now, the label will not be created. This may break other models that are checking to see if the label value exists. For example, saying objectexists(token.pulled) will throw an exception if the pulled label is never created. This can be easily remedied by changing the code to objectexists(token.pulled?). The ? will cause the value returned to be nullvar when the pulled label does not exist. Universal Edit fields are now more strict when accessing labels on a token. Previously, typing token.labelThatDoesNotExist would happily return NULL and move on. Now the Universal Edit will throw an exception if the label doesn't exist. This does not include Universal Edit fields that assert labels, for example the Assign To fields.
View full article
Attached is an example model that simulates a Kiva system. kivasystem.fsm See Dev Talk: Kiva System Modeling for the steps I took in building the model.
View full article
FlexSim 2019 Update 1 Beta is available. (Updated 11 April 2019) IMPORTANT NOTE: The 15-Mar beta installer has a bug that causes the current installer to hang during the Cleaning Up stage when upgrading from the 15-Mar beta to a newer beta version. We have resolved the issue for future installers, but to avoid the error now, uninstall the 15-Mar beta using Add/Remove Programs before installing the new version. To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 new graphical interface to the Calculated Table for building queries. Updated the UI for editing rack dimensions. Added more options for customizing people visuals. Moved operator shape options from the Operator tab to Quick Properties. Improved edit modes by using right-click to cancel the current action instead of immediately exiting the mode. Added global preferences for process flow and dashboard library options. Added the FlexScript API reference to the user manual and made it accessible outside of FlexSim. Added toolbar support for adding multiple model background drawings. Adjusted how the floor Z and grid Z settings work to improve multi-floor modeling. Updated the table view to show more helpful information for certain data types. Added support for pointer data in bundles. Added a pointer type to tracked variables. Added support for the NULLIF SQL keyword. Added support for linking combo boxes to nodes with pointer data. Improved the gantt chart. Updated how tree files are saved to improve saving certain datatypes. Updated pulling from lists to throw an exception when passing a bad query. Fixed a bug with the normal map lighting calculation. Fixed an issue with the picking focus when using drawsurrogate within a drawsurrogate object. Fixed exceptions on an array table that doesn't have column header information. Fixed an issue related to moving items that had not been released. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Updated the internal structure of the Rack object's variables. Removed the rackgetcontenttable() command. Removed support for running the simulation from a loaded state file. Process Flow Added an option to the container to center its title when the contents are hidden. Added a limit to the number of activity panels displayed in quick properties. Added a Milestone activity. People Added a Healthcare environment option. Added an Elevator Bank object. Added a Prop object and more options for object visuals. Added tables that automatically collect statistics for people models. Added people chart templates. Added a People Settings object to the toolbox for people models. Improved the names of people created with the Create Person activity. AGV Updated the distancetotravel() calculation to work with moving AGVs. A* Added support for multiple grids. Adjusted how conditions are defined to improve performance.
View full article
FlexSim 2017 Update 2 Beta is available. (updated 22 August 2017) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 Reorganized the User Manual and updated its formatting. Added more topics, tutorials, and reference pages to the User Manual. Added new Statistics Collector and Calculated Table tools. Added new generic charts for plotting statistics gathered with Statistics Collectors and Calculated Tables. Updated the pin to dashboard buttons to create and use Statistics Collectors instead of the legacy charts. Added a Variant constructor and assignment operator to Vec3 and Color classes. Added functionality for copying dashboard charts as images, and pasting images into dashboards. Added new interfaces to FlexScript, such as Math, Group, and DateTime. Added toNum() and fromNum() methods to the string class. Added a setState() method to the Object class that will work correctly with listening to state changes. Improved handling of read-only model files. Keyboard shortcuts (Ctrl+PageUp and Ctrl+PageDown) and additional enhancements for switching tabs. Added the ability to have null values in a bundle. Added the ability to make kinematics exclude incline rotation when managing rotations. Improved the parenthesis and quote autocomplete functionality. Added autocomplete for curly and square brackets. Added a new print() command to write to the output console more easily. Added support for instanced meshes. Updated the animation system so a single shape can have multiple animators from different shape files. Changed the assimp 3D importer so that it can extract and load embedded textures. Added support for using specular maps and gloss maps. Added support for FlexScript dot syntax in SQL queries. Added the capability to specify a warmup time in the interactive model run. Added options for following objects with the view. Improved MTBF/MTTR state listening to use less events and be more precise. Updated the Network Navigator to work for an object that is inside a container that is connected to the network. Fixed a bug with global variable highlighting and autocomplete. Fixed an issue with destroying a TE on a network when it blocks space on the network. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Fixed a bug with min() and max() when using distribution functions. Previously, getting the number of columns in a Global Table using Table.numCols or gettablecols() returned 0 when the number of rows was 0. Column headers and data types are preserved even when there is no row data. These commands now return the number of columns. Changed operators to not change their incline rotation when traveling on inclines. This will change location calculations if you have advanced logic based on internal operator locations. NodeListArrays like Object.outObjects can no longer be implicitly cast to an Array. Use the toArray() method instead. Fixed a bug with animations drawing their first frame instead of their last frame at times beyond the endtime. Added a special rule for ambient color {0, 0, 0} to not use the ambient color. This change will make shapes with ambient {0,0,0} to appear brighter. Change the ambient color to a dark gray, such as {1,1,1} if you want them to remain dark. Fixed a bug in the shader that dulled specular highlights with the diffuse texture. This may change how shapes look; they may appear shinier now. Added the IS NULL and IS NOT NULL clauses to SQL. Math and comparison operators on null values now return NULL. FlexSim's SQL execution engine is now more in line with the SQL ANSI standard regarding null values. Specifically, if you do comparisons or math operations on elements that have null values, this will return null values. This is different than in FlexScript, where a null value acts like 0 in math operations. Also, null values will be ignored in aggregation functions like AVG(). An option to use legacy SQL nulls was added to Model Settings to preserve backwards compatibility. Upgraded models will automatically enable this option, but new models will default to using the SQL ANSI standard for nulls. Added support for more SQL query operators, such as the case-when-then-else-end operator and window functions. This adds many new keywords to SQL, meaning that if you used these as column names in older queries, they will create syntax errors in the query parser in this version. To fix this, put square brackets [] around the column name. Changed accessing dynamic label properties to use evaluate() instead of value. For example, consider the following code sample: Variant value = current.MyLabel; In 17.1 and previous, this code was the same as: Variant value = current.labels["MyLabel"].value; In 17.2 we changed it so that this code is now the same as: Variant value = current.labels["MyLabel"].evaluate(); The difference is in how FlexScript-toggled node values are retrieved. In 17.1 and previous, current.MyLabel would have just given the text that is the FlexScript code. In 17.2, retrieving current.MyLabel will actually evaluate the FlexScript as code. This is consistent with how table values are accessed. If you have old code that explicitly tried to get the code text with current.MyLabel, you will need to update that code in 17.2 to use current.labels["MyLabel"].value. Process Flow Added a Material Consumption and Replenishment template. Added functionality for pasting images into Process Flow views. Conveyor Added a Gap-Optimizing Merge Controller Process Flow template. Added instanced rendering to improve Render Mode performance. Changed Render Mode to be enabled by default. Added new visual options for conveyors. Improved run speed performance of the Conveyor Module. AGV Added unload-to-empty capability to the AGV Process Flow template. AStar Added a bridge element to the AStar network. Added functionality for collision avoidance. Improved heat maps for analyzing AStar traffic. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Changed the path finding algorithm for the AStar navigator. When you tell an AStar traveler to travel to an object, now it will behave more like the default navigator. It will calculate a "threshold radius" around the object, based on the object's size. Then it will only travel to the edge of that radius. This makes it work better especially for loading/unloading to/from rack objects. The travel operation won't commit as much to traveling to the center of the object,because that can be left to the load/unload operation, which determines exactly where in the rack to pick/place the item. However, this change does affect how older models work because it changes the routes that travelers take.
View full article
FlexSim 2020 Update 2 Beta is available. (Updated 22 July 2020) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 Updated the run speed slider so you can customize the ratio of display units to real seconds. Moved object properties windows into the context sensitive Properties window (formerly known as Quick Properties). Added a new Quick Properties window that appears next to your cursor when double clicking on an object. Added a pop-out button to the Labels panel of the Properties window. Added a Dark theme for FlexSim's UI. Added Unit edit buttons to more edit fields. Updated the Quick Library to match the current state of collapsed and expanded panels in the main library. Removed the View Settings window and moved all its options into the Properties window. Improved performance of Properties window and various other UIs. Added Object Property tables. Added Object class properties and methods to the Variant class in FlexScript. This removes the need to use .as(Object) if you know the treenode pointed at by a Variant is an Object. Added Object.resetPosition property. Added capture groups to the string.replace() method. Enabled several SQL clauses - NOT, NOT IN, DELETE FROM, INSERT INTO, and LEFT JOIN/LEFT OUTER JOIN. Added ARRAY_VAL() sql function for accessing a value in an array. Added unit conversions to the convert() command - convert(4.5, "ft/min", MODEL_UNITS). Improved performance of loading media by making it multi-threaded. Added Color.fromPalette options to several Set Color popups. Added a pickoption for the Source's On Creation trigger for attaching items to an Object process flow. Disabled the beeping noise when pressing Enter in edit fields. Fixed the Create Object edit mode sometimes not creating objects and just exiting (like when clicking on the library when the User Manual was active). Fixed a draw issue with tables drawing bold text sometimes. Fixed a bug with window docking. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Changed updatehotlinks() to only repaint the view if it applies a node with a viewsyncupdate attribute of 1. The keywords VALUES an DELETE were added to the sql parser. This means that previous models that use the term VALUES, Values, values, DELETE, etc. will get an error because sql now sees it as a special keyword. If you get this error, just wrap your term with square brackets: [Values] to tell the parser to not interpret it as a sql keyword. Agent Added the Agent module to the Flexsim Installer. Enabled A* walls as static agents. Added a neighbors() function to the Agent API. Fixed social forces for agents not in model space. Fixed bugs with using A* bridges. AGV The join tool now joins in all cases, defaulting to a straight path if it can't solve for a curved path. Conveyor The join tool now joins in all cases, defaulting to a straight conveyor if it can't solve for a curved conveyor. Emulation Added Allen-Bradley connections. People Improved performance of state history tables. Fixed listening to travel events on a person created with the Create Person activity. Process Flow Added new Kinematics activities. Added new Warehousing activities. Added an Enabled checkbox to the Source activities so that you can turn them off. Consolidated Fixed Resource and Task Executer process flow types into a single "Object" type. Added a right-click menu option to the 3D view so a user can right-click on an object and add an Object process flow directly. Added an Object Flow field to the Create Object activity and added a pickoption for attaching items to an instanced flow. Changed double clicking on an activity to be more consistent with the 3D view and now opens the activity's properties window. This window now has a name edit field so you can still easily rename the activity. You can also slow double click to only open the old name edit field. Improved performance of activity properties windows.
View full article
FlexSim 2021 Beta is available. (Updated 19 November 2020) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 Model Parameter Table tool. Added a Performance Measure Table tool. Added an Empirical Distribution tool. Added a Web Page tool. Upgraded html views from WebKit to Chromium Embedded Framework. Added a Map FlexScript API. Added a JSON FlexScript API. Added Object.getProperty() and Object.setProperty() methods to the Object FlexScript API. Moved dashboard properties windows into the context sensitive Properties window. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. The Experimenter and Optimizer now use Model Parameter and Performance Measure Tables. Existing experiments and optimizations are no longer compatible and are discarded by the model upgrade process. Fixed the PowerPoint.Presentation.create() and PowerPoint.Presentation.open() method syntax. Due to Chromium's multi-process architecture, the FlexScript command callwebscriptmethod() and JavaScript function fireFlexsimEvent() are now asynchronous and do not return values directly. To get the return value of fireFlexsimEvent(), you can now pass a callback function as the last parameter: fireFlexsimEvent("myEvent", param1, param2, function(result) { alert("result: " + result); }); AStar Added a Strict Diagonals setting to make travelers travel better around corners. Conveyor Added a Mass Flow Conveyor. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Removed Conveyor Types. People Added a Remove Statistically Only checkbox to the Remove Person activity. Updated the Statistics Properties panel to display HC states.
View full article
FlexSim 2017 Beta is available. (updated 30 Nov 2016) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 Improved FlexScript performance by compiling and executing it as machine code instead of interpreted bytecode. Added new syntax to FlexScript for accessing objects' methods and properties, including dynamic label access. Improved OpenGL compatibility by removing many deprecated function calls and adding support for the OpenGL Core Profile. Added a mechanism for loading DWG data into the tree using the Model Background object. Added a new Snap to Background setting on the 3D view for snapping to points loaded from a DWG file. Upgraded the licensing system to Flexnet Publisher 2016 R1 (11.14). Changed the network licensing system so that you can open multiple FlexSim instances using only one license seat. Added a Quick Library popup to Dashboard views. Added Travel to Location pick option to OnResourceAvailable. Added Export Results to CSV pick option to the End of Experiment trigger Fixed some issues with auto-complete not displaying correctly. Fixed a crashing bug with settablesize() on tables with bundle data. Process Flow Added functionality for snapping activities into the middle of a block. Improved the Activities window, including renaming activities, better filtering options, and locating label references. Added a Billboard setting for Text objects. Added a right-click Edit Activity Visuals option. Added an option to the Create Object activity for positioning an object at another object's location without moving into that object. Added a Preserve Global Position checkbox to the Move Object activity. Updated the Schedule Source table so that it can add labels. Updated the Release Token activity to allow numbers and strings. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. The new version of Flexnet Publisher requires network license servers to be upgraded. They need to use the latest vendor daemon and update the Flexnet Licensing Service. More information can be found in the license upgrade instructions at https://www.flexsim.com/ftp/LicenseServer/ Updated the Separator's order of events (executing OnEntry before Setup Time) to be consistent with the Processor. Users of the mesh api should update usage of GL_QUADS to use GL_TRIANGLES instead. GL_QUADS is deprecated and will not work when using the OpenGL Core Profile. Since the new FlexScript parser compiles to machine code, the order in which parameters are evaluated has changed to be aligned with the x86/x64 calling convention. This means models containing code where parameter evaluation order is important may have changed results. For example, the following code will have different results: myusercommand(duniform(1, 5), duniform(1, 10)) In the x86/x64 calling convention, parameters are evaluated from last to first. In this case, the duniform(1, 10) call will be called first. Since this call changes the state of random stream 0, changing the order of parameter evaluation changes the result. The new parser has a stricter grammar for the == and != comparison operators. The types of the operands must be the same or related. For example, the following code will now give compile errors because it is comparing unrelated types: double x = 0; treenode y = model(); if (x == y) { } This version introduces a new Array type, which is an array of variants, enabling a more feature rich array usage. In doing this, we are deprecating the old array types of doublearray, intarray, stringarray, and treenodearray. Specifically, the old array types are now just aliases for the standard Array type. This means that you can now, technically, put a string into a doublearray and vice versa, because they are all just Arrays. Hence we encourage you to just use Array in your code instead of the old array types. This change has also introduced a problem regarding the Variant type. In previous versions, the Variant could hold each of the four types of arrays, and it had a type value associated with each type, which you could get with the getvartype() command, comparing that value to one of VAR_TYPE_INTARRAY, VAR_TYPE_DOUBLEARRAY, VAR_TYPE_STRINGARRAY, or VAR_TYPE_TREENODEARRAY. Now, however, since we've merged all of those types into one, all of those values would theoretically be the same value, introducing issues if you had code that switches on getvartype(), or in some cases if you had a series of if/else compares on that value. Depending on the specific nature of that code, it would be hard to predict exactly how that code would behave going forward. Thus, we have decided to get rid of those old macros for each array type. Now there is just the macro VAR_TYPE_ARRAY. If you have existing code that uses the older macros, you will get compile errors when you open your model in version 17.0. We do this specifically so that you will be notified of code that needs to be updated. There are also several pick list options in the process flow module that use these older macros. Version 17 includes update scripts that will hopefully update all of those pick options in existing models to use the new VAR_TYPE_ARRAY macro instead of the old macros. With the new FlexScript parser, there are now some differences with how the parser compares a null variant to 0. In the old parser, the following expressions applied: (nullvar == 0) is false (nullvar <= 0) is true (nullvar >= 0) is true In the new parser, the following expressions apply: (nullvar == 0) is false (nullvar <= 0) is false (nullvar >= 0) is false This brings the <= and >= operators inline with the == operator. However, old code will evaluate differently now. The following expressions apply in both the new and old parsers: (nullvar < 1) is true (nullvar > -1) is true The param() command will now return nullvar if the parameter number is greater than the number of parameters passed to the function (previously it returned 0).
View full article
FlexSim 2022 Beta is now available. (Updated November 23) 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. FlexSim 22.0.0 Release Notes Added several new features to the Experimenter including: Experimenter can define and run multiple different jobs. Experimenter results are stored in a database file. Additional replications of a scenario can be run without needing to rerun previous replications. Improved visuals for status of replications. Added a Reinforcement Learning tool. Added Label charts. Added Tracked Variable charts. Standardized charts created by Pin buttons. Added sort options to table views. Updated MTBF/MTTR time fields to show unit conversion options. Added InObjectsInternal and OutObjectsInternal properties to the Visual Tool class. Backwards Compatibility Note: The following changes may slightly change the way updated models behave. Deprecated the optquest() command. It no longer executes any logic when called. The associated OPT_* macros have been removed. FlexSim now interacts with OptQuest through the Optimization Job object. Changed the default query handlers that deal with the Experimenter in MAIN:/project/exec/globals/serverinterface/queryhandlers. Custom applications that create web queries may need to be updated. Process Flow Added Process Flow Activity Statistics charts.
View full article
FlexSim 2018 Beta is available. (updated 8 Dec 2017) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 new People module. (Try out the Sample Models) Added new dashboard chart templates to quickly collect and display statistics. Legacy charts are hidden by default in the Library and can be enabled through Global Preferences. Removed the basic Person flowitem and renamed the TaskExecuterFlowItem to Person. Added functionality to the List's pull method to allow you to pull an object/node directly (without writing SQL). Updated ODA to be compatible with DWG 2018 shapes. Updated Assimp to be compatible with the latest FBX file format. Added a RegExResult class for iterating over the matches in a regular expression. Lists can now use arrays as partition ids. Added a mechanism for automatically setting the reset position of objects after moving them by setting their resetposition variable to 1. Added a By Lazy Interval update mode to the calculated table. Improved calculated table performance by reducing the amount of table updates. Improved statistics collector performance by reducing the number of updates to Always columns. Table views can now be set as read-only using the grayed attribute. Added an Ignore Warmup option to statistics collectors. Updated OptQuest so that it can run more than 10,000 solutions. Added a pick option for restoring default values in the Global Table's On Reset trigger. The Query test field is now a multi-line text box. The Source now adds labels to items before calling the OnCreation trigger. Updated the table selection for the Excel Import/Export. Improved color options in various dashboard charts. Changed the model update dialog to be able to autosave the model with an incremented number. Added many new animations for the operator and the person flowitem. Updated many stochastic pick options to use getstream() as the default stream parameter. Updated the TaskExecuter to connect to the DefaultNavigator when created. Improved the Group UI. Updated the Library view to not change when clicking on the User Manual view. Changed the Tree view's Explore > As Code so that it closes the tree's edit view. Fixed a bug with list initial contents having old values in label fields. Fixed a bug with the statistics collector chart interface checkboxes. Fixed an OnDropWindow exception. Fixed some exceptions in the Table View when viewing an Array that no longer exists. Process Flow Added a Date Time Source activity. Added a Wait for Simultaneous Arrivals Before Entry option to the Zone. Added autocomplete for instanced flow labels (current). Added a zoneistokeninsubset() command. Conveyor Added a Round Robin destination option to the Send Item pick option. AStar Added a visual option to show the travel threshold for objects. Improved the draw performance and fixed the timing of some graphical updates. Fixed a bug caused by using the distancetotravel() command in conjunction with collision avoidance. AGV Fixed a bug with redirecting AGVs at times other than On Pre-Arrival of way points.
View full article
FlexSim 2019 Update 2 Beta is available. (Updated 28 August 2019.) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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 Storage System object to improve warehouse modeling. Improved the Rack object. Added more types of racks to the library. Updated the Sketchup SDK to load newer skp file versions. Added a ray tracing render mode. Added a Color Palette tool. Improved the color picker popup. Updated dashboard charts to use color palettes. Added options for showing column names to charts. Added options for showing multiple Y-axes on timeplots and histograms. Updated box plot options for categorizing and coloring data points. Added an option for reordering axis categories on timeplots, histograms, and box plots. Added additional line styles and visualization options to timeplots. Added Table methods for using indexed columns. Added a resetvalues attribute. Added Object getVariable() and setVariable() methods. Updated the SQL IS keyword to work with expressions. Improved performance of SQL queries on tables with indexed columns. Added an array parameter to Math.max() and Math.min(). Added a binary bundle field type. Added a button to Model Settings to export embedded media. Changed the default Person flowitem into separate Man and Woman flowitems. Added options for using the object's color to Person Visuals. Added a changepersonvisuals() command and pick options. Updated the Model Background properties window. Added a right-click option to show/hide model backgrounds from the Toolbox. Added pick options for using lists to the Pick Operator field on the processor. Updated various pick options to use generic label references. Added options to the List for special handling of SELECT values. Added Text options to Quick Properties. Added mean and standard deviation to the statistical distribution popup. Added icons to various pick option menus. Improved the Copy Variable function of Edit Selected Objects. Added the location coordinate system button to the General tab of object properties. Removed the Build menu; its options can still be added to the user toolbar. Changed the run speed slider to behave as a ratio of real time instead of model units per second. Fixed a bug with deleting array data from a node. Fixed an exception with cloning a table without rows. Fixed a bug with applying experimenter triggers. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Improved the rendering performance of some imported shapes by optimizing their meshes by material. Some mesh customizations may apply differently for some shapes. Charts now ignore null values instead of trying to categorize or plot them. Changed the FlexScript + operator to concatenate numbers with strings. Fixed some FlexScript math operations with numbers and null variants. Fixed an issue with FlexScript downcasting not always type checking properly in certain expressions. For example, "Object obj = param(1);" will now correctly throw an exception if param(1) is a treenode without Object data. Updated the Rack's place offset to be the actual location that the item will be placed. Fixed a bug with labels added during events at time 0 not being deleted on reset. Fixed a bug in Color.random(). Process Flow Changed the scroll wheel to zoom instead of panning the view up and down. Removed the extra outline around stacked blocks. Changed the default option for Release Batch on max wait timer and max idle timer to have Failed unchecked. Organized the ProcessFlow list on the toolbar based on the Toolbox folder structure. Changed Event-Triggered Source and Wait for Event panels to be collapsible. Added an edit field for the number of arrivals on the Scheduled Source. Added a getlastacquiredresource() command. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Updated Move Object's Preserve Global Position checkbox to preserve location and rotation. People Added an experiment variable for changing the number of objects in a People group. Added a visual indicator to show when objects are acquired by the shift schedule. Added A* dividers to waiting lines and other objects. Adjusted the Staff's walk back to reset position so that it is preempted if acquired by something else. Added a custom window for People Down Behaviors. Added a Keep Person on Transport checkbox to the Transport Person activity. Changed the default Arrivals activities to randomize the created person's visuals. Updated activity subflows so travelers synchronize their speeds when traveling together. Moved copying token labels to the created person to after the people settings labels are added so values aren't overwritten. Added state history tables. Conveyor Improved naming of various objects. Fixed a bug with the height of decision points when created with certain model units. Added a chain texture to conveyor belt visual options. AGV Updated curved path quick properties to be able to specify start and end points. Improved naming of control points and areas. A* Added the A* Navigator to the Toolbox. Updated the A* Navigator Properties window.
View full article
Example Usage of the New AutoCAD FlexScript API The following example models were demonstrated at the Autodesk University presentation Elevating Factory Design: FlexSim and the Future of Autodesk Fusion Digital Factory. Refer to that presentation for a demo of these models and additional discussion regarding the topics demonstrated by these examples. These examples require the Autodesk Interop FlexSim Module. Healthcare Auto-Build Example Demo_AutoCadAPI_ER_4.fsm Using the new AutoCAD FlexScript API, the data within dwg files can be read using FlexScript to automatically build simulation objects within the model. The script in this Healthcare example is contained in the AutoBuildFromDwg() user command in the Toolbox. This command reads the average location of blocks on the Bed Layer to create Bed Location objects. It also reads the lines on the Wall Layer to automatically create Wall objects and connect them to the A* Navigator for automatic pathfinding around the walls. Reading dwg data string filePath = param(1); AutoCAD.Database db = AutoCAD.Database(filePath); if (!db)             return -1; var iter = db.getBlockTable().getAt("*MODEL_SPACE").newIterator(); for (iter.start(); !iter.done(); iter.step()) {             var ent = iter.getEntity();             print("Entity:", ent.layer, ent.objectType);             if (ent.layer == "Bed Layer") {                         if (ent.is(AutoCAD.Polyline)) {                                     AutoCAD.Polyline polyline = ent.as(AutoCAD.Polyline);                         }             } } Creating a bed location treenode bedConfig = library().find("/people/Objects/Location>behaviour/eventfunctions/configs/Bed"); Object obj = Object.create("People::Location"); function_s(obj, "changeShape", bedConfig); Creating walls Object walls = Model.find("Walls"); if (walls) walls.destroy(); walls = Object.create("People::Walls"); treenode wallsSurrogate = walls.find(">visual/drawsurrogate"); Object libraryPillar = node("/?Pillar", library()); Object newPillar1 = createinstance(libraryPillar, wallsSurrogate); newPillar1.setLocation(0.0, 0.0, 0.0); Object newPillar2 = createinstance(libraryPillar, wallsSurrogate); newPillar2.setLocation(10.0, 0.0, 0.0); function_s(walls, "addWall", newPillar1, newPillar2); Asserting the A* Navigator, a Grid, and connecting Walls Object walls = Model.find("Walls"); Object aStarNavigator = model().find("AStarNavigator"); if (!aStarNavigator) {             aStarNavigator = createinstance(library().find("?AStarNavigator"), model()); } Object grid = aStarNavigator.find("Grid1"); if (!grid) {             grid = function_s(aStarNavigator, "createGrid", 0, 0, 0, 1, 1, 0);             grid.name = "Grid1"; } contextdragconnection(grid, walls, "A"); AGV Read/Write Dynamic Blocks Example POC_OHT_3_MoveOHB.fsm POC_OHT_3_MoveOHB.dwg (If this file is named differently when you download it from Answers, make sure you name it back to this exact name. It is referenced by name in the model.) The script in this AGV example is contained in the interopAutoCAD() user command in the Toolbox. This command reads the location and names of particular dynamic blocks in the dwg file in order to automatically create AGV path simulation objects based on the configuration of each type of dynamic block. Additionally, the script has examples of both reading data and writing data back to the dwg based on modifications of the AGV paths within the simulation. The script is only partially complete as a demonstration of the API’s capabilities; the script is not a fully-working, robust solution for any arbitrary dwg. Factory Design Utilities Proof of Concept Example Demo_AutoCadAPI_FDU_1.fsm This FDU example model contains many user commands in the Toolbox with various functionality. The primary example starts in the Load FDU Layout button’s OnPress code. By default, it calls the AutoBuildFromDwg() user command. Alternatively, it has unreachable example code for calling AutoBuildFromLayout(), which can read the layout data from an FDU LayoutData xml file rather than a dwg file. The AutoBuildFromDwg() user command reads factory-specific meta-data about each FDU block in the dwg file and automatically creates simulation objects for each. The simulation objects then load the custom 3D shapes from FDU representing each of those objects. The import script also sets labels with the various Factory properties from each object. Within the CreateSimulationObjects() and CreateInternalObjects() user commands—called from the CreateFactoryAssetInstance() command—are hard-coded checks for particularly factory asset family ids to determine what type of simulation objects to create. This is merely a proof-of-concept example for handling FDU assets via FlexScript without any changes to FDU assets themselves. Future enhancements may include options for including such simulation meta-data within FDU assets directly for a more robust, easier-to-use solution. This workflow brings all the new Autodesk interop features together for an exciting, new way to bring factory data into FlexSim. Once that data is in FlexSim, you can use its many existing features to analyze the system with live 3D animation and dashboard charts showing simulation results. You can validate the throughput of the layout, identify potential bottlenecks, and balance resource use.
View full article
This is a demo model for the new warehouse functionality found in version 2019 Update 2: warehouse-demo-model.fsm The basic premise of this model is that items of a particular type come in, and must be placed in slots for that type. Orders also come in, requiring items of a particular type, that must be retrieved from storage. The model is meant to be a general concept model. It demonstrates the use of many of the new features in 19.2, and embodies some high-level "how-to's" of warehousing that are discussed in the user manual. Most logic for the model is implemented in a process flow. The process flow logic is separated into three main categories, namely initial inventory, inbound, and outbound processes. Further, the outbound process demonstrates both random-based order generation as well as history-based order generation. Initial Inventory The model includes a Global Table of Initial Inventory. The process flow's initial inventory section reads this table, and then creates items and places them into slots based on that initial inventory. This logic relies on the Address Scheme defined in the Storage System object, and uses direct addressing to get a slot using Storage.system.getSlot(). Inbound I use the process flow to assign a slot to each incoming item. I use an Assign Labels activity called Find Slot to do this. This uses a pick list option that wraps a call to Storage.system.findSlot(). The query matches the Type of the item with the Type of the slot, and also ensures that the target slot has space to fit the incoming item. The query also randomizes the order. Randomizing the order would likely not be necessary in most situations, but it makes the demo look nice. If the Find Slot activity properly finds a slot to store the item, then I go ahead and assign the the item to that slot, and have an operator place it in the rack. Outbound I also use the process flow to generate orders, and to reserve items in the storage system for those orders. In most warehouse simulations, order generation can be driven in two ways. First, you can use random probability distributions to generate orders based on general throughput metrics. Second, order generation can be based on historical data. This model gives an example of each method. In the random method, orders are generated randomly every ~30 seconds. Each order includes a number of SKU line items (again, random) and each line item includes a quantity of that SKU (again, random). Order tokens spawn line item tokens, which in turn spawn tokens associated with individual picks (the Fill Out Individual Picks process). For each pick, the token finds an item in storage that matches the target SKU. This is an Assign Labels activity (Find Item by SKU) with a pick option that wraps a call to Storage.system.findItem(). It finds an item that matches the required type, again using a query. Once the item is found, it makes reserves the item as "outbound" by assigning the Storage.Item.assignedSlot property to null (Set to Outbound activity). This ensures that no other process will find that same item for picking. The history-based order generation process uses much of the same functionality as the random-based, but it instead reads an "OrderHistory" table to determine when orders are started and what those orders contain. The OrderHistory table represents a simplified format for what you would likely see in a standard orders table. First, the process flow creates a transformed table that aggregates each order into a single row (this could technically be done as post-import code, but I do it in the process flow for visibility). Then the process flow loops through that transformed table, waiting for the start time of each order, then spawning that order. Custom Rack Visualization I have also customized the visualization of the racks. I have added a text to the front (and bottom on the floor) of a rack slot that will show the address of that slot. Further I've given the text a background that is color-coded to the SKU that that slot is designated to store. This was all done through the Storage System's Visualizations tab. I customized the Rack visualization.
View full article
Hi everyone, recently @Arun Kr posted this idea to add a utilization vs. time chart to the available chart types in FlexSim. I had previously build a relatively easy to set up Statistics Collector for use in our models. I have since cleaned up the design a bit and thought to post it here, since this seems to be a commonly desired feature. utilization_vs_time_collector_24_0_fm.fsm All necessary setup is done through labels of the collector. The first three are actually identical to labels found on the default Statistics Collector behind a state bar chart. - Objects should point at a group that contains all objects the collector should track the utilization for. - StateTable is a reference to the state table that will be used to determine which state counts as 'utilized'. - StateProfile is the rank of the state profile that should be read on the linked objects (0 for default state profile). - MeasureInterval is the time frame (in model units) over which the collector will take the average of the utilization. - NumSubIntervals determines how often that measurement is actually taken. In the example image above (and the attached model) the collector measures the average utilization over the last 3600s 12 times within that interval of every 300s. Each meausurement still denotes the utilization over the complete "MeasureInterval". The graph on the left takes a measurement every 5 minutes, the one on the right every 60 minutes. Each point on both graphs represents the average utilization over the previous hour from that time point in time. - StoredTimeMap is used to allow the collector to correctly function past a warmup time, by storing the total utilized value of each object up to that point. This should no be manually changed. Since this last label has to be automatically reset, remember to save any changes made to the other labels by hitting "Apply". The collector works by keeping an array of 'total utilized time' value for each object as row labels. Whenever a measurement is taken, the current value is added to the array and the oldest one is discarded. The difference between the newest and oldest value is used to calculate the average utilization over the measurement interval. The "NumSubIntervals" label essentially just controls how many entries are kept in that array. To copy the collector into another model you can create a fresh collector in the target model. Then copy the node of this collector from the tree of the attached model and paste it over the node of the fresh collector. I hope this can help to speed up the modeling process for some people (at least until a chart like this is hopefully implemented in FlexSim) or serve as inspiration for how one can use the Statistics Collector. I might update the post with a user library version if I get to creating it (and if there is demand for it). Best regards Felix Edit: Added user library with the collector as a dragable icon to the attached files. Edit2: I noticed a bug while using the collector. Having the tracked objects enter states that are marked as "excluded" in the state table would lead to incorrect utilization values (possibly even below 0 or above 100%). Replaced the library with an updated version that fixes this. Edit3: I fixed another bug that resulted in a wrong utilization value for the first measurement after the warmup time if the object spent time in an excluded state prior to the warmup. utilization-vs-time-collector-library-20250212.fsl
View full article
Attached is a sample model that uses Google's OR-Tools python module to find optimal AGV dispatching solutions. I recently stumbled on Google's OR-Tools, which includes several classes for finding optimal solutions to things like vehicle routing, scheduling, bin packing, etc. Since FlexSim now has a mechanism for easy connection to python, I decided to try and see if/how it could be connected to FlexSim for testing AGV dispatching strategies. I threw together this model just to see how/if the connection can work. All source/destination locations are chosen at random, and work inter-arrival rates are random with a user-defined mean inter-arrival time. To get this model running on your side: Install a version of python Run the following from the command-line: python -m pip install ortools In FlexSim, make sure your preferences are configured for the correct version of python, and that python is part of your PATH environment variable. Open the model. In the Parameters table, set DispatchMode to 'VRP Solver'. This model uses the Vehicle Routing Problem solver to find optimal AGV assignment strategies. The main work generation logic is in the 'Work Generation' process flow. At random intervals, work requests arrive. They are assigned to random source and destination locations. Then, when dispatching in 'VRP Solver' mode, the logic calls the optimizeVRP() user command. This command packages the current state of the model into a valid vehicle routing problem, and then passes it to the py_optimizeVRP() user command, which is implemented in python, in the AGVVRP.py file. The command creates the VRP problem using the OR-Tools classes, and then calls the solver, returning the results. OptimizeVRP() then interprets the results and assigns AGVs as needed. Note that the VRP is re-solved every time new work arrives. You'll see little 'freezes' in the execution of the model, because it is solving the VRP at each work arrival. Note that the standard Vehicle Routing Problem is slightly different from the problem this model needs optimized: In an AGV model, there’s no depot. Instead AGVs may be currently located anywhere in the warehouse. There’s no ‘depot-loaded’ capacity of an AGV, and no ‘demand’ at customers. The standard VRP is a situation where trucks are loaded at the depot, and then depleted as they visit each customer in the route. This is not present with single-capacity AGVs. When an AGV picks up at an origin location, it must immediately deliver to the destination location. In order to wrangle the AGV problem into a valid vehicle routing problem that can be solved by OR-Tools, I constructed the problem as follows: I made each AGV’s ‘current location’ a node in the graph The distance from the depot to the AGV’s current location is 0 The distance from the depot to any other node in the graph is prohibitively large. This will cause vehicles to always go to their 'current location' first, with 0 cost. The distance from any node in the graph back to the depot is 0 A given AGV must visit its current location as part of its route. This can be added as a constraint to the problem in OR-Tools For immediate unload after loading, I initially tried adding this rule as a constraint, but the solver hung when solving. So, instead of graph nodes being locations in the facility, I made graph nodes represent ‘tasks’, i.e. visiting this node means picking up the item AND dropping it off. As such, the ‘cost’ of ‘visiting’ a ‘task’ node is the cost to travel from the ‘destination’ of the previous node to the ‘origin’ of this ‘task’ node, plus the cost to travel from the ‘origin’ of this task node to the destination of this ‘task’ node. Once I did this, OR-Tools was able to solve the problem 'optimally'. By optimally, I mean it was finding the AGV routing that minimized the maximum 'travel makespan', which is the maximum distance route of all of the AGVs. Once I had done this, I wanted to compared it with various heuristic-based scenarios. So I set up a 'Closest' dispatch mode. Here, when an AGV finishes a task, it will take up the next task whose pickup point is closest to its current position. I also created a 'FIFO' dispatching mode, which is that work will be dispatched to AGVs always in FIFO order. These three dispatching modes I compared with the experimenter. My initial experiments showed some interesting results. Most interesting was that in 'VRP Solver' mode, work task time-in-system was relatively high. This is because the objective function completely ignored time in system of the work, and was only optimizing for vehicle travel distance. So some work was being pushed off until much later because vehicles could get better travel distances by pushing it off. To account for this, I added a 'soft upper bound', which is kind of like a 'due date' for the work. Namely, work is due to be finished 800 'meters-of-agv-travel' after it arrives. This was a quick-and-dirty workaround and could certainly be improved, but it did serve to get the time in system for VRP Solver mode down. Below are some of the resulting experimenter results. AGVTaskTime - Time from starting a task to finishing it (i.e. a kind of takt time) The VRP solver performed the best across all scenarios here, and was especially better than the other strategies in low-demand scenarios. This intuitively makes sense. When there are a lot of under-utilized AGVs, the closest and FIFO strategies will always dispatch idle AGVs to do work, which could potentially make them travel long distances. However, the VRP solver can find opportunities to decrease travel distance by waiting to dispatch an AGV that will be near a task in the future, and leave other AGVs idle. Note that I think the 'closest' strategy only finds the 'closest' next task for an AGV that just finished a task, not the 'closest' idle AGV for an arriving task. Obviously that could be changed for a better performing 'closest' strategy. On the other hand, I think in this model all idle AGVs go back to the same park location, so such a change would require distributed park locations to take advantage of closer idle AGVs. AGVWorkStaytime - time-in-system for a given AGV task Here the 'closest' strategy actually performed better than the VRP. This would seem counter-intuitive at first, but upon further evaluation, it does make sense. The VRP, in its current form, only optimizes for total AGV travel distance. It completely ignores job time in system/due dates/etc. So the solver will always assign a route that is shorter even if that route pushes back jobs that have been in the queue for a long time. The solver also re-solves every time a new job arrives. So we may be having scenarios where some jobs are always 'better' to be pushed to the end of the route, and so they keep getting pushed back, resulting in poor time-in-system performance. The solver does include soft and hard job 'due dates', so we could make adjustments to the problem to make the VRP get better time-in-system results. AvgAGVUtilization AvgAGVUtilization is where the VRP especially shines in low-demand scenarios. It finds opportunities to leave AGVs parked because there will be opportunities for busy AGVs to take up jobs in the future with minimal extra travel overhead, whereas the 'FIFO' and 'Closest' strategies will always dispatch idle AGVs to unassigned jobs, causing extra unnecessary empty travel. I am still a bit perplexed by the high-demand scenarios though. Here the 'Closest' and 'FIFO' strategies both beat the VRP in the 120/hr and 102/hr scenarios. This probably would warrant further investigation as to why the other strategies do better here. It may be that, in these scenarios, the AGVs cannot keep up with demand. So there is a queue of jobs that is ever-increasing. The VRP solver is optimizing the full plan, meaning it is scheduling job assignments, and finding travel distance minimization opportunities, that are way out into the future. And it is not getting the opportunity to execute those optimized routes because the problem is being re-solved at each job arrival. With an increasing job queue, the 'closest' and 'fifo' strategies might be actually doing better specifically because they are short-sighted. Just take the closest job to you. On the other hand, if we have increasing job queues (i.e. the AGVs can't keep up), then the AGV utilization should be around 100% anyway, which it's not. Anyway, it's something still to churn on. ThroughputPerHour The throughput per hour indicator tells us whether the AGVs actually kept up with the jobs. If the AGVs were able to keep up with jobs, then the resulting means should be right around the scenario's throughput/hr number. It looks like FIFO got way behind on both the 120/hr and 102/hr scenarios. 'Closest' and VRP both got a little behind in the 120/hr scenarios. One exciting possibility of using this design is that the python script is not technically dependent on FlexSim. So you can use FlexSim to test your python-based optimization, and then you can deploy that python script in a live setting. AGVVehicleRoutingProblem.zip
View full article
FlexSim 2018 Update 1 Beta is available. (updated 28 March 2018) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. 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. 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
This model and library will allow you to produce a heat map of anything moving in the model - including AGVs and Flowitems. To add this to a model is simply a matter of : 1) Load the attached user library 2) Add objects to the group HeatMapMembers 3) Drop a heat map object (cylinder) into the model - reset and run. With this updated version you can now you can now have multiple mapper objects in the same model showing different groups - made easier by the addition of a 'groupName' label on the mapper. You can easily change the height at which the map is draw using the 'zdraw' label and alter the sampling interval and grid size using the 'heatInterval' and 'resolution' labels. The resolution is the number of divisions per model length unit. In the example model set to metres, a value of 2 gives 4 divisions per square metre. Currently non-flowitems are set to ignore time when the object is in an idle state. HeatMapAnything.fsl HeatMapAnything.fsm
View full article
We have released a beta version of our Emulation module. The Emulation module adds a tool that enables communication between FlexSim and OPC / Modbus Servers and PLCs. Help files are included in the FlexSim User Manual to assist you. This beta version must be installed with FlexSim 2017 Update 1. 32-bit and 64-bit installers can be downloaded through the downloads section in the Modules tab of the FlexSim website: FlexSim Downloads The following are known issues: Asynchronous Write for OPC Connections is not working. The option has been disabled. Please post any feedback or bug reports either as a comment to this article or you can email them to dev@flexsim.com
View full article
Flexsim 2021 Update 2 is now available for download. You can view the Release Notes in the online user manual. For more in depth discussion and videos of the new features, check out the official software release page. 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 2022 Update 1 Beta is now available. (Updated March 28) FlexSim 22.1.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. 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
This model is a proof-of-concept example for combining FlexSim's GIS features with the power of mixed integer programming in python. The model simulates a distribution network of 'factories' (red icons) and 'warehouses' (blue icons). The factories produce the product you are selling, and then distribute the product to various warehouses in the network. Every day, each warehouse generates a random demand for the product. Once demand from each warehouse is known, the 'demand dispatcher' must determine which factory should produce and ship how much of the product to each warehouse, fulfilling all warehouses' demands at minimum total cost. Each factory has a maximum daily capacity of production and a per-unit cost of production. In addition, shipping costs must be taken into account from each factory to each warehouse. Given these factors and constraints, the problem of optimal dispatching boils down to the well-known min cost flow problem in optimization. I've created a simple python script that uses cvxpy to solve this min cost flow problem as a mixed integer program. The MIP is not exactly the same as the standard min cost flow problem, since total factory capacity may be more than total warehouse demand, and I'm using integer instead of continuous variables. Nevertheless, it is sufficient to demonstrate the capability. The Warehouse process flow generates daily demand for each warehouse and pushes it to a shared Demand list. The DemandDispatcher then pulls demand from the list, and marshals capacity, demand, and cost data into parameters that can be passed to python. Then it evaluates getMinCostFlow label on the process flow, passing those parameters in. The label is configured to connect to the getMinCostFlow function defined in the MinCostFlow.py module. This function formulates the MIP with cvxpy, solves the program, and then returns the optimal shipping quantities for each factory-warehouse pair, returning control back to FlexSim. Once the shipping quantities have been resolved, the DemandDispatcher process flow creates and labels 'Trucks' that are sent to each warehouse. Note that this travel mechanism is purely for animation purposes, letting you visualize how much product is being sent from factories to warehouses each day. Potential additions to this model could use inventory management strategies, simulating randomized lead times, etc. I've added several dashboards that show the cumulative average breakout for each warehouse of which factories supply that warehouse, as well as the cumulative average breakout for each factory of which warehouses that factory supplies. I've also added costing measures for the warehouses and factories. Some interesting insights that can be gleaned from this model are how shipping vs. production costs affect the balance of which factories will ship to which warehouses. For example, if your shipping costs are low relative to your production costs, then the min cost flow algorithm will push production to factories that are the lowest cost to produce, even if they are far away from the destination warehouse. High production cost factories are consequently relegated to little if any production. However, if shipping costs are high, the algorithm will localize production to the factories nearest their respective warehouses. In order to run this model, you need python properly configured, including: Install one of these python versions: 3.7, 3.8, 3.9, 3.10 Install the cvxpy and cvxopt packages: python -m pip install cvxpy cvxopt Make sure the python directory is part of your PATH environment variable Configure your Global Preferences (the Code tab) to use the associated python version. This model was built in FlexSim 22.1. MinCostFlow.zip
View full article
Top Contributors