FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
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
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
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
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
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
FlexSim has been taught in hundreds of universities, both as the subject of full simulation courses and also as short course modules. Professors who teach these courses expect that their FlexSim-related assignments will be completed with a high level of academic integrity. FlexSim has also been used for many capstone, thesis, and dissertation projects, all of which fall under the university’s academic honor code (or honor system). FlexSim is committed to help maintain a high level of integrity in the academic assignments and projects that pass through our support department. We’ve created a list of guidelines for academic modeling using FlexSim: Those Using FlexSim for Academic Purposes Can... Access our extensive product documentation (https://docs.flexsim.com) Utilize the FlexSim Primer (by Dr. Allen Greenwood), which is a great starting resource for learning FlexSim and was developed specifically for academia—download it at https://flexs.im/primer Access papers, videos, and other FlexSim-related documents that are publicly available Search the entire database of questions and answers that have been posted publicly on FlexSim Answers FlexSim Will Not… Complete any portion of an assignment or project which falls under an academic honor code Write custom code as part of an academic assignment or project Share answers or model results from the textbook Applied Simulation: Modeling and Analysis Using FlexSim to anyone except educators teaching the material Otherwise aid in activities that circumvent the academic integrity of an assignment or project
View full article
Article space for Production Engineer Book including FlexSim Examples from Brasil Este material de apoio faz parte do Livro Administração de produção e operações, manufatura e serviços: uma abordagem estratégica, dos autores Henrique Correa e Carlos Correa, em sua 5º Edição. Para auxiliar o aprendizado, este livro conta com exemplos em vídeo e modelos de simulações de processos disponíveis em diversos capítulos. O acesso ao material é gratuito e pode ser acessado através dos links abaixo nas descrições de cada capítulo. Aqui você encontrará o conteúdo detalhado, referente aos arquivos dos modelos de simulação (*.fsm) e os links dos vídeos no YouTube. Dessa forma, o leitor poderá usufruir dos arquivos de simulação criados para facilitar e enriquecer o seu aprendizado. Capítulo 10 Projeto do Produto e Seleção de Processos (Bens e Serviços) Call Center download modelo clique para assistir o vídeo Restaurante download modelo clique para assistir o vídeo Clínica download modelo clique para assistir o vídeo Loja de conveniência download modelo clique para assistir o vídeo Segurança de um aeroporto download modelo clique para assistir o vídeo Terminal Rodoviário download modelo clique para assistir o vídeo Hospital clique para assistir o vídeo Estacionamento clique para assistir o vídeo Capítulo 13 Localização e Arranjo Físico de Unidades da Rede de Operações Layout Celular clique para assistir o vídeo Layout em Linha clique para assistir o vídeo Layout por Processos (em breve) Layout Posicional (em breve) Capítulo 14 Capacidade Produtiva e Filas em Unidades da Rede de Operações Teoria das Filas download modelo clique aqui para assistir o vídeo Capítulo 15 Teoria das Restrições em Redes de Operações TOC Princípios 1-9 download modelo princípio 1 download modelo princípio 2 download modelo princípio 3 download modelo princípios 4 e 5 download modelo princípio 6 download modelo princípio 7 download modelo princípio 8 download modelo princípio 9 clique para assistir o vídeo Sistema Drum-Buffer-Rope (Tambor-Pulmão-Corda) download modelo clique para assistir o vídeo Capítulo 17 Gestão de Estoques na Rede de Operações Simulação de Reposição Periódica / Contínua (em breve) Capítulo 19 Sequenciamento, Programação e Controle de Operações Sequenciamento de Produtos e Otimização download modelo clique para assistir o vídeo Job-Shop download modelo clique para assistir o vídeo Capítulo 20 Just in Time (JIT) e Operações Enxutas (Lean) Produção Puxada vs. Empurrada download modelo clique aqui para assistir o vídeo Cartão Kanban Assista o vídeo e veja na prática um exemplo de simulação do sistema kanban. download modelo clique aqui para assistir o vídeo Desperdícios do Sistema Toyota de Podução (Lean) download modelo clique aqui para assistir o vídeo Setup Assista o vídeo da simulação de um processo de troca de piso da quadra de uma arena multiuso, utilizada para partidas de hóquei e de basquete. clique aqui para assistir o vídeo Informações Adicionais Os modelos de simulações e os vídeos apresentados foram construídos com o Software FlexSim, plataforma digital, a qual possui uma versão gratuita, FlexSim Express, disponível para download através da URL https://www.flexsim.com/pt/ Vídeo passo a passo download e instalação do FlexSim Express Vídeo requisitos de sistema hardware para utilizar o FlexSim Express Contatos suporte@flexsimbrasil.com.br / @Rodrigo Lamas / @Michael Machado
View full article
The Statistics Collector is a powerful object. Its purpose is to record data about the model run as a table, and it is very effect at doing that. However, it is very abstract; being abstract allows it to be highly flexible, but makes it more difficult to learn. This article is meant to help you understand (or remember) how the Statistics Collector models the problem of converting model data from objects and events into a table of data. This article compares a Statistics Collector to a train being loaded an unloaded. It is NOT an article about how to model a trainyard or other rail-industry systems. The purpose is to compare the Statistics Collector, which is very abstract, to something most people understand. So we'll start by talking about the story of a simple freight train. This story has the following elements: Starting - the train starts its journey a the beginning of the line Loading Stops - the train makes several stops along the way to load goods Unload Planning - unlike a normal train, this train determines where it needs to go after this point based on what was loaded into the train Unloading Stops - the train makes several stops along the way to unload goods This is a very simple story. Just keep the sequence in mind - the train starts, makes several load stops, figures out its destinations, and then makes several unload stops. To see how this is like a Statistics Collector, take a look at this model: StatsCollectorVisualization.fsm This model is very simple. It consists of a Source, Queue, Processor, and a final Queue: Items are generated at the Source and flow through the Model. Items have a Type label, so that there are three Types of items: Type 1, Type 2, and Type 3. If you zoom out, you'll see a much bigger section of the model: This section simulates the logic of a Statistics Collector. As the model runs, you'll see AGVs run along the track, like a train. You'll see them make several stops and pick up boxes. Then you'll see them stop at the "Table" (the bigger black box in the image above) and "unload" data into the table. The Statistics Collector tool is a lot like this simulation. It has an internal "train", and you reference that train with the keyword data. When you use the Statistics Collector, you are configuring the journey of the train, which determines what data is recorded in your table. Starting the Train The statistics collector creates a train (the data object) when it observes an event. You configure which events a Statistics Collector cares about on the Events tab. You can listen to many different things, including: A flowitem enters or exits an object A token enters or exits an activity The model is reset The model gets to the warmup time Whenever any of these things happen, the Statistics Collector creates a train (again, called data) and starts it going on its journey. In this example, the Statistics Collector listens for items to enter Queue1. It also listens for items to exit the processor. Either event will start a train. Loading the Train Once the train is going, the Statistics Collector "loads" the train with information. In reality, this happens by adding labels and setting values on data. First, data gets all the values associated with the event (the event parameters) assigned as labels. Then, data gets all the labels specified in the "Additional Labels" section. Finally, data visits the Row Value station. Here, the special property called rowValue is set. Note that as you load the train, you can use anything already on the train to get more information loaded on train. In the example model, the row value is set to "data.item.Type"; data is the train, and the "item" label is already on board, so the row value field can use that to load additional information. Unload Planning The next stop for the train is something that you can't really see, but that is very important. The Statistics Collector inspects the row value on data. The Statistics Collector remembers all row values that it has ever inspected, and it adds a row to the table for each unique row value. This is where the row value got its name. If the Statistics Collector sees a value it has never seen before, it adds a row to the table, and associates the new row with the row value. Once the row is either added or found, the Statistics Collector sets the property rowNum on data. So now, the train knows which row it is going to visit. All that is left in this phase is to figure out which columns the train will visit. First of all, if the row was added, the train will visit all the columns to set their initial value, which is called the Row Add Value (the value to set when the row is added). Whether or not the row was added by the event, the train will also visit any columns that are connected to the event, setting the value to the Event Value (the value to set when a connected event happens). So in summary, the Statistics Collector figures out which row the train will visit based on the row value, adding a row if necessary. If the row was added, then the train visits all columns in the row, to set the Row Add Value. If the event is connected to any columns, the train will also visit those columns, and set the Event Value. Unloading the Train Finally the train can unload data into the table. As it visits each cell, it unloads information into that cell. As the user, you configure what gets unloaded at each cell. You can unload anything into the cell, including anything on the train, anything connected to anything on the train, or anything globally accessible. In reality, whenever the Row Value or Event Value is evaluated, you can access and labels or properties on data. You can also use values on data to access other values. Or you can access global values, such as the current model time, or a Global Variable, or a value in a Global Table. In the example model, the Event Value field accesses the value that is currently in the table at the cell being visited by data. Does the statistics collector really have to travel? In the visualization model, the data train takes up time on the clock to load, plan, and unload. However, for the true Statistics Collector, all of that happens in zero time. For example, when an item enters Queue1, the real statistics collector in the model finishes updating instantaneously. In contrast, the visualized statistics collector train is still moving to get more labels. This is for illustration purposes only. What about "Update when accessed" columns? All Statistics Collectors know when something is trying to read their values. For example, if you have a chart pointed at a Statistics Collector, and that chart repaints, it will read the Statistics Collector. Or if you access the table through FlexScript with code like Table("MyStatisticsCollector")[1][1], that will read the Statistics Collector also. So in a way, it's just another event. However, there are two differences: You can't load custom labels on the train for this event; it "skips" those stops The train visits all rows in the table When you set a column to update when the value is accessed, you are basically connecting it the "OnAccess" event. So when the table is accessed, the data train visits all rows of the table. For each row, it gets the rowValue and rowNum properties set, and then it visits all the "update on access" columns. What about other features? This article just covers the basics, and doesn't cover other features of the Statistics Collector. Just know that there are many ways to configure the train's journey. For a full reference, see https://docs.flexsim.com/en/21.0/Reference/Tools/StatisticsCollector/ However, all of the features discussed in the reference add more detail; you can just improve your mental image of how the Statistics Collector works.
View full article
FlexSim 2019 Beta is available. (Updated 21 December 2018) To get the beta, log in to your account at www.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Development space. Release Notes Added support for importing JT files. Added a way to directly animate 3D shapes with bones. Added a way to parent subcomponents to a bone on a 3D shape. Updated calculated tables and chart templates to be able to save their data during an experiment. Added support for SQL keywords UNION, UNION ALL, INTERSECT, and EXCEPT. Updated the time table's weekly and daily modes to use a graphical display. Improved the time table's user interface. Added options for stacking bars on a histogram and added more bar modes. Added a Column Sets feature to statistics collectors. Added more options for event listening in statistics collectors. Added an option to statistics collectors and calculated tables for object path display depth. Added an option to statistics collectors to stop tracking row values after specified events. Added an option to milestone collectors to start new entries on the next milestone. Added options to record more data in additional columns on a milestone collector. Added enable/disable right-click menu options to statistics collectors in the toolbox. Improved the performance of calculated tables in certain configurations. Fixed a bug with Always Leave Entries on List when reevaluating multiple back orders. Fixed a bug with color spilling from one mesh to another when using shape data overrides. Fixed scaling issues and a crashing bug when loading certain STEP and IGES files. Process Flow Improved the Token.create() method to be able to create child tokens. Added a new Person Flow type of Process Flow. Fixed a bug with a resource connected to a global list deleting the list when the resource was in an instanced flow. People Added a Process activity. Added a Remove Person activity. Added various activity sets to quickly create common groups of activities. Added a priority value to resource objects that is used for acquiring and preempting resources. Added advanced options to the Process activity for handling preemption. Added functionality for simulating shift schedules with time tables and down behaviors. Improved the UI for how people objects are added to groups. AGV Improved control point selection on paths in the 3D view. A* Added a way to draw a heat map based on a node's percentage of total traversals. Added a Two Way option to preferred paths and dividers. Added a Condition option to A* objects to optionally disable them under certain circumstances. Added a Mandatory Path object used for defining sets of paths where certain connected objects can travel. Updated the Barrier object to be able to specify patterns to determine how it affects the grid. Added a FlexScript API for A* objects and data. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Fixed a bug with A* barriers blocking space larger than their actual size.
View full article
So you were trying to record a video and the Video Recorder crashed. Here is a step by step guide on how to debug the video recorder: Step 1: Is there a stop time in your model? In some older versions of FlexSim (2022 and older), if there is a stop time in your model that occurs during the model recording time, the video recorder will stop indefinitely at that time. Try removing any stop times that occur during the recording. Step 2: Are your graphics drivers up to date? (!!!!!!!!) This is the most common problem we see as to why the video recorder is not working. To start debugging this issue, check what graphics card FlexSim is using. If you open a model then go to Help->About FlexSim from the top toolbar, you will open this screen: The highlighted text that starts with OpenGL tell you what graphics card FlexSim is using. Now you might need to do a little research to find what graphic driver that card is using and then update it, but we've found in most cases updating the graphics card driver fixes video recorder issues. There's an article here the explains more on how to update your graphics driver (it's a very helpful read that also deals with some special cases on certain graphics cards). Make sure you're downloading either directly from the makers website or for your specific computer type, your computer will not be able to tell you if they're out of date. Step 3: Can you record a simpler video? If you make a very simple model (Source -> Queue -> Processor -> Sink), can you record it without issue? If you can then at least you know your video recorder can work, it is just having a issue with running a bigger model. If this is the case you might be running out of VRAM or the bigger model is taking so long to run that an outside manager is forcing it to close. If that is the case, here are some things to try: Update your graphics drivers (this is always the biggest issue). Revert your graphics card settings back to their defaults (for example, in the Nvidia Control Panel). For the next two suggestions go to the toolbar and click File -> Global Preferences -> Graphics Turn off Shadows and/or record a smaller resolution video to see if that helps. If it does, then the issue is likely that FlexSim is trying to use more VRAM than your graphics card supports. Make sure you are using the Recommended OpenGL Context and not the Generic (No GPU acceleration) or Core Profile contexts Step 4: Did your model crash previously while recording a video? There may be some corrupted data stuck in your recorder. It's an easy fix, you just need to delete your video recorder from toolbox and then re-add it: Step 5: Are you using a much older version of FlexSim? In a few of the older versions (2019.1 and older), temporary nodes from previous recordings caused the Video Recorder object to crash. To fix it all you need to do is clear the nodes Open your model, execute the following script, and then re-save your model: Model.find("Tools/VideoRecorder>variables/active").subnodes.clear(); Step 6: None of the previous steps worked, what now? If none of the above steps worked you can create and check debug log files, check the filepath, check various computer settings, and see the VRAM allocations to start solving the problem. Check the filepath FlexSim is putting the video from the video recorder into, if it is trying to put it in a strange place that can cause issues. FlexSim uses ffmeg to encode the captured frames into a video file, which leaves an ffmpeg_log.txt file in the directory where the video was created. That file might have something in it that might explain what is happening. You can create fslogfile.txt and exfslogfile.txt files in your FlexSim 20XX Projects directory that FlexSim can write debugging information into. Sometimes you might be able to get exception information in those files in certain cases: Check your settings in Windows or Group Policy or other IT software. It's possible something on your machine separate from FlexSim is noticing that the FlexSim process is taking a long time to respond and then killing its process because it thinks it is hanging. Try clicking the Record button and then not clicking any more anywhere on your machine until the recording is done. Or try recording a shorter timeframe to see if that helps. In Windows' Task Manager, you can add the Dedicated GPU memory column on the Details tab to see how much VRAM FlexSim is using. If FlexSim tries to use more memory than your graphics card supports (or if the total usage of FlexSim and all the other programs currently running exceed your hardware's limit), then FlexSim will likely crash the next time it tries to allocate and use any graphics objects stored in GPU VRAM (such as output buffers used by the Video Recorder, textures, 3D meshes, etc.). You can use Window's "dxdiag" tool to see how much VRAM your graphics card has: If you tried all of these suggestions and nothing worked, feel free to ask a question on the Q&A board and we can work to see if we can find a different solution for you!
View full article
Introducing FlexSim Galaga! GALAGA.fsm This is an example of how a game could be made in FlexSim. Feel free to download the model and try it out (FlexSim Version is 23.1). Or if you are interested, see below for how the game works. How it works FlexSim Galaga uses Process Flow to perform all logic that occurs in the game. It also takes advantage of Global Variables to keep track of game data as the game is played. This allows one token to set a variable, for example WaveCounter, and that same value can be referenced anywhere in the model. Player Movement and Inputs I used the function iskeydown() for all player inputs. A token loops through a Custom Code activity that continuously checks for which keys are being pressed and makes the corresponding changes in the model. An example of this for player movement looks like this: if (iskeydown(65) && te.location.x > -90){ // left A te.location.x = te.location.x - 10; } if (iskeydown(68) && te.location.x < 90){ // right D te.location.x = te.location.x + 1 For shooting, similar code is written and assigns a label to the player. This label is used for the token to act differently depending on what the player has bought from the shop. The shop inputs are similar and check if the player has enough money for the selected item in the shop. (See the process flow activities 'Shoot Inputs' and 'Shop Inputs' for how this is done.) Wave Health and Speed As the game plays out, waves get more difficult and arrive faster. Each enemy ship has a certain health value and money value that the player earns when destroying it. These values come from the Global Table WaveHealth. After 50 waves, this table is repeated to spawn new waves. This can go on forever in Endless Mode or this table can be modified during the Model run by buying Extreme Mode. The game starts with Waves that last 20 seconds. To make the waves arrive faster over time, this code lowers the WaveDuration from 20 to 15 to 10 etc. every 12 waves. 5 seconds is the fastest wave time and doesn't get any faster. if (WaveCounter % 12 == 0){ if (WaveDuration > 5){ WaveDuration = WaveDuration - 5; } } Enemy Ships and "Collision" Logic When enemy ships are created, they are added to a Global Map called ColShipMap. The key is the column number the ship is in (1-20) and the value is an array of all ships in that column. This makes it easy to check if a shot has hit a ship. While shots are moving the token they are associated with constantly checks the distance between the shot and any ships in that column (thanks to ColShipMap). The column the shot belongs to is calculated based on the x location of where it is created. When the distance between the shot and a ship in that column is close enough, labels are changed on the token so the game knows which ship was hit and to decrease the health or destroy the object entirely. double x = token.shot.getLocation(1, 0, 0).x; // inverse of token.item.location.x = ((index - 1) * 10) - 95; int index = (x + 95) / 10 + 2; token.Index = index; Array spaceships = ColShipMap[index]; Vec3 shotPos = token.shot.as(Object).getLocation(0.5, 0.5, 0); for (int i = 1; i <= spaceships.length; i++){ double spaceshipY = spaceships.location.y; if (Math.fabs(spaceshipY - newY) < 2) { token.Hit = 1; token.target = spaceships; token.SpliceIndex = i; break; } } Display There are several Billboard objects in the model that toggle depending on the state of the game. (switch_hideshape() is used to make them appear like they are flashing) Feel free to look in the process flow for when these occur, but the overall purpose is to inform the player of what is happening in the game. Note: If you zoom out and want to re-center the model for an optimal display. Open properties and click on the view called 'Menu.' Then close the properties window. All other windows like the Toolbox are closed to make game visuals better. Feel free to look into the Process Flow or Model Triggers for anything I didn't mention. Enjoy!
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
Staying up-to-date FlexSim recommends staying up-to-date and using the latest Software version. New features, improvements, and bug fixes make your simulations more stable, more powerful, and easier to build.   In addition, the Software is developed for use with contemporaneous hardware, operating systems, and drivers. Among other reasons, as third parties phase out these technologies, FlexSim must discontinue support for Software versions developed for use with those technologies.   Finally, as usage of older versions decreases, FlexSim must devote its resources to supporting more recent Software versions to best serve the majority of our customers who stay current on Software maintenance and updates.   Lifecycle and Support Policy If you must use an older Software version, understanding the Software Support Lifecycle will help you make informed decisions about when to upgrade.   A Software release is generally supported until it is four (4) or more versions prior to the current release. For the most up-to-date lifecycle and support policy information, please see section 17. Software Support of FlexSim's Software License Agreement.   Lifecycle status terminology Supported - FlexSim will maintain licensing infrastructure necessary for a given Software version and will provide technical support for that version for licensed users under current maintenance or subscription. Bugfixes - Bugfixes are issued periodically for the latest Software version, as needed. A Software version typically receives bugfixes until the next Software feature release. Learn more about FlexSim version numbering and bugfixes. LTS - Long-term support versions receive bugfixes for a longer period, typically 12-15 months. Beta - Preview the next version of FlexSim Software for demonstration, testing, and validation. Beta versions may not be suitable for day-to-day production use. Beta versions are superseded by their production-release version. No support - After a Software version is 4 or more versions older than the latest release it is no longer supported. Such a version may continue to work on the computer where it is installed and licensed, but it is no longer eligible for technical support and FlexSim cannot guarantee that licensing infrastructure will remain in place to move the license key to another computer. Supported Versions The following Software versions are currently supported.    Application   Version   General Availability     Lifecycle Status  FlexSim 25.1 2025-04-14   supported + bugfixes FlexSim 25.0 2024-12-11   supported + LTS FlexSim 24.2 2024-08-05   supported FlexSim 24.1 2024-04-08   supported   Unsupported Versions The following Software versions are past their supported lifecycle. We recommend updating your software to a supported version.    Application   Version   General Availability   End-of-Life   Lifecycle Status  FlexSim 24.0 2024-12-06 2025-04-14 no support FlexSim 23.2 2023-08-07 2024-12-11 no support FlexSim 23.1 2023-04-03 2024-08-05 no support FlexSim 23.0 2022-12-05 2024-04-08 no support FlexSim 22.2 2022-08-02 2024-04-05 no support FlexSim 22.1 2022-04-04 2024-04-05 no support FlexSim 22.0 2021-12-06 2024-04-05 no support FlexSim 21.2 2021-08-09 2024-04-05 no support FlexSim 21.1 2021-04-02 2024-04-02 no support FlexSim 21.0 2020-12-04 2024-03-26 no support FlexSim 20.2 2020-08-11 2024-03-26 no support FlexSim 20.1 2020-04-10 2024-03-26 no support FlexSim 20.0 2019-12-06 2023-12-31 no support FlexSim 17.0 - 19.2 various 2023-12-31 no support FlexSim 7.7 - 16.2 various 2022-06-30 no support HC 5.3 2017-10-13 2022-06-30 no support FlexSim < 7.7 various 2020-12-31 no support HC < 5.3 various 2020-12-31 no support   Notes The date format used is YYYY-MM-DD Bugfix releases follow the same lifecycle as the major release with which they are associated. Versions not listed should be assumed as past their supported lifecycle.
View full article
FlexSim 2021 Update 2 Beta is now available (Updated 26 July 2021) To get the beta, log in to your account at https://account.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. The More Versions button does not appear when logged in as a guest account. Subsequently the beta is available only to licensed accounts and accounts that have a license shared with them. Learn more about downloading the best version of FlexSim for your license here. If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Development space. FlexSim 21.2.0 Release Notes Added a Template system for inheriting properties from other objects. Added new manipulation handles for moving, rotating, scaling, and connecting objects in the 3D view. Added ability to delete connector lines. Added a StateTable object. Added a getstatetableutilization() command. Added a Pass-through parameter type. Added a checkbox so transporters can move their forks separate from traveling. Added more Task Executer shapes. Improved treenode.getPath() to return a relative path to nodes that aren't a direct ancestor. Added a Frustrum Culling checkbox in Visuals. Agent Added an AgentSystems property. AGV Allowed the user to define some basic routing cost multipliers, including: An option to divide by speed, allowing for fastest path routing (instead of shortest path) An option to define a custom path-based multiplier to the cost Added Path Conditions, which allow you to "close" certain paths, based on either model state or agv state, etc. Added a Prioritize Control Point Lookahead option. A* Added the capability to have oblong grid node sizes. Allowed barriers to be inside visual tools. Added the ability to add dynamic barriers to the A* system. This is done by calling AStar.navigator.addDynamicBarrier(), then AStar.navigator.removeDynamicBarrier() to remove those barriers. Added several triggers to A* objects: AStar.Navigator: OnGridChange: called when dynamic barriers are added or removed AStar.Traveler: OnCalculatePath: called just before a traveler's path is being calculated AStar.Traveler: OnNavigatePath: Called just before a traveler runs the algorithm to define kinematics and cell allocations for traveling its path. Also allows the ability to override the default behavior and define your own. Made several additions to AStar.Traveler API, AStar.Navigator API, etc. Added a TravelPatterns property. Backwards Compatibility Note: The following changes may slightly change the way updated models behave. Improved the deadlock recovery algorithm. Now it will add each traveler in the deadlock, as well as any travelers that are waiting on those travelers, as dynamic barriers. Then it will go through each traveler in the deadlock, remove it from the dynamic barriers, add any additional travelers that are adjacent to that traveler as barriers, then try to recalculate the path to the traveler's destination. If it finds a traveler that can still travel all the way to its destination, that traveler will be rerouted. Otherwise, if it finds a traveler that can travel at least on grid square, it will reroute that traveler. Otherwise, it will give a notification of unrecoverable deadlock. GIS Added the GIS module to the Flexsim Installer. Process Flow Added a ProcessFlows property. Added a ProcessFlowVariables property. Backwards Compatibility Note: The following changes may slightly change the way updated models behave. Removed instance object editing from Object Process Flows.
View full article
I was recently asked how a user can implement jerk, i.e. a rate of acceleration change, in the AGV module. The AGV module uses FlexSim's kinematics API to define the motion of AGVs along paths. The kinematics API does not natively support jerk. However, the AGV module has included a hook to allow developers, and audacious end users :-), to customize the kinematics that drive AGVs on paths. Using this hook, you can approximate jerk by breaking what would otherwise be a single kinematic, with a single acceleration/deceleration, into multiple smaller kinematics that gradually change the acceleration/deceleration of the object as it progresses. There are two ways to do this. The first option is to simply do it as an end user, confining your changes to your model, by customizing nodes in the tree. The second option is to do it as a module developer, using the module SDK. Adding Jerk as a User The AGV network uses an "AGV Customization Delegate" to allow for hooks to be placed at certain points in the AGV navigation logic. There is a default customization delegate that the AGV network uses, but you can override the logic of this default delegate by adding and configuring a special node at MODEL:/AGVNetwork>variables/customizationDelegate. But before I tell you how to do it, I want to explain a little more about how it works. I've attached three C++ files. The main ones you'll want to look at are AGVCustomizationDelegate.h and AGVCustomizationDelegate.cpp. These show the definition of the customization delegate class. In the header file, you'll see the definition of AGVCustomizationDelegate class. This class includes several methods, but the main method relevant here is addKinematics(). This method takes several parameters defining the context. Its responsibility is to add one or more kinematics, in the positive X direction, that will move the AGV the target distance along a path. The AGVCustomizationDelegate class is the default customization delegate used by the AGV network. The C++ files also define a subclass called UserAGVCustomizationDelegate, which overrides the methods of its parent class by delegating the logic to FlexScript code that the user can write in the model. So, now for actually doing it in the model. We want to instantiate an instance of UserCustomizationDelegate at the node MODEL:/AGVNetwork>variables/customizationDelegate, so that we can write FlexScript code to add the kinematics. Navigate in the tree to MODEL:/AGVNetwork>variables/customizationDelegate Right click on that node, and choose Edit > Designate this Node (so) In a script window execute the script: nodeadddata(so(), DATATYPE_SIMPLE) Add a subnode to that node named sdt::attributetree and give it the text: AGV::UserAGVCustomizationDelegate. Copy the node and then paste it onto itself. This will instantiate the UserAGVCustomizationDelegate. Right-click on the addKinematics subnode and choose Build > Toggle Node as FlexScript. Right-click on the addKinematics node and choose Explore > As Code. This will allow you to edit the code for adding kinematics. The header for field should be as follows (note this is determined by the evaluate() command in AGVCustomizationDelegate.cpp at line 71). treenode kinematics = param(1); // the kinematics node to call addkinematic()/getkinematics() on treenode section = param(2); // the associated travel path section double startAtTravelDist = param(3); // the agv cumulative travel distance at this point double distance = param(4); // the distance to travel on the path section (your addkinematics() calls should add up to this distance) double startTime = param(5); // the start time for the first addkinematic() call double startSpeed = param(6); // the initial speed to start at double endSpeed = param(7); // the target end speed (should be going this speed at the end) int reason = param(8); // reason for adding the kinematic (see AGVCustomizationDelegate.h) treenode endSpeedOut = param(9); // if target end speed cannot be reached, update this node's value with the actual end speed double peakSpeed = param(10); double acc = param(11); double dec = param(12); TaskExecuter agv = ownerobject(tonode(get(kinematics.up))); // the agv At this point you can customize how kinematics are added to the kinematics node in this code. To approximate jerk you would break it up into small addkinematic() commands that each change the acceleration/deceleration. Please refer to the kinematics api for more information on how to manipulate kinematics. Note that you should only use the addkinematic() and getkinematics() commands in this field (not initkinematics() or updatekinematics()), and the addkinematic() command should only tell the AGV to move forward in the X direction. Y and Z directions are ignored by the AGV travel logic. In other words, from a kinematics perspective, the AGV network "flattens" an AGV's path into movement in a straight line along the x axis. When you're finished adding kinematics, you should return the end time of the last added kinematic. This will be the same as the return value of the last called addkinematic() command. Adding Jerk as a Module Developer To implement jerk as a module developer, you would first create a module using the module SDK. Then you would include AGVClasses.h and AGVCustomizationDelegate.h in your project (do not include AGVCustomizationDelegate.cpp as it won't compile properly. I'm including that file just to be informative in this article). Then you would subclass AGVCustomizationDelegate with your own class that overrides the appropriate methods, specifically the addKinematics() method. Once you've done that, you would replace MODEL:/AGVNetwork>variables/customizationDelegate with an instance of your customized class, using the same steps described above, but using your own class name instead of AGV::UserAGVCustomizationDelegate. If you need more header files so you can access more information, i.e. the definition of TravelPathSection, the let us know and we can get them to you. agvheaderfiles.zip
View full article
FlexSim Answers is designed to make information available to the FlexSim community. However, there are times when you will need help with a model or project that contains proprietary or otherwise confidential information. Here are a couple ways of getting the help you need while protecting sensitive information. Private Questions When you create a question you can mark it as Private. The question is then only viewable to FlexSim employees. A lock icon will show up next to the question for those who can see the question Comment Visibility (Currently this option is only available to moderators, but moderators may use it to make comments visible only to you and other FlexSim employees) You can also post private comments by setting the visibility level of your comment. Setting the visibility of the comment to Viewable by Moderators will make the comment visible only to FlexSim employees. Posting private comments is useful for posting confidential information to questions that aren't private.
View full article
I'm attaching a user library and an example model that contains process flows for two types of merge controller. The main advantage of both of these is that the release strategy is consolidated into a single list pull query, so that you can have incredible flexibility in defining custom release strategies just by adjusting a single query. Several query examples are included and explained. The DPClearingMergeController uses the standard merge controller mechanism that utilizes decision points and the merge controller's lane clear table to determine when slug lanes are clear for release. Alternatively, the FixedGapMergeController customizes lane release times for an optimal target gap between released slugs. This, combined with a good release strategy, can maximize total merge throughput. Here's a view of the fixed gap merge control running. Notice how it tries to time the releases so the slugs line up pretty close on the take away lane (the target gap here is 3 feet). And below is a screenshot of the fixed gap merge control process flow. mergecontrollerprocessflows.zip This model and library were created in 16.1.0.
View full article
Top Contributors