FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
Intersection with traffic lights in an AGV network This model aims to showcase how allocations of control areas can be manually controlled to achieve more complex logic than the default “first come first serve” implementation. It depicts a four-way road intersection with arriving cars being able to continue in any of the three other directions. Cars driving straight on or turning right use the right lane, cars turning left use the left lane and must give way to oncoming traffic. Traffic lights manage which cars are allowed to enter the intersection at any given time. AGV network and general concept In order to understand the logic behind it, let’s first look at how the AGV network is setup. In the screenshot below we deactivated the visualization of the roads to show the paths and areas more clearly. For each of the four directions there are two incoming paths and one outgoing path. Control points (red) are placed on the incoming paths at the points where cars must stop (based on object center) when the light is red. A single, large control area that control the entry is placed such that is encompasses the entire intersection. Within this control area, an additional control point is placed on each of the left turning paths (orange). This is the location where left turning vehicles must wait for the oncoming lane to be clear. To enforce this the four smaller, rectangular control areas are used. The lane turning left and both the straight and right turning lane coming from the other direction pass through one of these areas. We will later explain how the straight and right turning cars are given priority to allocate these areas, resulting in cars wanting to turn left having to wait until no other allocation requests are present. As all paths are one-way and the geometry is pretty simple, all things considered, the distance between cars is handled by an accumulation behaviour set on the paths. The logic controlling the vehicles is very simple. If we zoom out, we can see that cars leaving the intersection in any direction eventually just turn around and return. At the turning points control points are placed that serve as the travel destination for the cars. A Process Flow with one token per car randomly chooses the next destination when the previous travel task is finished and sends the car there. The cars will automatically use the correct lanes, since those are the shortest paths to reach their destination. For the intersection logic each combination of origin and destination (meaning every possible way of crossing the intersection) is represented as a number. These numbers are stored as global macros for ease of use. The letters represent the four cardinal directions (north, west, south, east). For example, using the intersection to travel from east to west would be represented by the ‘mode’ number 4. At the same time as a new destination is chosen for the car, the respective mode number is also written to a label on the car. In the logic that controls entries into the intersection, these modes are used to identify which vehicles are allowed to enter. Powers of two are used, so the numbers can simply be added together to get a single number that encodes which lights are green. The light phases are defined in a global table. One of the simplest sensible configurations is shown below. At first, all lights are red (no entries in the “Green” columns) for 5 seconds. Then all cars coming from the west and east directions receive a green light for 20 seconds. This is followed by another 5s of all red lights and finally the other directions are allowed to move on. The table is then repeated from the top. The phase in line two would be represented as mode 1365 (1 + 4 + 16 + 64 + 256 + 1024). This becomes a lot more obvious when the mode is written in binary: 0000 0101 0101 0101 Each bit represents one of the possible directions. Allocation logic explained The control area is set to allow 0 concurrent allocations. Meaning for a request to actually result in an allocation, we need to override the return value of the “On Request” event of the control area. This happens in the control logic for the intersection that is implemented as an Object Process Flow linked to the control area. An Event-Triggered Source reacts to the On Request event and writes a reference to the “Allocator” (meaning the car/AGV) to a label on the token. Note that the “Will Override Return Value” box is checked. The token then enters a Finish activity in whose “Return Value” field the current traffic mode of the control area is compared to the mode of the requesting car. The “&” is the bitwise-and-operator. It goes through both numbers bit by bit. If the bit at a given position is 1 in both numbers, it will also be 1 in the returned value, 0 otherwise. If the mode of the car is part of the current traffic mode (which is a sum of such modes) the result will be the mode. This non-zero number is interpreted as “true” in the if-condition and the return value of the code is to allow the request to go through. Otherwise, the request is blocked. (The “Allow” and “Block” properties return 1 and -1, respectively.) The second part of the Process Flow is a loop with a single token that reads the next traffic mode from the global table. It then ‘announces’ which phase the intersection will enter next, so that the draw logic of the traffic light objects can start the process of switching from red to green or vice versa if needed. After a delay, in which those lights would show yellow, the current phase of the control area is updated. The same code that updates the label then also searches for cars that are now allowed to enter the intersection among the pending allocation requests. Since, as far as I could tell, there is currently no direct method to refire an allocation request, those cars receive a pre-empting task sequence that uses a break task to immediately return to the previously active sequence. The restart of their travel task then causes them to try to allocate the control area again. After waiting the duration assigned to the current traffic phase, the token once more updates the mode of the intersection to an ‘intermediate’ mode. This mode is the result of another bit-wise comparison of the current and the next mode. This allows lights that need to change to red to do so, while lights that stay green remain unchanged. Once the next phase is activated, additional lights might then become green. If the next phase doesn’t have any green lights, all lights will already be red in the intermediate mode, meaning the Process Flow block that updates the mode can be skipped and the token instead just waits out the duration in the “All Red Duration” Delay activity. The logic that makes left turning vehicles give way to oncoming traffic works in a similar way. It is also implemented as an Object Process Flow, linked to the four smaller control areas within the intersection. These areas allow a single allocation by default and also have a “Mode” label. But it’s not set based on a timer and otherwise static. Instead, these areas start in mode 0 and if a request is made while the area is empty, the allocation is always allowed, and the mode is set to match that of the allocator. When another request is made, the areas mode is compared with that of the new requesting car. If they match, the request can potentially be granted. First however, the code searches other pending requests for a mode with a higher priority than that of the current request. (The mode numbers are assigned in the order straight < right turn < left turn, so they can also be used as a priority value, where lower is better.) If such a request is found, the current one is blocked, to allow for the area to empty. At that point, a token created by a source listening to the “On Deallocated” event of the control area will reset the mode of the area to 0 and sort any pending requests by priority, before those get re-evaluated. In summary, this logic allows an arbitrary number of cars with the same mode to enter the area. As soon as a higher priority request that can’t immediately enter is created, other requests are blocked; they must ‘give way’. Visualization and parameters The traffic lights are BasicFR objects that draw colored circles as lights in their On Draw trigger, depending on a label. That label is updated in the On Message trigger whenever the intersection changes its phase. The roads are drawn along the AGV paths in the On Draw code of a dummy object placed to the side of the intersection. How wide and in what interval the white lines are drawn is determined by Array labels on the paths containing all necessary parameters. The model comes with five parameters: The first controls which table is used to determine the traffic light phases, the second and third set the time it takes a light to switch from red to green and green to red. The fourth sets the number of cars and the final one switches the visualization of the left turn lights to arrows. agv-traffic-mode-intersection.fsm
View full article
Download the files Download FlexSim’s latest lmtools-related files here: https://flexs.im/lmtools-download You can browse archived versions of both lmtools and lmadmin here: https://flexs.im/licenseserver-archive Extract the download Once the download is complete, right-click the .zip archive and choose to Extract All… Save to a folder directly on your root drive. Your lmtools download folder Your extracted folder should end up looking something like this: In later instruction steps, any time we refer to the downloaded files, these are the files we're talking about. Note on location Technically you could save your download files in any folder, but we recommend right at the root drive level for convenience. If you choose to save your download folder in an alternate location, please make sure that the directory path doesn't include any folder named "FlexSim". Since Windows files are not case sensitive, this prohibition also applies to variations like "Flexsim" or "flexsim". We have seen instances where some versions of FlexNet licensing encounter errors when the name of the vendor daemon ("flexsim" in our case) is the same as a folder in the path. A folder that includes "FlexSim" as part of a larger name is fine. For example "FlexSim_Licensing" is a fine folder name. Examples of good paths: C:\FlexSim_LMTOOLS C:\licensing\vendors\FlexSim_LMTOOLS\ C:\Program Data\FlexSim_License\ Examples of bad paths (incompatible folder names bolded): C:\flexsim\ C:\licensing\vendors\Flexsim\ C:\Program Data\licensing\FlexSim\files\
View full article
The instructions below are for Internet-connected license servers.   If your server cannot connect to the Internet or to FlexSim's main license server, try our offline/Manual XML license activation instructions.   Getting ready   If you're configuring a new license server, please stop now and follow the complete license server installation instructions.   This shorter guide just focuses on one piece of the installation instructions: license activation. We've broken the activation step out into this standalone article for convenience in subsequent licensing procedures, like upgrading your license server.   These instructions assume that:   you followed the steps outlined in our license server installation instructions including download of all required files and installation of the FlexNet Licensing Service; FlexSim's license server files were extracted to the location C:\FlexSim_LMTOOLS.   Online vs XML/offline licensing   Online activation is faster and easier, so if your license server connects to the Internet, follow the instructions below to activate your seats to your server. If your server is not connected to the Internet, or communication with FlexSim's servers is blocked, you can try the offline/XML activation method.   Endpoints, protocols, firewalls   When your license server activates a license over the the Internet the FlexSim server activation utility communicates with one or more of the following FlexSim servers via HTTP (port 80) and HTTPS (port 443):   www.flexsim.com sw.flexsim.com sw1.flexsim.com license.flexsim.com   Your license server should be able to communicate across the Internet with these addresses in order to successfully activate your licenses online.   Activate your license   On your license server, run the flexsimserveractutil.exe program (C:\FlexSim_LMTOOLS\flexsimserveractutil\flexsimserveractutil.exe) by right-clicking and selecting Run as Administrator.     In the FlexSim ServerActUtil program, go to Connect > Activate.     Enter the Activation ID and Count (seat quantity) for your license.   NOTE: If you have a 20-seat license but want to host 12 seats on this server and 8 seats somewhere else, you can do so. Simply enter 12 for the Count value.   Press Activate.   After a few seconds, and several status messages, you should receive an indication of success.     Repeat the steps above to activate any other license codes you are hosting on this license server.   Reread license files   If this license activation follows a license return, either as part of upgrading the license on your license server or some other procedure, don't forget to reread license files.   If you have any questions or problems, please search our Answers Community for possible solutions. There is a good chance someone else has already asked your question. Still not finding what you're looking for? Submit a new question and we'll check it out. If you're including any confidential information, such as license codes, be sure to mark your question as private! You can also contact your local FlexSim distributor for live phone, web, or email help.
View full article
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
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
Attached are three models that can be used to see the VR capabilities of FlexSim. oculus-warehouse-demo4.fsm (built with FlexSim 7.7) oculustouchdemo-6.fsm (built with FlexSim 17.1) The zombie production game was also updated for VR. These models were primarily designed and tested with the Oculus Rift, but they work with the HTC Vive as well. The HTC Vive requires a more powerful graphics card than the Oculus Rift does to achieve similar performance. You need to maintain 90+ frames per second (File > Global Preferences > Graphics > Show FPS Counter) in order to avoid judder with the HTC Vive. The Oculus Rift will remain smooth at 45 FPS or higher due to asynchronous spacewarp in their driver. In any model in 17.1, you can teleport around by pointing and pressing the Vive touch pads or Oculus Touch thumb sticks as buttons. The position where the thumb presses the button on the Vive or the direction that the thumb stick is rotated on the Oculus Touch will affect the direction you are looking when you teleport. This control scheme is similar to the Oculus Home controls. Moving via teleporting minimizes the motion sickness felt by users who are unaccustomed to VR. In the touch demo model, you can push buttons to release conveyor merge lanes, move operator figurines to change the operator assignments, and control the crane. The code that handles the touch inputs is in the ModelOnPreDraw user command. See VR model custom code for a version of the model with more comments in the code. The warehouse demo model was built in 2015 and doesn’t have any interactive elements that work with the Oculus Touch or HTC Vive controllers. For optimal tracking, after you press the VR Mode button in FlexSim and put on the headset, make sure you recenter the headset in the VR settings while standing or sitting in the middle of your play area and looking straight forward. On the Vive, push the system button to open the Steam VR overlay, then press the Settings button near the bottom-right corner, then look straight forward and press the Reset Seated Position button. On the Oculus, press the Oculus home button and then press the Reset View in App button in the upper-right corner.
View full article
Help->License Activation" />Open FlexSim Software. Click Help in the main menu. Choose License Activation. Click the Return tab. Each of your activated licenses will be listed in the dropdown selector. Select a license you want to return. Click the Return button. Please wait while your FlexSim Software communicates with the license server. The status text will update, and should end with an indication of success. Repeat to return any other Activation IDs that need to be returned. If you have any questions or problems, please search our Answers Community for possible solutions. There is a good chance someone else has already asked your question. Still not finding what you're looking for? Submit a new question and we'll check it out. If you're including any confidential information, such as license codes, be sure to mark your question as private! You can also contact your local FlexSim distributor for live phone, web, or email help.
View full article
Trusted Storage FlexSim is licensed using FlexNet's Trusted Storage. Trusted Storage is a secure storage area FlexNet creates on your license server where it keeps encrypted and hashed license information for licensing FlexSim. Before you can activate a FlexSim license to your license server, its Trusted Storage must be configured. This is done by your license server authenticating with FlexSim's main license server. Below we'll cover configuring Trusted Storage on your license server. If you're here looking for instructions for standalone licensing, check out the article Standalone - Configure Trusted Storage. I haven't configured Trusted Storage before - why now? When your license server communicates over the Internet with FlexSim, this initial Trusted Storage configuration happens automatically and invisibly during the course of the license server's first license activation. The first time you activate a FlexSim license to your license server, your license server and FlexSim's main license server authenticate with each other, configuring your local Trusted Storage, and then immediately activating the requested license. In other words: Internet-connected activation = automatic and transparent Trusted Storage configuration. But you're here because your license server can't communicate over the Internet with FlexSim's main license server. Consequently, your Trusted Storage configuration must be completed manually before activating any license. Create a Trusted Storage config request On your license server, in your extracted download folder of FlexSim license server materials, navigate into the folder flexsimserveractutil. Right-click flexsimserveractutil.exe and select Run as administrator. In the FlexSim ServerActUtil program, go to Tools > Manual Activation > Generate Request. Enter a valid Activation ID. You can use our special activation ID configure-ts, but any valid activation ID can work. Enter 1 for the Count (seat quantity). Click Browse to select an Output File. Choose a filename for the saved request. We used configure-ts.xml. Press Save. Press Generate. You've just saved a new XML activation request in the location you selected. You can confirm this is a Trusted Storage config request by viewing the saved XML file in a text editor like Notepad. A configuration request will lack the TrustedHostInformation tag. If your configure.xml file contains that tag, that means your Trusted Storage is already configured. In that case, you can move on to the offline license activation steps for your license server. Otherwise, continue configuring your Trusted Storage below. Submit your Trusted Storage configuration request Transfer your Trusted Storage config request XML file from your chosen save location to a computer with Internet access. From your Internet-connected computer, open a web browser and login to any FlexSim Account - even a new guest account will work. Click the Licenses link in the header, then choose Manual XML in the Licenses submenu. Upload your XML request file by dragging it onto the drop zone. Your uploaded XML request will be processed. Upon completion, you will be prompted to download the XML response. Did you get a red error message instead of a green success indicator? A message "Fulfill count exceeded the available seat count" means that Trusted Storage is already configured on your license server. In that case, move on to the offline license activation steps for your license server. Otherwise, continue below to finish configuring your Trusted Storage. Process your manual activation responses Transfer your downloaded XML activation response to your offline license server. In the FlexSim ServerActUtil program, go to Tools > Manual Activation > Process Response. Browse to an XML activation response file. Press Process. FlexSim should give you an indication of successful processing of your config request. At this point your Trusted Storage should be fully configured. You are ready to activate your licenses. If you have any questions or problems, please search our Answers Community for possible solutions. There is a good chance someone else has already asked your question. Still not finding what you're looking for? Submit a new question and we'll check it out. If you're including any confidential information, such as license codes, be sure to mark your question as private! You can also contact your local FlexSim distributor for live phone, web, or email help.
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 2021 Update 1 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 https://www.flexsim.com/news/flexsim-2021-update-1-pre-built-agv-logic-bottle-shapes-and-more/ 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 licenses can either be standalone or network-based. Each license model has its pros and cons. Learn more about these two different license models. You're here because you've chosen network licensing and you're ready to get started. A license manager by any other name FlexSim is licensed using technology from Revenera's FlexNet. FlexNet is one of the top software licensing technologies and is used by many large software companies, including several others in the engineering software space. FlexNet offers two different license managers: lmtools and lmadmin. You decide which platform will work best for your organization's needs. (Spoiler alert: we like lmtools best). lmtools Hosting your FlexSim licenses with lmtools lmtools is a simple utility for creating and managing the licensing service that will serve your FlexSim licenses to your organization's client PCs. This basic utility isn't installed - it is a simple executable. It has no 3rd party dependencies. For maximum security, compatibility, and simplicity, FlexSim recommends using lmtools. Many organizations that add FlexSim to their toolkit already use lmtools for managing their license hosting services for other software, so using lmtools to manage your FlexSim licenses just makes sense. Even if your FlexSim purchase marks the first time your org has set up a license manager, lmtools is a great way to go, and is our recommended license manager. Visit Hosting your FlexSim licenses with lmtools for a complete reference on configuring your license server using lmtools. lmadmin Hosting your FlexSim licenses with lmadmin lmadmin is FlexNet's newer, shinier license manager. It includes a web-based front end, so all the administration is done from your web browser. It is more complex than lmtools, serving both the licensing service and a management front end, and lmadmin relies on Java, which you will need keep up to date with patches and security updates. FlexSim usually does not recommend lmadmin, mainly because of the more complex configuration needed to host and manage the web front end (including additional firewall considerations, an extra username and password, etc.), its reliance on Java, and the fact that many FlexSim users already host other software licenses using lmtools. Visit Hosting your FlexSim licenses with lmadmin for a complete reference on configuring your license server using lmadmin.
View full article
Introduction to lmtools   This article is a sort of table of contents to the various articles that will take you from start to finish in installing, licensing, configuring, and running your FlexSim license server using the lmtools license manager.   background info   Server-based vs Standalone licensing - Learn the differences between these two license models, and when you might choose one over the other. License managers - lmadmin vs lmtools - FlexSim supports these two FlexNet license managers. Learn the differences, and why FlexSim recommends lmtools.   Let's get started   When installing a new license server, start here at the top and work your way down the list of articles linked below. By the end you should be in good shape to properly host and serve your FlexSim licenses.   Each link should open in its own browser tab, so once you complete a sub-task just close that tab. Then back here in this main tab click the link to the next step.   The list of links below might seem intimidating, but conceptually it's just 4 main things we're about to work through:   Preparation and Prerequisites Activate licenses to your license server Configure the licensing service Configure client PCs   If you run into any problems, you can also find additional helpful resources linked at the end of this article:   Troubleshooting Related links     1) Preparation and Prerequisites   System Requirements - almost any Windows computer could act as your license server. Click inside for the details. Download files - download the required lmtools files and extract them to an appropriate folder on your license server. FlexNet Licensing Service 64 - FlexSim is licensed using Revenera's industry-standard FlexNet licensing platform. This article prepares your license server with the background service necessary for hosting your FlexSim licenses.   2) Activate licenses to your license server   Choose the right steps below to license your server, depending on whether or not your license server can communicate over the internet directly with FlexSim's main license server.   • Online, Internet-enabled systems   License Server - Activation - Online - Activate your FlexSim licenses to your license server directly over the Internet. Should be easy-peasy. • Secure / Offline / Air-gapped systems   If your license server will not connect to the Internet (or if for any reason it cannot communicate with FlexSim's license servers) there are a few extra steps to get up and running. You've got this!   Configure Trusted Storage - Your new license server has a secure storage area for holding license info, but first it must authenticate with FlexSim's main license server. License Server - Activation - XML / Offline - the manual steps to activate your FlexSim licenses onto your license server.   3) Configure the licensing service   Configure your license service - use FlexNet's lmtools license manager to create and configure the service that will serve up your FlexSim seats. Add Windows Firewall exceptions - your licensing service needs to communicate with other PCs on the network. This will get you started.   4) Configure client PCs   With your license server installed and configured, it's finally time for your license server to fulfill its destiny and serve licenses to your client PCs.   Make sure you know the IP address or fully qualified domain name for your license server, as well as the license service port number (see #1 under Check the service status). You'll use your server's address/name and service port when configuring the client PCs.   FlexSim Version Numbering - your FlexSim license is for a particular version of FlexSim. If your software maintenance is not current, you may need to use an older version of the software. In this article you'll learn how licensing works for a given version number and where to download an appropriate version of FlexSim that will work with your license. With an appropriate version of FlexSim installed on the client PCs, you're ready to configure them to communicate with your license server. There are two ways a client PC can be configured. Choose the method below that most closely matches the main use case for your client PC:  Single-user client PCs - this method configures settings that are saved on a per-user basis. Multi-user client PCs - usually appropriate for a university computer lab or other shared-PC situation, where the configuration should be computer-based. Verify client PC licensing - Not sure if your client PC is getting licensed properly? Dive in to find out how to tell your client PC is successfully getting a license from your new license server   Troubleshooting   Isn't there a law in the universe that if something can go wrong, it will? If you're stuck in a licensing black hole, these tips might be just the thing to help you get moving.   Client/server connectivity - if the client PC and the license server can't communicate, the client PC won't be able to get a license. Troubleshooting tips - when you're pretty certain that connectivity isn't an issue, but your client PC still isn't getting a license, check here for some ideas.   Related Links   FlexSim's license file - your new licensing service uses a license file to specify port numbers. Get more background on license files and ports here.  
View full article
FlexSim 2025 Beta is now available. FlexSim 25.0.0 Release Notes To get the beta, log in to your account at https://account.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. The More Versions button does not appear when logged in as a guest account. The beta is available only to licensed accounts and accounts that have a license shared with them. Learn more about downloading the best version of FlexSim for your license here. If you have bug reports or other feedback on the software, please create a new post in the Bug Report space or Development space.
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
The instructions below are for offline/Manual XML licensing. If your server successfully connects to the Internet and to FlexSim's main license server, you can try our simpler online license activation instructions. Getting ready If you're configuring a new license server, please stop now and follow the complete license server installation instructions. This shorter guide just focuses on one piece of the installation instructions: license activation. We've broken the activation step out into this standalone article for convenience in subsequent licensing procedures, like upgrading your license server. These instructions assume that: you followed the steps outlined in our license server installation instructions including download of all required files and installation of the FlexNet Licensing Service; FlexSim's license server files were extracted to the location C:\FlexSim_LMTOOLS. When should I use XML/offline licensing? If your license server cannot connect to the Internet or is blocked from direct communication with FlexSim's license activation servers then you will need to activate your license manually . This article guides you through the manual activation steps. If you're not sure, go ahead and try an online activation first. Activating your license server online is faster and simpler. If online activation fails due to communications on your license server being blocked, you can fall back to this offline activation guide. Activate your license NOTE: If this is the first time a license has been activated to this license server you must first configure trusted storage. On your license server, run the flexsimserveractutil.exe program (C:\FlexSim_LMTOOLS\flexsimserveractutil\flexsimserveractutil.exe) by right-clicking and selecting Run as Administrator. Create manual activation requests In the FlexSim ServerActUtil program, go to Tools > Manual Activation > Generate Request. Enter a valid Activation ID. Enter a Count (seat quantity) for your license. NOTE: If you have a 20-seat license but want to host 12 seats on this server and 8 seats somewhere else, you can do so. Simply enter 12 for the Count value. Browse to select an Output File. Press Generate. You've just saved a new XML activation request to the location you selected. Repeat steps 1-5 above to generate an activation request for all license codes you intend to activate on this license server. Submit your manual activation requests Transfer your XML activation requests to a computer with Internet access. From your Internet-connected computer, open a web browser and login to your FlexSim Account. Click the Licenses link in the header, then choose Manual XML in the Licenses submenu. Upload your XML files by dragging them onto the drop zone. Your uploaded XML requests will be processed. Upon completion, you will be prompted to download each XML response. Process your manual activation responses Transfer your downloaded XML activation responses to the offline license server you are licensing. In the FlexSim ServerActUtil program, go to Tools > Manual Activation > Process Response. Browse to an XML activation response file. Press Process. FlexSim should give you an indication of successful processing of your activation, and activation for that XML request will be complete. Successfully Processed Response Repeat steps 1-5 to process the XML activation responses for any other XML activation requests. Is this a license server upgrade? If this license activation is part of upgrading the license on your license server, don't forget to reread license files. If you have any questions or problems, please search our Answers Community for possible solutions. There is a good chance someone else has already asked your question. Still not finding what you're looking for? Submit a new question and we'll check it out. If you're including any confidential information, such as license codes, be sure to mark your question as private! You can also contact your local FlexSim distributor for live phone, web, or email help.
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
Attached is an example model and user library comprising commands to return an array of objects whose bounding boxes intersect, and a Collision Detection object to drop into your model. The Collision Detection has a ticker interval label to adjust the frequency of checks and will switch the colliding objects to selected. It looks for two groups - "Obstacles" containing static objects in the scene (which may be overlapping and not recorded as collisions) and "Colliders" which are the objects navigating the scene and should be checked for intersecting bounding boxes. In the example model I'm adding the flowitem when it is created using Group("Colliders").addMember(item) The detector code is on its FlexScript label, 'analyseScene', which is first scheduled to run by the object's reset trigger. collisionDetection3.fsm BBCollisionDetection2.fsl
View full article
One of the new features in FlexSim 2018 Update 2 is the ability to use distributed CPUs for the Experimenter or Optimizer. Those cores can exist on any machine that meets the following requirements: The machine is accessible by IPv4 address The machine has FlexSim installed The machine is running the FlexSim Webserver (version 18.2.0 or later) on port 80 The machine meets hardware requirements to support running the specified number of simultaneous replications. This article describes how to use Amazon Web Services to create remote machines that meet the above requirements. Using AWS, you can launch and connect to as many servers as you want, and pay only for the time used on those instances. Anticipated Use Case Using distributed CPUs can significantly reduce the required time to run an experiment if: The time to run a single replication is high (a couple minutes or more) The number of replications to run is high If the time per replication is short, then the increased communication overhead may outweigh the benefit of using distributed CPUs. The communication overhead increases because all CPUs still report results to a single FlexSim process, and that communication occurs over the internet, rather than on a single machine. If an Experiment or Optimization completes in an acceptable amount of time, you may not need to use distributed CPUs. Financial Costs Amazon charges for its services. Costs for running instances (and transferring data out of them) are found here : https://aws.amazon.com/ec2/pricing/on-demand/ Costs for storing data (including AMIs) are found here: https://aws.amazon.com/ebs/pricing/ These instructions include steps to create an AMI, which will likely cost around $1 per month at current rates. It also includes steps for launching high-performance instances, which have an hourly cost. Suitable instances can be as cheap as $0.50 per hour. Note that there are also charges for transferring data from an instance to another computer. Step 0: Complete an EC2 Tutorial If you are not already familiar with EC2 instances, you should complete the following tutorial: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2_GetStarted.html Step 1: Create a Security Group You will need to create a security group with the following rules: Allow HTTP traffic on port 80. This allows incoming connections to the FlexSim Webserver. You can choose which inbound IP addresses to accept. You should make this as strict as possible. The strictest setting is to only allow incoming connections from the current IP address. Allow TCP traffic on ports 9000-9200. This is a Custom TCP rule. Note that you can make this range smaller, if all machines that use this Security Group have fewer than 200 cores. For example, if the biggest machine launched with this Security group has 72 cores, you would only need ports 9000-9072 in this rule. Allow RDP traffic on the default RDP port. This allows you to connect to the instance using remote desktop. Name the Security Group something that shows that this group is related to running FlexSim instances, and add a description if you want. Here is an example Security Group that works, but allows all TCP traffic, and so should only be used for testing purposes: Step 2: Create a Custom Amazon Machine Image (AMI) You will need to create a custom AMI. A custom AMI allows you to launch an instance that has the software you need already installed. To create one, follow these steps: Download the FlexSim installer and the Webserver installer. If your upload speed is slow, you can skip this step. Launch the cheapest instance available, with the Windows 2016 Server Base image. There are probably free-tier instances available in the list Connect to that Instance with Remote Desktop Copy (or download, if upload speed is slow) the FlexSim installer to the remote machine, and run it to install FlexSim. You do NOT need to activate a license. Run FlexSim. This creates a directory that is needed later. Then close FlexSim. Copy (or download, if your upload speed is slow) the Webserver installer to the remote machine, and run it to install the webserver. If using the 2018 Update 2 Beta, be sure to change the Webserver configuration file accordingly. Run the Webserver. It will download a bunch of files the first time it is run. Allow both FlexSim and node.js through the Windows Firewall. To do so, use the Allow an App through the Windows Firewall tool. You will need to browse for both FlexSim and Node.js. Both are in the ProgramFiles directory. Disconnect the Remote Desktop session Go to the list of Instances in the AWS Console From the Actions menu, select Image, then select Create Image: Add a name and description. Click the Create Image button On the next dialog, click the View Pending link, or navigate to the list of AMIs: Once the image becomes Available, terminate the running instance. Step 3: Launching Usable Instances Before running an Experiment or Optimization, you need to be sure that all remote instances you will use are current running. To launch and initialize these instances, follow these steps: In the EC2 Console, choose Launch Instance Select the AMI you created, from the list of My AMIs Choose the Instance Type and quantity Set the Security Group to use the Security Group you created Launch the instance Once each instance is initialized, connect to each one with Remote Desktop. Note that when you launch an instance with a given Key File, the password for each instance will be the password associated with that Key File, so you only need to decrypt the file once. Start the FlexSim Webserver in each instance Once all instances are running the Webserver, you are ready to run an Experiment or Optimization. Author's Note: There is probably a way to make it so that when instances start up, they automatically run the Webserver, so that you don't have to manually connect to each one. I welcome any suggestions or steps for how to make that happen. Step 4: Using the Instances in FlexSim Once you have a list of running instances available, you just need to input their IP Addresses into FlexSim, on the Advanced tab of the Experimenter: Once you have input this information, you just need to click the Experiment or Optimize button. FlexSim will then use the remote CPUs for running replications. Considerations Spot Pricing Amazon offers two pricing models: On Demand and Spot Pricing. FlexSim recommends On Demand instances. Spot instances can be significantly cheaper, but they can also be shut down by Amazon and given to an On Demand user at any time, if On Demand requests exceed the number of available machines. FlexSim does not try to recover from this kind of error, and it may lead to unexpected behavior. CPU Count, RAM, and Disk Space When you pick an instance type, be sure to understand how much ram you will need. If a model requires 4 GB of RAM while running, and you use an instance with 128 cores, be sure that the instance has at least 512 GB of RAM, or don't use all 128 cores. Disk space is usually not an issue. However, if you are using the Store Data on Hard Drive option in the Statistics Collector, you will need to be sure that there is enough disk space to run the model to completion on the hard drive, multiplied by the number of cores. The amount of disk space on each instance also affects the total cost of using this service.
View full article
Visually represent the number of times any AGV enters a segment of the AGV path
View full article
FlexSim 2023 Update 2 Beta is now available. (Updated July 21) FlexSim 23.2.0 Release Notes To get the beta, log in to your account at https://account.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. The More Versions button does not appear when logged in as a guest account. The beta is available only to licensed accounts and accounts that have a license shared with them. Learn more about downloading the best version of FlexSim for your license here. If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Bug Report space or Development space.
View full article
Top Contributors