FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
This table is meant as a reference and guideline. While we strive to maintain this list regularly, it may be out of date at any given time. If an advertised feature of FlexSim is not listed here, it is generally not subject to limitations by license type.   The Express license type is FlexSim's default, unlicensed state. Downloading and installing FlexSim to a new computer, it will be in Express mode. The other license types require you to obtain a license and apply it to the software. Please refer to FlexSim's End User License Agreement (EULA) for details on allowed uses, restrictions, and other considerations. If you wish to test a particular license type, please contact your local distributor to request a test license.   Please Note: Runtime seats are no longer available for new purchase or renewal but are referenced in this table to support those Runtime licenses still outstanding.     Express Runtime Student Educational Enterprise Use Cases (see EULA) Testing, evaluation, and model viewer only. Run only (no model building). Educational use only. Educational use only. See EULA. Open, Run, Save open and run any size model ✔ ✔ ✔ ✔ ✔ open and save models in XML format     ✔ ✔ ✔ unlocked random streams   ✔ ✔ ✔ ✔ compile models built with C++ (optional, requires Visual Studio)   ✔ ✔ ✔ ✔ save model size limitations model size must be under limitations none model size must be under limitations none none experimenter   ✔ ✔ ✔ ✔ OptQuest optimizer   with OptQuest add-on license up to 10 optimization variables with OptQuest add-on license with OptQuest add-on license webserver (requires separate download) ✔ ✔ ✔ ✔ ✔ Model Building model building features available ✔ no ability to add objects or activities, but any objects and activities used by existing models are editable ✔ ✔ ✔ create objects and activities ✔   ✔ ✔ ✔ object creation limit 30   100 none none process flow activity creation limit 35   250 none none execute FlexScript in script console     ✔ ✔ ✔ tree view     ✔ ✔ ✔ Tool Box Add Tools ✔ no ability to add tools, but all tools used by existing models are editable ✔ ✔ ✔ FlowItem Bin ✔   ✔ ✔ ✔ Global Tables ✔   ✔ ✔ ✔ Time Tables ✔   ✔ ✔ ✔ MTBF/MTTR ✔   ✔ ✔ ✔ Down Behavior ✔   ✔ ✔ ✔ Dashboards ✔   ✔ ✔ ✔ Groups ✔   ✔ ✔ ✔ Process Flow (all options) ✔   ✔ ✔ ✔ Global List (all options) ✔   ✔ ✔ ✔ Statistics - Statistics Collector ✔   ✔ ✔ ✔ Statistics - Milestone Collector ✔   ✔ ✔ ✔ Statistics - Calculated Table ✔   ✔ ✔ ✔ Statistics - Experimenter     ✔ ✔ ✔ Statistics - Tracked Variable     ✔ ✔ ✔ FlowItem (all options) ✔   ✔ ✔ ✔ Modeling Logic (all options)     ✔ ✔ ✔ Visual - Model Floor ✔   ✔ ✔ ✔ Visual - Model Background ✔   ✔ ✔ ✔ Visual - Video Recorder     ✔ ✔ ✔ Visual - Fly Path     ✔ ✔ ✔ Connectivity - Database Connector ✔   ✔ ✔ ✔ Connectivity - Excel Import/Export ✔   ✔ ✔ ✔ Connectivity - Visio Import     ✔ ✔ ✔ Connectivity - Emulation (Modbus and OPC DA connections only. Other connection types require an Emulation license.) ✔   ✔ ✔ ✔
View full article
Finding the right answer should be easy. Together we can build and maintain a well organized, growing knowledge base by practicing a bit of good Question and Answer hygiene. Below are 12 tips for using Answers in a way that will help the whole FlexSim community get maximum value from the site, and keep our content organized, efficient, and intuitive. These tips are adapted from this Devada article. Devada makes AnswerHub, which powers this site. Search existing questions before asking. Use the advanced search functionality to look for a question you may have before asking it. You may find your question has already been asked and answered. This saves you and other community members time and effort. Please also search our online user manual. Your answer may be in FlexSim's documentation. Post a model that demonstrates your question. The best case is to make a simple model that demonstrates the question or issue. If the model is sensitive, you can post a private question (see the Private Questions item below for more info). Make your question titles descriptive. Making a question's title descriptive makes it much easier for other people searching the site to find what they need. Question titles like Problem with conveyor are not very helpful when searching, whereas titles like Item gets stuck at photo eye when using area restriction are much more helpful. The question title should not be too verbose, but it should describe the problem well. Post content in the right space. When creating content, it's important to select the appropriate space for it to be posted. Choosing the right space for your content will not only keep the community organized, it's also more likely to be viewed and responded to by the right community members. Need help with some aspect of FlexSim or your simulation? It goes into the Software & Simulation Questions space. Starting a discussion that doesn't have a specific answer? General Discussion is the space it should go in. Don't post an article to ask a question - do that with a question. Don't use a question to request a feature - that should be posted as an idea. Mark correct answers as accepted. It's important to accept a correct answer to a question, especially the questions that you asked. This will make finding the right answer much easier for other members and let the community know that your problem has been solved. Let others know what answers helped you solve questions by upvoting or liking correct answers to show community support. Share your knowledge by answering questions. See a question you know the answer to? Submit an answer with text, images, links, videos, and more to support your answer and to help fellow community members. Use comments and replies. Only post an answer when you're actually answering a question. You can use comments, or directly reply to others' comments to provide support, additional information or ask for further explanations when necessary. Ask experts directly. Want a reliable answer quickly? You can ask an expert directly after creating a question and the expert will be notified. Use the 'at' symbol @ and start typing someone's name, and they will be notified that they were referenced in a post. Be sure to use the autocomplete as you type their name, or you may type it incorrectly and the user will not be notified. A properly formatted @mention automatically becomes a link. If it's not a link (like this: @Ben Wilson!), try again. Avoid overdoing @mentions. Don't make the mistake of @mentioning more people than is necessary to try to draw attention to your question: Your question is just as important as any other question. The community will help you to the best of our ability regardless, so there is no need to spam multiple users in hopes of bumping up your priority. If anything, annoying active members on the community you will only hurt your cause. Monitor reputation points and the leader-board. See how you rank in your community with reputation points. Reputation reflects engagement levels like questions asked, answers submitted, upvotes, and more. Become an expert yourself. Have an area of expertise? By providing knowledgeable answers you can be recognized as a topic expert. The system identifies these users based on the number of accepted answers you provide within a topic. Additionally, you can self-identify areas of expertise in your profile settings. Topic experts receive an elevated role in the community and get notified when content is posted within their area of expertise. Follow topics of interest. Want to continue learning about a specific topic in your community? Follow a topic and receive activity updates in your inbox instantly, daily, or on a weekly basis. Change notification frequency and other settings within your profile. Visit the community often. The more we contribute to the community, the more valuable it becomes for everyone. Have an article you want to share? Post it. Want to share an idea and generate a discussion among other FlexSim users? Answers is a great place to facilitate "ideation" and collaboration. Additional pointers for using answers.flexsim.com: Use the latest version of your internet browser. Mozilla Firefox, Google Chrome, Microsoft Edge, Opera, and other modern browsers should be fully compatible with this Answers site. For the safest, fastest, and most compatible browsing experience, please keep your browser version up-to-date with its latest release. Internet Explorer is an older browser and is not supported. Preparation We expect you to have some foundation of FlexSim knowledge and experience before asking a question. If you're new to FlexSim, before asking questions here, please take the time to go through the in-software tutorials. Topics - when you create a post, whether it's a question, article, or idea, you must tag your post with at least 1 topic (and up to 5 topics) to help identify the main issues of your post. As you add topics, autocomplete will suggest preexisting topics. Please select a preexisting topic if it is a good match, rather than creating a new, slightly different spelling of an existing topic. Also, please try to keep new topics to only 1 or 2 words. Ask one question at a time. When composing a new question, limit yourself to a single question. Don't include multiple questions in one post. Each question deserves its own place. When you separate multiple questions into individual posts, it's more likely that more users will participate in your questions, getting you more answer options more quickly, often from multiple individuals. It also makes each post smaller and easier to digest, encouraging more participation. Follow-up questions. Sometimes it's tempting to ask a follow-up question as a comment to an answer, or even more inappropriately, as a new answer to your first question. New questions that can stand alone should be posted as brand new questions. Only clarifying questions should be asked that expand on the original question/answer/comment that is being discussed. This keeps each question post laser-focused on the top question, and each answer directly pertaining to the main question. An answer should really be an answer. Each answer should directly address the top question in a post. An answer is never a 'thank you', a comment, or another question. Those each have their place (usually as a comment), but none of them should be posted as an answer. A question can have multiple answers. The question asker (or 'OP' - original poster) should 'accept' the answer that worked best for them. Users can up-vote answers that are helpful, or down-vote those that are not. The top answers will bubble up to the top. Conversations go in comments - If you need to clarify a part of someone's question ("what version of the software are you using?"), add a comment to that question. If you want to respond to someone's answer ("thank you!" or "that didn't work for me because..."), add a comment to that answer. Need to respond to someone else's comment? Reply specifically to that comment. Simple and specific questions are best. Simplify your question by creating a sample model that shows the issue, rather than posting a large model (perhaps containing proprietary information) where only one small part of it pertains to the question. Use images to show what is going on and what should be happening. Animated GIFs are even better (example). Public questions are best. They add to the public knowledge base. They will get community participation, and thus get more answers, faster responses, and broader participation. They can help others in the future. Whenever possible, simplify your question for a general audience. Private questions are for private information. If you have a question pertaining to your specific license, make it a private question. Only FlexSim US can see the contents of private questions. AnswerHub takes reasonable measures to help protect information (see their privacy policy's Security heading) but this AnswerHub community should not be considered a secure site. Be sure to follow your organization's rules regarding posting of proprietary data, and when in doubt use approved methods to share confidential information. Consider reaching out directly to your local FlexSim representative for phone or email support. Post attachments: Attachments types - If you find that you can't upload a particular file type, simply compress it to .zip and upload that way. Make a note of that in your post so that we can consider allowing your file type. Attachment sizes - We've tried to be quite generous with total allowable upload sizes. If you find that your attachment(s) are too big to upload, first try compressing to .zip. If that still doesn't get your attachments small enough to post, you may be able to use a 3rd party file hosting service such as Dropbox or SugarSync, and include a link to your uploaded file in your post. Make a note of that in your post so that we can consider increasing the file size limit if this becomes a common problem. Attachment count - Again, we've tried to be quite generous with the total number of attachments that can be added to a post, primarily because images count against your attachment count. Let us know if you're trying to make a post but run into the max attachment limit. Advanced search functions: Simple search A search that uses one or more words, separated by spaces. For example: Enter transporter resource to perform a search for transporter, resource, or transporter resource. Refined search You can refine your search by adding different symbols (+, -, [, or ]) to your search. For example: Entering transporter +resource in the search bar returns results that include transporter and resource, but resource is a required term. Entering transporter -resource in the search bar returns results that include the term transporter, but excludes any that contain the term resource. Entering in the search bar returns only results that are tagged with the transporter topic. Entering [resource] in the search bar returns only results that are tagged with the transporter and resource topics. Google search This Answers community includes Google Custom Search to easily enable the use of Google's powerful search engine across all FlexSim web sites, including this Answers community, our old, archived community, our online user manual, and more. Please see this question and answer for details. If you have any questions, comments, or tips of your own that you'd like to share, please start a discussion in the comments below. We can update the article above with the best suggestions or illuminate anything that might be confusing.
View full article
To go along with the launch of Flexsim 2018, we've put together a few sample models to show some of its features. Internet Cafe internetcafe.fsm This model shows off several of the new animations added to the Operator and Person flowitem. It also demonstrates how the Create Person activity can be used to attach a Person flowitem to an Instanced Process Flow. People with yellow shirts are attached to the ComputerUsers flow. They acquire a computer desk and then have an employee bring them over to their computer. Those in orange shirts are attached to the FoodCustomers flow. They buy drinks or snacks at the counter and then hang out at the tables. Casual Restaurant casualrestaurantredux.fsm Clinic clinic.fsm Grocery Store grocerystore.fsm Airport Security airportsecurity.fsm Bus Stop busstops.fsm
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
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
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
The ideal way to access the User Manual is by viewing an electronic copy either online or inside the software. Online User Manual The User Manual is available online at docs.flexsim.com. There you can select a software version and manual language. We hope to provide additional languages in the future. In-software User Manual There are two ways to open the manual inside FlexSim: Click the User Manual button on the main toolbar. Click the Help menu and then click User Manual. Why the electronic manual is preferred The online / in-software version of the User Manual is better than a print or PDF version for many reasons, including: Regular updates - The electronic version keeps up with every new FlexSim release. A printed manual unfortunately goes out of date every four months with each new release of FlexSim. The online manual allows you to also view older versions of the manual. Animated GIFs - Animations enhance communication by making it possible to see FlexSim in real time. Animated GIFs won't work in a printed copy. Better search - The online version allows you to search the manual using Google. The in-software version also has a search program which is easier than trying to find relevant keywords within a large document. Styled and reflowable tables, images, and tip boxes - While these elements look good on the web, print or PDF versions don't always correctly format their placement within the document. Better organization - A printed manual won’t always maintain the same organization as the online and in-software manual, making it more difficult to navigate. Mini-table of contents - Each topic has easy navigation within each topic via inner-links. A printed or PDF mini-table of contents (found in most topics) can't function as a clickable index, making it difficult to easily skip to relevant sections within a topic. Printing topics from the User Manual While we don't recommend printing the entire manual, you can easily print individual topics for later reference. Print from the online manual Visit docs.flexsim.com using your favorite modern web browser. Use the table of contents in the left navigation bar to visit the topic you want to print. Use the printer button in the upper right of the topic window to print the page: Print from the in-software manual In FlexSim, open the User Manual and browse to the topic you'd like to print. Press the 'world' button to open the topic in your web browser. Choose the print function inside your web browser - depending on your browser, you may be able to right-click the web page and choose Print, or you can use the keyboard combo Ctrl+P.
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
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
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
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
Post a Question Post your bug report as a question if you want a response from us; for example, if you are looking for a workaround or a fix for your model. When creating your question, consider putting it into the Bug Reports space: Post an Idea You can also post it on this forum as an idea. This lets other users in the community vote on the idea and gives us an idea of how much demand there is. This also creates a place where the idea can be discussed by users and developers. Summary Feature requests and bug reports will be monitored by support and development teams. For confirmed bugs, we will create an issue on our development list. The issue will then be discussed by the developers in our next sprint meeting where we will determine when, relative to the other issues, we want to work on it.
View full article
When installing FlexSim, has the installer ever quit, saying "Installation Cancelled" or "FlexSim must close"? Installation Canceled Installation was cancelled by user. Or has your FlexSim installation ever had errors upon starting the software? FlexSim has encountered a problem. Your work is saved in recovery files. Please notify FlexSim Technical Support. Retrieve your recovery files, then email FlexSim. Do you want to restart? FlexSim encountered an unrecoverable error and must close. Please notify FlexSim Technical Support about this issue. This can be frustrating any time, let alone for a brand new FlexSim installation. Here are some possible solutions that may help FlexSim install or start properly: 1. Meet the System Requirements Make sure that your computer meets FlexSim's minimum system requirements. If your computer's hardware or operating system is out of spec, you may not be able to install FlexSim, or it may not start or work properly. Don't overlook the disk space requirement. You'll need about 2.5 GB free for the installer and the completed installation in order to install FlexSim. Low disk space will cause the installation to fail. Graphics specifications are particularly important, as incompatible/nonexistent graphics hardware or out of date graphics drivers may cause strange graphics behavior or other issues. See this article for more graphics considerations, tips, and guidance for installing or upgrading graphics drivers. 2. Windows Updates, Driver Updates FlexSim relies on some newer Windows components and libraries provided by Microsoft in patches and updates. Make sure your computer is up to date with all Windows updates. In addition to Windows updates, be sure to upgrade your system's graphics drivers, as FlexSim relies on fixes and features found in the latest graphics drivers from NVIDIA, Intel, or AMD. It is not enough to just use Windows Update to check for new graphics drivers - you should check the websites for your system manufacturer or graphics vendor specifically for updated graphics drivers. See our graphics article for more detailed information. 3. Reboot your computer Windows has improved enormously over the years, but even with modern Windows sometimes a good, old-fashioned reboot can do the trick, especially if you have recently installed or uninstalled other software or Windows updates. 4. Run as Administrator Software Installation: Ensure that you have the proper privileges on your PC to install new software. Install FlexSim by right-clicking the installer file and choosing Run As Administrator. If you don't have admin rights, you will be prompted to enter credentials with admin rights. Enter the proper credentials to allow the software installation to proceed. Startup Issues: Try starting FlexSim with higher permissions by right-clicking the program icon and choosing Run As Administrator. If you don't have admin rights, you will be prompted to enter credentials with admin rights. Enter the proper credentials and the software should start with elevated permissions. Does this solve the problem? Some users have reported that some FlexSim components are blocked by default, but can run properly when FlexSim is started with elevated privileges. If you find this is the case for you, work with your IT group to determine how to unblock the DLLs or other components required by FlexSim. 5. Delete FlexSim's saved settings Sometimes when FlexSim has trouble starting up, it can be due to a corrupted prefs.t file. FlexSim's prefs.t file stores your FlexSim settings and preferences and is located at: %APPDATA%\Flexsim\FlexSim <version> The %APPDATA% address is a shortcut to your Windows user account's Roaming directory. This animation shows how to get to your %APPDATA% directory: With FlexSim closed, delete this prefs.t file. Then try starting FlexSim. Are the problems resolved? 6. Reinstall FlexSim Completely uninstall FlexSim and try a new installation. It may be worth downloading a new copy of the full installer to ensure there was no corruption in the install package. You could also try the .msi installer, instead of the .exe. When installing using the .msi you can save a log of the install process. This could help with debugging if there are still problems. Whichever method you use when reinstalling FlexSim, be sure to right-click the installer and choose to Run as Administrator (see the Run as Administrator section above). 7. Update your computer's .NET installation FlexSim relies on Microsoft's .NET Framework for some functionality. Windows 10 includes a compatible .NET version, or if a compatible version is missing the FlexSim installer will try to download and install .NET directly from Microsoft. If your computer/network does not allow this you may need to update .NET yourself. Click here to download the .NET framework directly from Microsoft. After installing the .NET Framework, please revisit the Windows Updates section above. Microsoft may provide new security fixes that should be applied to your .NET installation. 8. Reinstall Microsoft Visual C++ Redistributable These are run-time components provided by Microsoft that are required to run FlexSim. Normally these components are installed during FlexSim's installation process. If FlexSim is encountering errors, it could be caused by a broken or out of date C++ redistributable. Click here to download the latest Visual C++ Redistributable directly from Microsoft. After reinstalling the Visual C++ Redistributable, please revisit the Windows Updates section above. There may be new security fixes for the redistributable. 9. Antivirus We have seen instances where FlexSim is blocked by an overzealous Antivirus software. If FlexSim doesn't start up at all, despite a new installation, this could be the case. To test this, temporarily disable your antivirus and try to install or start FlexSim. If the problem clears up then your antivirus may indeed be blocking FlexSim. In this case, work with your IT department to configure the appropriate settings to allow FlexSim to run alongside your antivirus solution. Remember to re-enable your antivirus software after this test. 10. Windows Event Viewer If FlexSim still won't install or start, try checking the Windows Event Viewer to see if there are any errors related to installing or starting FlexSim. If so, please send those our way so that we can troubleshoot further. In case you've never used it before, here is a tutorial covering the Event Viewer. Add your comments below on what did or didn't work for you, other problems or symptoms you encountered, or tips and tricks that helped you solve them. Fixes for older versions The following suggestions apply to outdated versions of FlexSim. Update OpenSSL DLLs Applies to FlexSim versions 7.0.0-20.2.0 (excluding LTS versions 20.0.9+) Some older FlexSim installations may crash shortly after FlexSim opens, when FlexSim's start page contacts our remote servers for dynamic content, due to a new system incompatibility with the openssl library that shipped with these older FlexSim versions. Newer versions of FlexSim include updated files that resolve this problem. Install the latest version of FlexSim to obtain updated versions of the following two files: C:\Program Files\FlexSim <version>\modules\Emulation\openssl\libeay32.dll C:\Program Files\FlexSim <version>\modules\Emulation\openssl\ssleay32.dll Copy those updated DLLs to your affected FlexSim installation, under its program\Webkit folder, overwriting the older version of those files. Alternate workaround: disconnect your computer from the Internet, both wired networks and Wi-Fi. Start FlexSim. Go to File > Global Preferences > Dynamic Content tab. Deactivate all of the options there. You can now reconnect to the Internet and FlexSim may work properly the next time you start the application. Uninstall KB4571756 Applies to FlexSim versions 7.7.0-16.2.2 A Windows 10 patch released in September 2020 may prevent FlexSim versions 7.7.0-16.2.2 from starting. If you are using one of these older versions of FlexSim and the program will not start, try removing this Windows update: https://support.microsoft.com/en-us/help/4571756/windows-10-update-kb4571756
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
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 requires modern graphics support to run well. Most modern computers from the last few years have no problem running most FlexSim models, but sometimes there are graphics configuration issues that keep FlexSim from working properly. Common symptoms The model 3D view is black or blank. You should see the model view default to a 3D grid. The 3D grid appears, but does not respond to user interaction. You should be able to click and drag the grid to pan (left-click-drag) and rotate (right-click-drag) the view. Click the grid to select it then scroll your mouse wheel - this should zoom the 3D view in and out. Unable to drag an object onto the grid. You should be able to click and drag an object from the Library and drop it onto the 3D grid. It should appear at the location of your mouse. Unable to interact with objects in the 3D view. You should be able to double-click an object to bring up its properties window, or single click to highlight, or click and drag to move it about the 3D grid. Conveyors or other objects are not drawing to the view. Unable to create connections between objects. User interface elements and other GUIs are not displaying correctly. Solutions If you are experiencing any of these issues, it is most likely a graphics compatibility issue. Here are common steps you can take to solve the problem: Open FlexSim's default workspace to reset any potentially corrupted view windows. To do so, from FlexSim's main menu, go to View > Open Default Workspace. Any open windows will be closed and the default 3D view and tool panels will be opened. This could clear up potential issues with 3D or Process Flow views, tools panels, or properties windows. Check that your computer meets FlexSim's minimum system requirements. Review FlexSim's minimum and recommended system requirements. Check this article for an in-depth explanation of hardware considerations. Update your graphics driver to the latest version. This almost always solves graphics issues and is the preferred solution whenever possible. It enables the maximum performance from your graphics hardware and eliminates bugs and glitches in previous drivers. Check out HowToGeek.com's article for a primer on updating graphics drivers. Always go directly to your graphics manufacturers website ( Intel, AMD, or Nvidia) to get the latest drivers for your graphics hardware. Do not trust that Windows Update always gives the latest graphics drivers - in fact it rarely does. Not every user has the proper administrator privileges on their computer necessary to update drivers, so you may need to contact someone in your IT department for help. Try a different graphics driver. If the graphics aren't working correctly and you downloaded the latest driver for your hardware directly from Intel, AMD, or Nvidia, try instead using the latest driver from the computer manufacturer such as HP/Dell/Lenovo/Asus/Acer, etc. If you are already using the latest driver from your computer manufacturer, try using the latest driver from the graphics card manufacturer: Intel, AMD, or Nvidia. Try starting FlexSim with higher permissions by right-clicking the program icon and choosing Run As Administrator. If you don't have admin rights, you will be prompted to enter credentials with admin rights. Enter the proper credentials and the software should start with elevated permissions. Does this solve the problem? Some users have reported certain linked libraries used by FlexSim are blocked by default, but can run properly when FlexSim is started with elevated privileges. If you find this is the case for you, work with your IT group to determine how to unblock the DLLs required by FlexSim. Try turning off Shadows by going to File > Global Preferences > Graphics tab, and uncheck the option Use Shadows. Click the Apply button, then close. Restart FlexSim to see how it responds with this changed setting. Try switching to a different OpenGL Context by going to File > Global Preferences > Graphics tab, and make a new selection for OpenGL Context. Hit Apply, then close. Restart FlexSim and see how it responds. Start with Recommended, then try Core Profile (3.3). If Core Profile (3.3) still doesn't work, try Generic. The Generic context is the last resort option, and is equivalent to the Compatibility mode option in versions of FlexSim previous to 2017. Compatibility mode/Generic Context is not intended for long term use. Revert to this mode only if you must use a computer that doesn't meet FlexSim's minimum system requirements. Test with other 3D applications. Your computer hardware or operating system may have an underlying problem that is causing your graphics issue. You may be able to test this by starting different 3D-accelerated applications or games on your computer. Do other applications besides FlexSim have graphics issues? If so, and you have already tried upgrading your graphics drivers as described above, you may need to contact your IT department or your computer's manufacturer for support. You may have hardware or other issues that prevent your 3D graphics from working properly. Contact FlexSim to let us know that your computer meets FlexSim's minimum system requirements you have installed the latest drivers for your graphics card other 3D-accelerated applications on your computer work just fine but your FlexSim installation still has graphics issues. If this is the case, there may be a software problem in FlexSim that should be addressed. When contacting us about your graphics problem, please include the following: Describe your symptoms in detail. Screenshots are very helpful. For each of the troubleshooting suggestions above, what did you try? What was the result? Please include a screenshot of your FlexSim installation's About FlexSim popup (from FlexSim's main menu > Help > About FlexSim...). This gives us info about your FlexSim version, your graphics hardware, and your graphics driver: A screenshot of your Windows Device Manager, with Display Adapters expanded, is also helpful for our troubleshooting. This gives us additional information about your graphics hardware: Special Cases Nvidia Quadro cards have many different driver versions. We have had good success using the ODE driver (‘Optimal Drivers for Enterprise’). Another option that sometimes improves Quadro compatibility with FlexSim is to open your Nvidia Control Panel and change 3D settings to "3D App - Game Development": Your laptop may have both Intel Integrated graphics and Nvidia/AMD accelerated graphics, and the ability to automatically switch between them depending on the application's 3D requirements. This is a great feature and helps to maximize your battery life. FlexSim should be automatically recognized as a program that should use discrete graphics acceleration, but in case it is not, you may need to set it manually within the Nvidia or AMD Control Panel. Here is the Nvidia Control panel. You can specify an acceleration profile for FlexSim under 3D Settings, Manage 3D settings, Program Settings tab: Click 'Add' and browse to the flexsim.exe executable (default install path is C:\Program Files\FlexSim <version>\program\flexsim.exe). You then have the ability to tweak any and all settings for your FlexSim graphics. The defaults are usually fine, but feel free to play around to tweak things to your liking.
View full article
The attached model contains a basicTE to mimic some operations of a Tower Crane. You should be able to use it like any other task executer. Labels on the crane allow the speeds and operating heights to be altered. To change the jib/beam length use the label parameter and it will apply at reset. Similarly, to change the height for now just change the tower height and press reset to have the rest attached at the correct height. TowerCrane_basicTEexample.fsm Update: Added a user library that will scale the crane based on the model units. Also changed some labels so that rotational speed is specified there and the jib/beam now uses the object properties for max speed and acceleration. TowerCrane.fsl
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
Recommended System Requirements This article complements FlexSim's System Requirements. We'll go over each of the major components, discuss their importance to a FlexSim model, and make recommendations to help you decide on the right hardware for your situation. CPU Single Model Run A single run of a FlexSim model (ie not an experiment or optimization run) is single threaded, which means it runs on only 1 CPU core. Buying a processor with more cores won't speed up a single simulation run. To complete single model runs more quickly, use instead a processor with a faster single core clock speed (gigahertz, or cycles per second) or better efficiency (instructions per cycle). In short, for the fastest individual model runs, you want the fastest processor possible, regardless of the number of cores. Experimenter or Optimizer - Multiple Simultaneous Replications When you're doing multiple simultaneous model runs using the Experimenter or Optimizer, FlexSim takes advantage of multiple CPU cores to run simulation replications in parallel. By default, FlexSim spawns as many replications as you have cores; for example, a Quad core processor enables four single-threaded simulation runs to process simultaneously, one on each core, getting you results four times faster than by using a single core processor at the same speed/efficiency. If necessary, you can manually limit the number of concurrent replications by setting the Max Cores value from FlexSim's Main Menu under Statistics > Experimenter > Advanced tab > Max Cores input field. Each replication consumes some amount of system RAM, so if you run out of RAM before you run out of cores, it may be necessary to limit the number of cores used to run replications. Conclusion If you’re primarily doing single simulation runs, choose a faster processor speed regardless of the number of cores. If you’re primarily doing experiments, choose a processor with a high number of processing cores (and make sure your system has enough RAM to support them - see Memory below). If you’ll be doing both, choose a processor that strikes a good balance between core speed and core count. Memory Considerations Random Access Memory, or RAM, is a PC's fast "working" memory, where it stores the data and programs it is currently running (don't confuse this with your much slower hard drive, where data is stored "at rest"). Most consumer Windows computers top out at 32 or 64 GB of RAM, though Windows is capable of supporting much more when coupled with high-end hardware (see limits per OS here). Your computer is always doing many other things besides just running FlexSim. Your operating system itself has memory needs for all the processes it is constantly running. You probably have an antivirus solution, maybe a backup software, and often other utilities running invisibly in the background. Then there are all the applications you currently have open - your email, a web browser, music streaming, etc. All of these are consuming RAM. As you plan your FlexSim hardware, be aware that you should have enough RAM to run all these other applications, plus your FlexSim model, plus have a good amount of extra RAM as a buffer. FlexSim's Requirements Many FlexSim models will use less than 4 GB of RAM in a single model run, but it all depends on your simulation and data. Some large and complex models can and do go above 4 GB of RAM utilization (sometimes well above). If FlexSim's RAM utilization starts approaching a high percentage of your total available system RAM, your computer will turn sluggish or totally unresponsive as it runs out of memory and begins paging out to disk for its memory needs (which is orders of magnitude slower than RAM). A FlexSim system should have 8 GB of RAM as a minimum. For the best experience we recommend 32 GB of RAM or more. Many modern high-end consumer PCs meet this recommendation. See FlexSim's latest minimum and recommended system requirements here. Experiments and Optimizations Experiments and optimizations run several replications of your model simultaneously, so make sure you have enough total memory in your system so that each replication can hit its peak memory needs, while still leaving enough memory for the system and other running applications (OS, antivirus, other background processes, etc.). In addition, the experimenter saves statistics data for each replication by default. Each completed replication will send its statistics collectors' data to the main FlexSim thread, where it will ultimately be stored in the results database file on the hard drive. However, several stages of the transfer process require two copies of the data. In addition, all child processes can transfer data simultaneously. So, if you have a model that generates 100MB of statistics data, and you run an experiment with 8 CPUs, and all 8 CPUs finish a replication at roughly the same time, you'll need at least 1600MB (100 MB x 2 x 8) to transfer the data successfully, on top of all the other RAM utilization. Example Scenario I've developed a simulation model and now I'd like to run multiple replications using the Experimenter. Watching my simulation run normally, while monitoring FlexSim's memory usage with Windows Task Manager, I see that over the entire course of its run my simulation peaks at about 2.1 GB of RAM at its highest utilization. My computer system has 16 GB of RAM. When FlexSim is not running at all, the system uses about 20% of its resources for the operating system and other background processes. This leaves about 12.8 GB of RAM free. How many concurrent replications of FlexSim can my PC support? 12.8 GB / 2.1 GB per replication = 6.1 concurrent replications So, I might get by with allowing 6 concurrent replications of FlexSim, but I feel like 5 is a safer bet to give the system a bit of headroom, and because running the experimenter and collecting results data also requires some additional memory overhead. Since my computer has a quad-core processor and uses simultaneous multithreading (SMT) (which allows each core to run two FlexSim replications at once), FlexSim's default would be to run 8 concurrent replications. My calculations showed that 8 concurrent replications would be too many, and will probably bog down my PC, slowing or halting the entire process. I will limit the number of concurrent replications the experimenter will use by setting the Max Cores value to 5. This option is set from FlexSim's Main Menu under Statistics > Experimenter > Advanced tab > Max Cores input field. Your settings will differ from this example. Check your computer's amount of RAM, the peak memory needs of your simulation models, and your baseline RAM utilization when you're not running any simulations. Factor in a reasonable % as a buffer. Use these values to determine how many concurrent FlexSim replications your computer may support. When allowing FlexSim to use its default of running the max number of replications your CPU supports, please keep in mind that many multi-core CPUs actually run multiple threads simultaneously per core (simultaneous multithreading - SMT). To fully take advantage of all the simultaneous replications that your PC could run at once, be sure to get enough RAM for all the replications your CPU is capable of. For example, a 4-core CPU with support for SMT could run 8 simulation replications at once. Make sure you have the memory to do so! If not, be sure to use the Max Cores option to limit the number of concurrent replications. Conclusion A system meeting FlexSim's minimum RAM requirement will have enough memory for a single model run of most simulation models. If your simulations are large or complex, or if you intend on running experiments or using the optimizer, you should meet the higher recommended spec of 32 GB of RAM or more. Disk Space Requirements The FlexSim installer may be up to 1.2GB in size, depending on the FlexSim version. After installation, FlexSim's program files use up to 1.2GB of disk space. Your model files, CAD layouts, images, custom 3D shapes, import data, exported reports, and other simulation related assets that you provide will take disk space in addition to the software's installation footprint. Disk Speed Most FlexSim models will run from memory, so hard drive speed isn't really an issue. However, if you're reading/writing with files/databases while the model is running, disk speed could make a huge difference; a Solid-State Drive (SSD) is a must in that case. Alternatively, try to do data reading and writing before and after the simulation run, if possible. FlexSim recommends SSDs in general because they make every interaction with your computer feel faster and more responsive. You won't regret an upgrade from a regular, spinning hard drive to an SSD. Conclusion Consider upgrading your hard drive to an SSD if you will be reading or writing to files or databases during a model run, or to generally improve system responsiveness. Graphics Recommended Graphics The better/newer/bigger/faster the graphics processor, the better the performance. Integrated graphics, where a smaller GPU is packaged into the CPU, have gotten much better in recent years, but a discrete GPU remains the most powerful graphics solution. FlexSim works best on Nvidia GeForce RTX or GTX GPUs, but Nvidia Quadro and AMD Radeon are also good solutions. Most recent integrated graphics solutions meet FlexSim's minimum graphics requirements, but in general will not perform as well as discrete graphics. Graphics Driver Updates It is also important to note that you should keep your graphics drivers updated to the latest version. If your graphics hardware meets FlexSim's minimum requirements but you are experiencing graphical issues in FlexSim, a graphics driver update may solve the problem. Please check out this article for some common symptoms and solutions to graphics issues within FlexSim. Virtual Reality FlexSim supports Oculus Rift/Meta Quest 2, HTC Vive, and Windows mixed reality virtual reality platforms (see demo models). Be sure to meet FlexSim's higher recommended specifications if you plan to use VR. Conclusion While recent integrated graphics solutions meet FlexSim's minimum requirements, a discrete graphics solution is a better choice. For maximum performance, FlexSim recommends a recent NVIDIA GeForce RTX GPU.
View full article
Engage with the FlexSim community here on the FlexSim forum boards. Check out our learning resources. Customers with current licensing can request direct technical support from their FlexSim representative, via phone, email, web meeting, or support ticket.  
View full article
Top Contributors