FlexSim Knowledge Base
Announcements, articles, and guides to help you take your simulations to the next level.
Sort by:
FlexSim 2024 Beta is now available. (Updated November 20) FlexSim 24.0.0 Release Notes To get the beta, log in to your account at https://account.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. The More Versions button does not appear when logged in as a guest account. The beta is available only to licensed accounts and accounts that have a license shared with them. Learn more about downloading the best version of FlexSim for your license here. If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Bug Report space or Development space.
View full article
En este video aprenderán a crear diferentes layouts en un modelo de simulación de FlexSim usando la herramienta Model Layout. Para más videos tutoriales pueden suscribirse al canal de YouTube de FlexSim Andina y acceder a nuestra lista de reproducción de FlexTips.
View full article
Playing Multiplayer Tag in FlexSim! TagServer.fsm TagClient.fsm This is a side project to show off some fun things FlexSim can do using sockets. Sockets are just one possible way that one instance of FlexSim can communicate with another. In its simplest sense, a socket is just a port number and an IP address that computers use to send information to each other. For example, whenever a computer visits a website, it uses sockets to create a connection to the webserver's IP address on port 80 (HTTP) or port 443 (HTTPS). All of this occurs within the framework of the TCP/IP network. Similarly, FlexSim can establish socket connections to communicate with another FlexSim as long as you know the IP address and choose a port for both instances to connect on. Establish Socket Connection In this game of tag, the model that acts as the server uses these commands to set up socket connection with the client: socketinit(); servercreatemain(8002); serveraccept(0); Note: All of the commands in this article can be found in the documentation The client then runs the following to connect to the server. The HostIP should be the IP address of the device running the server model (or 127.0.0.1 if running both client and server on the same machine). socketinit(); int a = clientcreate(); int a_con = clientconnect(a, HostIP, 8002); On both the client model and server model, these commands are in the OnRunStart trigger and the server creates 5 socket connections for each player. 4 for inputs (up, down, left, right) and 1 for passing in their player name from the client. The server model will freeze and wait for all sockets to be set up. For example, if there are 3 players, the server model will wait until 3 clients have successfully ran the client model and connected. After all clients have connected to the server, we can use clientsend() and serverreceive() to send information from client to server. An example of this is sending movement inputs from client to server. This is what that looks like: Client // MOVE if (iskeydown(87)){ clientsend(2, "up"); } if (iskeydown(83)){ clientsend(3, "down"); } if (iskeydown(65)){ clientsend(4, "left"); } if (iskeydown(68)){ clientsend(5, "right"); } Server string up1 = serverreceive(token.Rank * 5 - 3, NULL, 100, 1); string down1 = serverreceive(token.Rank * 5 - 2, NULL, 100, 1); string left1 = serverreceive(token.Rank * 5 - 1, NULL, 100, 1); string right1 = serverreceive(token.Rank * 5, NULL, 100, 1); // token.Rank is the number of the player (1,2,3 etc.) and is used to reference the right // socket for each player's inputs //reset coordinates te.X = 0; te.Y = 0; te.Stop = 0; if (up1 != ""){ // up W meaning the server received an input on this socket te.Y = 1; // this accounts for getting multiple messages from client like "upupup" } if (down1 != ""){ // down S te.Y = -1; // this label is later used in a travel activity } if (left1 != ""){ // left A te.X = -1; } if (right1 != ""){ // right D te.X = 1; } Note: In a typical game environment, the server is also sending information back to the clients, but in this example, all visuals and logic occur on the server. Game Logic All game logic is found on the server process flow. Setup and Order of Models To play Tag, follow these steps: Note: If there are certain firewalls or security groups on your network that doesn't allow traffic into FlexSim outside local networks you may be limited on who can connect to play tag 1. Open TagServer model and change NumPlayers parameter to the desired number of players 2. Open TagClient model and change both global variables (HostIP and EnterNameHere). Again, if everything is running on the same device, use 127.0.0.1 as the HostIP global variable value. 3. Reset and Run the TagServer model first 4. Reset and Run the TagClient model. You should get this output if connection was successful 5. Run clients one at a time for each player until all players have connected and the server will run automatically. This is the output on the server upon successful connection 6. Enjoy!
View full article
FlexSim 2018 Update 2 Beta is available. (Updated 26 July 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 an interface for running experiments and optimizations on the cloud. Added a mechanism for adding new charts as experimenter performance measures. Added a Sankey Diagram to the dashboard charts. Added a Milestone Collector statistics tool and chart templates. Added a way to customize how objects draw their 3D shape meshes. Added {} syntax to specify FlexScript expressions in SQL queries. Added a Down Behavior tool that can be used by Time Tables and MTBF MTTR objects. Added a message() method to the Object class to replace sendmessage() and senddelayedmessage(). Added a varchar bundle field type for variable-length strings. Added status bar updates to the table view. Updated the bar and pie charts with more options and data formats. Added duration settings to the gantt chart. Added new task sequence classes to the FlexScript API. Added a getCategoryName() method to the TrackedVariable class. Added getEntryFromValue() and reevaluateBackOrders() methods to the List class. Added padStart() and padEnd() methods to the string class. Added an option to sort back orders independent of entries when reevaluating back orders. Added an option to configure a list to always leave its entries on the list. Added events to the Statistics Collector. Added options for sorting rows in statistics collectors. Added dot syntax label access to List.BackOrder. Added a backOrder keyword that is available in a list back order queue strategy. Added a new overload to List.pull() that takes both an array and a query. Updated user library functionality to better handle conveyor types and containers. Updated Move into Highlighted code to preserve global position and rotation. Improved sampler options in various places. Improved drop-down options with label values in several places. Updated the Ctrl+W keyboard shortcut so it correctly closes the window that has keyboard focus. Updated the query() command to re-throw exceptions. Fixed a bug with updating bundle indexes when using certain commands. Fixed a performance bug with pasting into bundle tables. Fixed a window docking bug. Fixed a bug with the robot not drawing collision spheres or its stopped indicator. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Changed Variant math operations on non-numbers to throw exceptions. Updated the Source to automatically attach task executer flowitems to the DefaultNavigator. Updated dumpquery() to use bundle varchar fields. Fixed an issue with the Z-axis being inverted for screen-locked shapes in perspective 3D views. Process Flow Added stop() and resume() methods to the Token class. Updated global shared assets so they now have a separate global block instance. Updated Edit Mode so you can no longer move activities when it is off. Added a check box to quick properties to turn off all trace histories. Updated Wait for Event to handle listening to arrays of objects. Updated Pull from List so you can use it with a Resource shared asset. Updated the Resource so you can point it at a global List or a List shared asset. Added a way to sample shared assets in certain fields. Updated the naming convention for Resource object copies. Added an error message when trying to rename a shared asset the same name as another. Improved the performance of the Wait for Event activity. People Updated the multi-location to allow people to enter without an available sub-location. Conveyor Added a max count slug building property to the conveyor type. Added a catch condition to the power and free functionality to customize whether a given dog will actually catch an item. Added the capability to reverse conveyors under certain conditions. Changed the roller skew kinematics to be based on item travel distance instead of time. Changed the conveyor's belt repeat distance to sync to the adjusted dog interval. Fixed a bug with decision points snapping to grid when added with a conveyor from a user library. AGV Updated path transfers to prioritize their requests. Fixed an issue with accumulating path allocations causing AGVs to get stuck. Fixed various issues with AGVs having different deceleration values. Backwards Compatibility Note: the following changes may slightly change the way updated models behave. Improvements to AGV proximity detection on accumulating paths. Emulation Fixed Modbus polling for changes. Fixed the Modbus panels in the Variable shared asset so they show the associated object now.
View full article
Pools of features, organized by version A license is actually a set of features. Different license types are made up of different sets of features. This table shows the various features that make up different FlexSim license types (Enterprise, Educational, Runtime, etc): Each license is set to a given version, and each of the contained features is at that version. With that background, once a license is activated on a license server, its features are added to a pool of license features at a given version. So for instance, let's say you have the following 2 licenses activated to your license server: Enterprise 23.0 - 2 seats Runtime 22.2 - 1 seat Once these licenses are activated to your license server, the server actually has no idea it has 2 Enterprise and 1 Runtime. It sees only the following pools of license features: dragdropconnect 2 seats [23.0: 2 seats] (the Runtime license didn't provide one of these) compile 3 seats [23.0: 2 seats, 22.2: 1 seat] xmlsaveload 2 seats [23.0: 2 seats] (the Runtime license didn't provide one of these) ... commercialuse 3 seats [23.0: 2 seats, 22.2: 1 seat] createobjects 2 seats [23.0: 2 seats] (the Runtime license didn't provide one of these) modeltree 1 seat [22.2: 1 seat] (not a feature of Enterprise licenses) FlexSim software is feature-greedy By default, when a FlexSim install contacts a license server for a license, it will try to get 1 of every feature at the software's version or later. In this way we say that FlexSim software is "greedy". For instance, under the above scenario, when you start FlexSim 22.2, the software will default to pull the following features: dragdropconnect compile xmlsaveload stochastics consolescript nomodellimit entiretree commercialuse createobjects modeltree The italicized features are Enterprise-specific. The bold feature is Runtime specific. The software just tries to get one of each feature, so now its feature set is a hybrid of Enterprise+Runtime. In the software it reports a "Custom" license: If a 2nd person were to open the 22.2 software, they would get that same set, minus the one modeltree feature from Runtime, essentially giving them the 2nd Enterprise seat. If a 3rd person tried to open the software in version 22.2, they would get a slightly hobbled version of a Runtime license, without the modeltree feature. Any in-software features that relied on that being present would be blocked. Only checkout features for license type The software includes an option to limit what features it will ask for: In this way you can ensure that the right people are getting the right feature set.
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
Why would I delete a fulfillment? You may need to manually delete a fulfillment from your PC if: Your license is broken. Sometimes you can fix this problem yourself by attempting a repair. However, you may get a message that the repair failed. "Repair: failure. Online return/repair request for the activation ID is not originated from the original client machine." In this case contact your local FlexSim distributor to explain the situation and let them take a look. Reference this post. If they determine it is best to delete the broken fulfillment, follow the instructions below to do so. Your distributor will then force-return the broken license so that it will be available for a new activation. You mistakenly requested a force-return of a license. If you later find the fulfillment that you thought was lost, that fulfillment is no longer able to be returned normally (because it was already force-returned). In these cases, and in a few other rare circumstances, you may find it necessary to manually remove a fulfillment from your computer. This process occurs exclusively on your computer without any communication with FlexSim's main license server. Delete your fulfillment FlexSim 23.0 or greater For FlexSim version 23.0.1 or greater, you can delete fulfillments using the License Activation window. From FlexSim's main menu, choose Help > License Activation. Under the Advanced tab, find the Delete sub-tab. Choose the fulfillment you'd like to remove from your computer and click Delete. Confirm your choice to remove the fulfillment from your computer. Currently licenses that are *BROKEN* do not show up in this list (how do licenses become broken?), so if this applies to your situation you will need to use the Older versions method below. Older versions Older FlexSim versions do not have a graphical interface for removing fulfillments, but you can still do so using a FlexScript command. Find the fulfillment ID The first step is to find the fulfillment ID of the license you want to return. This is an identifier unique to the activation you're removing. View your licenses to find the fulfillment ID you wish to remove from your PC. Prepare your delete command Once you know your broken fulfillment ID, you're ready to build the command that will remove it from your computer. licenseactivation(LA_DELETE_FULFILLMENT_RECORD, "paste entire 'FID_...' fulfillmentID here"); Be sure to paste the complete fulfillment ID into the 2nd parameter. Depending on your software's licensed state, you may be able to run this command directly in a script window. If not, we'll work around that limitation by using an object's reset trigger. Execute the delete command There are two ways to manually delete your fulfillment: Run the command in a script window Use a 3D object's reset trigger Run in a Script window If your FlexSim installation is still licensed, you can open a Script window to run FlexScript commands: Run the command console. You will be prompted to confirm that you truly want to remove the fulfillment: Choose Yes to remove the fulfillment. Use a 3D object's reset trigger If your FlexSim software is not licensed the Script command console is not available. Instead, do the following: Create a new model. Drag any object into the 3D view. Create a reset trigger on that object. Enter the FlexScript command into the reset trigger. Press OK to save the script. Reset the model. Choose Yes to confirm that you truly want to remove the fulfillment. If you have any questions or problems, please search our Answers Community for possible solutions. There is a good chance someone else has already asked your question. Still not finding what you're looking for? Submit a new question and we'll check it out. If you're including any confidential information, such as license codes, be sure to mark your question as private! You can also contact your local FlexSim distributor for live phone, web, or email help.
View full article
Does your license server randomly stop serving your FlexSim seats? When you check the logs, do you see error messages like the following? 5:34:42 (flexsim) Trusted storage binding change detected! Vendor daemon is being shutdown. 5:34:42 (flexsim) EXITING DUE TO SIGNAL 65 Exit reason 42 5:34:47 (lmgrd) flexsim exited with status 65 (Trusted storage binding change detected.) 5:34:47 (lmgrd) Vendor daemon shutdown - trusted storage binding change detected. Hosting your license server on a VM Many organizations host their license servers on virtual machines and this is a perfectly fine and fully supported way to host your licenses. However, you should be aware that some common virtual machine workflows can disrupt your license server. For instance, you may encounter the errors above if you restored your VM's state to a live snapshot. A live snapshot takes a snapshot of memory as well as disk. Hyper-V is an example of a hypervisor that allows live snapshotting. If a virtual machine does a revert-to-live-snapshot operation, restoring the memory and disk to a previous state, it can interrupt the integrity of your server's trusted storage. To prevent any corruption of your Trusted Storage state, Trusted-Storage-based license servers poll Trusted Storage every 90 seconds to determine if a snapshot restore has occurred. Hence, within at least two minutes of a Trusted-Storage-based license server being reverted, it will shut down, with server log messages similar to the log block above. This shutdown helps preserve the integrity of your license server's local trusted storage. Restoring functionality As you can see at the bottom of the error message, the resultant state of your license server is that your vendor daemon is shut down. This means that your license server is no longer serving FlexSim seats. To restore full functionality, simply start (or restart) the service from Windows services: Or if you're hosting your licenses with lmadmin, start (or restart) the vendor daemon:
View full article
Hi everyone, I had a discussion with @Jordan Johnson recently and I also wanted to share with the distributors group some thoughts about the autosave feature: Comment #1: there is no autosave if your model is in a run state every 10 minutes When a user reads this checkbox, he thinks that FlexSim will "autosave a model backup every 10 minutes" exactly as it is written. But it does not. As explained in the user manual: "AutoSave will only save your model if it is reset and not running." (https://docs.flexsim.com/en/20.1/Reference/GeneralModelSettings/GlobalPreferences/#environment) Let's take an example: a user saves his model file at 10:00 am. The first autosave is scheduled at 10:10 am. The user starts building his model, then runs his model between 10:09 and 10:11. As at 10:10 am his model was running, there was actually no autosave. So the first autosave is postponed at 10:20 am. The user does some modifications in his model, then resets and runs his model between 10:19 and 10:21. As at 10:20 his model was running, there was actually no autosave. So the first autosave is postponed at 10:30 am. And so on... So after 1 hour of work, a user could actually have no autosave of his model. And I already have seen this with some users. If FlexSim crashes, then the user looses his work since he forgot to regularly save his model. So he looks for the autosave file, but there is none, even after 1 hour. You might answer me that users are supposed to save their model more regularly, but if they would do so then there would be no need to have an autosave feature. Idea: if the model is in a run state when the autosave is scheduled, the autosave should not be postponed in 10 minutes, but instead the autosave should be triggered at the next model reset. Comment #2: there is no autosave if you save your model at intervalls less than 10 minutes Let's take an example: a user saves his model file at 10:00 am. The first autosave is scheduled at 10:10 am. But the user saves his model at 10:09. So the first autosave is postponed at 10:19 am, there is no autosave at 10:10. Then the user saves his model at 10:18. So the first autosave is postponed at 10:28 am, there is no autosave at 10:19. And so on... So after 1 hour of work, a user will also have no autosave file if he saves regularly his model. I am not shocked by this behaviour, but again when a user reads that FlexSim will "autosave a model backup every 10 minutes" , he thinks that FlexSim does autosave a model backup every 10 minutes as written on the checkbox. If saving the model postpones the next autosave, then the label of this checkbox should be more precise. And there should also be at least a tooltip on the checkbox and one more sentence in the user manual to explain that the autosave is postponed everytime the user saves his model. I know that you are all experienced users and you save regularly your models. But I would be interested if you have already seen some of your users loosing their work, and then when looking for an autosave file there was none, or the autosave file was much older than 10 minutes. Don't hesitate to add comments to this post.
View full article
En este video aprenderán a representar el uso de un montacargas con un operario. Este video está basado en esta pregunta del Foro. Para más videos tutoriales pueden suscribirse al canal de YouTube de FlexSim Andina y acceder a nuestra lista de reproducción de Retos FlexSim.
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
Neste Tutorial iremos demonstrar como importar um Layout do AutoCad no FlexSim. Desenhos do AutoCAD e outras imagens podem ser usadas como planta baixa para a montagem do modelo de simulação no FlexSim, sendo facilmente importadas usando o Background Drawing Wizard. Isto facilita a construção do modelo de simulação fazendo com que o modelador possa posicionar os objetos de forma rápida e em escala. O Background Drawing Wizard pode ser acessado clicando em: Tools / Visual / Model Background , ou na Biblioteca de Objetos / Visual / Background arrastando o objeto para o plano. O assistente abre uma nova janela, e irá pergunta-lo se você quer importar um desenho CAD ou um arquivo de imagem. Assegure-se que "AutoCAD Drawing" está selecionado e então clique em "Next". A próxima tela irá pedir a você que especifique o caminho do arquivo CAD que você quer usar; busque o arquivo em seu computador e clique em "Open". Veja que você está usando um arquivo .dwg; arquivos .dxf e .dwg podem ser importados para o FlexSim. Clique em "Next" novamente para ir para a próxima tela. Nesta tela você poderá definir detalhes sobre o posicionamento do seu layout no plano de trabalho do FlexSim. Existem três colunas representando os eixos X, Y e Z e três linhas para cada um que correspondem a posição, rotação e tamanho ao longo de cada eixo. Configure a posição para cada eixo em "0" e você verá a posição original do desenho, localizado no canto esquerdo inferior, mostrando exatamente que está no centro do seu modelo. Clique em "Next" para seguir para a próxima tela. Nesta tela você pode customizar qual layers de seu desenho CAD estarão visíveis, e ainda alterar a cor de cada layer. Se você tiver algum recurso no desenho que não é necessário para o modelo de simulação, como por exemplo, uma parede ou uma porta, talvez possa ser uma boa idéia fazer com que estes layers fiquem invisíveis e então o espaço visual não se torne confuso. Clique em "Next" para ir para a tela final. Clique em Finish e pronto! Agora você já pode começar a montar seu modelo utilizando o Layout em AutoCad como planta baixa.
View full article
Neste Tutorial iremos demonstrar como criar uma apresentação do seu modelo no FlexSim, utilizando a ferramenta Flypath (Presentation Builder). Com esta ferramenta você poderá criar sua apresentação de forma rápida fazendo um filme de seu modelo. Nela você poderá definir vistas e os tempos entre as transições destas vistas no modelo. Apresentação a qual você poderá gravar em um vídeo de alta definição no próprio FlexSim, utilizando outra ferramenta chamada Video Recorder. Vamos lá! Assista o vídeo em nosso canal do YouTube e acompanhe as informações explicativas abaixo. Presentation Builder Após construir seu modelo acesse o Flypath para definir como o seu modelo se movimentará durante a apresentação, clicando em: Tools / Visual / Flypath Na janela Presentation Builder você irá criar um novo Flypath1 clicando em Então é só você selecionar a vista em seu modelo e clicar em , no centro da janela para definir uma vista, dentro do Flypath1 então movimente o cursor de tempo e selecione uma segunda vista, clicando novamente em . Este será o tempo em que a apresentação levará para chegar até a segunda vista definida por você. Você pode criar vários flypaths cada um com seu próprio conjunto de flypoints. Quando executado, a visualização 3D voará sequencialmente ou mover-se-á para cada flypoint no flypath. Por padrão, flypaths não estão associados com velocidade de simulação. Não se preocupe, o Presentation Builder vai definir para você todo o movimento entre as 2 vistas. Após concluir sua apresentação é só clicar em retornar para a primeira vista e rodar o Flypath , então você verá a apresentação levando em conta as vistas e o tempo definido no seu modelo em 3D. O Presentation Builder tem seu próprio conjunto de botões Iniciar e Parar. No entanto, ao usar o gravador de vídeo, você pode especificar um seu flypaths para ser executado durante a gravação de seu arquivo. Você também pode usar os botões e para caminhar entre as vistas, flypoints, definidas. Video Recorder Após construir sua apresentação utilizando o Flypath vamos gravar esta apresentação em vídeo! Para isso acesse: Tools / Visual / Video Recorder Na janela Video Recorder você irá configurar o seu vídeo para poder iniciar a gravação! Primeiro clicando em você cria um novo arquivo File Path de vídeo para ser exportado para seu computador. Lembramos que este procedimento pode ser feito para um conjunto de videos. Na seleção Codec, você pode escolher qual o codec que será usado para a gravação do seu vídeo, o mais comum é gravarmos em MPEG-4, (*.mp4). Selecione na sequencia a quantidade de frames por segundo que o seu vídeo será gravado, selecione por exemplo 30 para a opção FPS. Na etapa seguinte, Size, você poderá definir a resolução e o tamanho do seu vídeo Neste exemplo iremos utilizar a opção "use basic sequence" na qual iremos definir o Flypath1 criado como referencia para a gravação do vídeo. Logo é só definirmos o tempo para o início e fim do vídeo e sua velocidade no modelo 3D. Lembre-se que o tempo do Flypath tem que estar dentro do tamanho do vídeo, caso contrário o Flypath irá se repetir. Exemplo: Para um Flypath de 20 segundos e uma velocidade de Speed 4, teremos que gravar um vídeo de 5 segundos. Lembre-se de utilizar a Amostra "Sample" para selecionar no seu modelo 3D a vista a qual o vídeo iniciará a gravação em View, utilize a primeira vista definida no seu Flypath. Após concluir as configurações clique em Record, no canto esquerdo da janela Video Recorder. Pronto! Seu vídeo será gravado e poderá ser acessado em: Segue o modelo referente ao artigo: modelo-flypath-videorecorder.fsm Inscreva-se e acompanhe nosso canal de videos no YouTube FlexSim Brasil
View full article
This article describes an example of Reinforcement Learning being used to solve scheduling problems. See the model and python files in the attached zip file. SchedulingRL.zip Problem Description This model represents a generic sheet metal processing plant. There are four machines in series. Each job requires time on all four machines. Jobs come in batches of 10. A poor sequence of jobs will cause blocking between items, lowering throughput. If the time between batches is long, such as a shift or a day, you could use the optimizer to determine the best sequence. If the time between batches is short, however, the optimizer may not be feasible. For real sequencing problems, the time to find a good sequence can be anywhere from 5 minutes to an hour, or even longer. This makes it impractical for high-velocity situations. The attached model requests a decision every time the first machine in the series is available. The only action is an index for the Nth available job. So the decision can be interpreted as "which job should I do next?" Solution The general solution is to use reinforcement learning. However, this problem required customized python scripts: The model uses custom parameters for observations. This allows arbitrary values for observations. The model uses a custom observation space. The observations include a table of the required times at each station for the remaining jobs. They also include an array of the in-progress jobs and their predicted remaining times. By using a Dict space, the python scripts can combine all the observations into a single space. The model uses an Action Mask. An Action Mask is a binary array with one value per value of the action. This tells the RL algorithm about invalid options. The python scripts require the sb3-contrib package. Use pip install sb3-contrib to install it. Results After training for 500k time-steps, the agent learns to choose jobs moderately well. If you run the inference script, you can use the experimenter to compare a random policy to a trained agent:
View full article
FlexSim 2024 Update 1 Beta is now available. FlexSim 24.1.0 Release Notes To get the beta, log in to your account at https://account.flexsim.com, then go to the Downloads section, and click on More Versions. It will be at the top of the list. The More Versions button does not appear when logged in as a guest account. The beta is available only to licensed accounts and accounts that have a license shared with them. Learn more about downloading the best version of FlexSim for your license here. If you have bug reports or other feedback on the software, please email dev@flexsim.com or create a new idea in the Bug Report space or Development space.
View full article
Lembre-se que para o desenvolvimento desse passo a passo, foi utilizado a versão 2017. Update 1, caso você esteja modelando utilizando outra versão algumas alterações podem ser necessários. Nesse exemplo será construído um modelo que usa listas para relações básicas de roteamento de itens. Os itens serão enviados de três filas para um dos quatro processos.Uma lista de itens (item list) será utilizada para resolver esse problema. As filas irão empurrar os itens para a lista e os processos irão puxar os itens da lista e processa-los. De início será construído um modelo puxado simples,e depois um modelo puxado com restrições e priorizações. Passo 1. Montar Layout Para esse exemplo, crie um novo layout. A Figura 1 mostra quais objetos devem ser adicionados Observe que NÃO há ligação entre as filas e os processos. Figura 1- Layout exemplo 2 Passo 2. Configurar source Na janela de propriedades do source, em inter-arrivaltime coloque exponential (0 ,2.5,0). Figura 2- Inserir inter- arrival time 2.Na aba FLOW, em send to port abra a lista de opções e escolha a opção random port. Figura 3- Sent to port 3. Na aba trigger, adicione uma Oncreation trigger para configurar o tipo e a cor. OnCreation> Data > Set item type and color> duniform(1,3). Figura 4- Configurar tipo e cor Passo 3. Adicionar lists Para adicionar a lógica é preciso criar um item list. Em Toolbox> > Global list> Item list(Figura 5). Figura 5- Adicionar item list Ao clicar em Item list irá abrir janela de propriedades da lista (Figura 6), por agora apenas feche a aba. A sua lista deve estar nomeada como ItemList1. Figura 6- Janela de propriedades Itemlist **Não é necessário definir nenhuma das configurações agora. Apenas feche a janela de propriedades.** Passo 4. Configurar queue Para configurar a queue para empurrar os itens para a lista, clique sobre cada uma das filas> Aba Flow> Send to port> abra a lista de opções> Escolha use list> Push to item list. CONFIRA se o o nome da lista corresponde ao nome da lista que você criou. Figura 7- Push to item list **OBS: Faça o Passo 4 para TODAS as filas** Passo 5. Configurar Processos Para fazer com que os processos puxem da lista, configure cada input de processos para todos os 4 processos. Clique em um dos processos, na aba Flow vá na parte de input, marque a opção pull strategy. Na aba de escolha da estratégia(Pull Strategy) >Use list>Pull from item list. Deixe o campo QUERY em branco. E confira se o nome da lista escolhida é o mesmo da lista que você criou no Passo 3. Figura 8- Estratégia puxada **Obs: Faça o Passo 5 para todos os processors.** Faça um test rápido! Reset seu modelo e confira como estão as entradas e saídas da sua lista, para verificar se até aqui as coisas estão funcionando da maneira correta. Nas propriedades do ItemList1, vá na aba General e clique no botão a esquerda “ View Back Orders”. Figura 9- View Back Orders Sua lista deve estar parecida com a da Figura 10. Mudando apenas os nomes dos processos de acordo como os seus estão nomeados. Figura 10- Janela de pedidos pendentes A Figura 10 representa que os processos começaram a puxar da lista, mas como não há itens que foram empurados para a lista, eles estão aguardando para poderem puxar e se tornarem fulfilled(preenchidos). Execute o modelo (Run) e você perceberá os itens entrando nas filas e sendo empurrados para a lista (View entries-Figura 9) fazendo com que os pedidos pendentes sejam atendidos e então começam a ser processados. Quando um item é empurrado para a lista e existe pedidos pendentes o item será imediatamente puxado da lista. Dessa forma o pedido pendente irá se tornar Fulfilled e será removido da lista de pedidos Back Orders. Eventualmente, todos os processos irão puxar os itens e dessa forma a lista de pedidos pendentes se tornará vazia, já que todos estão em operação. Então a lista de entradas vai crescendo(Figura 11) até que um dos processos termine o processamento e requisite puxar um item da lista. Figura 11- Entradas na lista aguardando serem puxadas Quando os itens são empurrados para a lista, eles são adicionados no fim da lista. Assim se o sistema puxado não utilizar prioridades como parte da sua tomada de decisão, os itens irão ser puxados como FIFO( first-in-first-out), ou seja, seguindo a ordem de quem chegou primeiro sai primeiro. O mesmo acontece com os pedidos pendentes, a primeira máquina que fica disponível puxa o primeiro item que está na lista. Salve seu modelo e ele está pronto para ser executado. ex2.fsm Modelos experimentos Para testar diferentes configurações das operações puxadas faça os seguintes cenários. Cenário 1- Filtrar por tipo de item Considere que um dos processos (Processor 1) pode apenas processar o tipo de item 2. Para vincular essa lógica na simulaçao utilize um Query nesse processo. Clique sobre o processo que deseja restringuir a entrada ao tipo 2 de item, na janela de propriedades, vá em FLOW > Pull strategy > em Query digite a restrição WHERE Type == 2 (Figura 12). Figura 12- Adicionar query para tipo de item Salve o modelo como Exemplo2_cenario1. Reset seu modelo e execute. ex2cenario1.fsm Cenário 2- Puxar pelo LIFO Agora todos os processos puxam seguindo a ordem último a chegar primeiro a sair (LIFO) ao invés do padrão FIFO, o que significa que o item mais recentemente adicionado na lista deve ser o primeiro a ser puxado . Crie essa lógica na simulação, implementando um Query. Abra o arquivo do exemplo 2, e salve como exemplo2_cenario2. Para cada um dos 4 processos faça o seguinte: Clique no processo >vá em FLOW > Pull strategy > em Query no adicionar> ORDER BY> AGE (Figura 13). Figura 13- Lógica LIFO Repita o 1) para TODOS os processos. Salve o modelo e coloque para executar. ex2cenario2.fsm
View full article
Railworks 24.0.1 is now available (02 April 2024). This version of RailWorks is intended for use with FlexSim 2024. Railworks 2023.0 will become LTS, for any use cases with updated bug fixes use the latest 23.0 version available. If you are using RailWorks with FlexSim 2023 (LTS), please use RailWorks version 23.0.6 (LTS). If you are using RailWorks with FlexSim 2023 Update 2, please use RailWorks version 23.2.3. All versions can be found in the Downloads section of your FlexSim account on the 3rd party modules tab. Please do not hesitate to report any bugs, usability improvements and feature requests to dev@flexsimbrasil.com.br. Signal: New feature in railworks This new feature adds a 3D object called Signalized Rail, a track with signals that can control train traffic with precise speed changes, sight and safety distances for rail reservations and signal advances. You can configure signal aspects, sight distance and train safety distance with just this object.For more information read 3Dobjects. Importance of the Signal A signal in a railroad system is a way of controlling train traffic speeds, ensuring safety and maximizing the flow. There are different types of signals for different cases and countries, the most common being speed control signals on sections to prevent train collisions. These signals change their appearance in order to indicate a reduction in speed, and can have different aspects for different speed changes. This type of sign is the new railworks feature. About Railworks The FlexSim Brazil RailWorks module consists of premade custom objects, designed to represent a real environment for the Rail problem modeling, with less configuration. Our approach is to unite 3D modeling with the Process Flow functionality, allowing object configuration and visualization through the native 3D FlexSim solution, and the rail system events to be triggered by the Process Flow, using not only defaults FlexSim Process Flow activities, but also new ones developed by our team. Release Notes View the full release notes in the online documentation. RailWorks 24.0.1 (02 April 2024) Bug-Fixes All bug fixes in RailWorks 23.2.3 below. Features New object:Introducing signalized rails - tracks equipped with signs at their ends for improved traffic control and safety at critical network points. Learn more about signaled rails and practice using them on the 3D objects page. Feature:Take control of your rail network with the new rail signaling control feature. Configure aspect signals, customize their colors, set speed correspondences, and define safety or sighting distances for a more realistic train operation experience. Feature: New picklist options to set destination in MoveTrain and MoveWagon activities. RailWorks 23.2.3 (18 March 2024) Bug-Fixes All bug fixes in RailWorks 23.0.6 below. MoveWagon Label Control Improvements: Enhanced the user interface for the MoveWagon label control. OnPass Speed Alteration Fix: Compositions with wagons attached change speeds correctly and consistently. AssingTo labels on MoveWagon Fix: The creation of a new label works with individual wagons on MoveWagon. RailWorks 23.0.6 (18 March 2024) Bug-Fixes Consistent Parked Wagons Positioning: Wagons now position themselves alongside other wagons more consistently. Rail Reservation Logic Optimized: Improved logic for rail reservation to ensure smooth operation. Refined Rail Control Point Triggers: More precise behavior for RailControlPoint's onPass, onContinue, and onArrival triggers. Smoother Undo Functionality: Improved responsiveness and reliability of the undo function (Ctrl+Z). Automatic Brakes Optimized: Automatic brakes now stop on the correct rail for better train control. Wagon Creation Streamlined: Wagon creation now adapts its position automatically when placed on multiple rails. Copy & Paste Errors Resolved:Fixed exceptions that occurred during copy and paste operations. Train Creation Collisions Addressed: Inconsistent collisions during train creation have been eliminated. Enhanced Locomotive Interaction: Improved interaction between compartments and leading locomotives for more realistic behavior. Departure Rail Control Point Fix: Fixed an issue where moving a wagon wouldn't release the departure Rail Control Point. Automatic Braking Refined: Improved automatic braking for scenarios with low acceleration and high speeds. Multiple Rail Braking Enhanced: Resolved issues with braking zones spanning multiple rails. Limited Station Parking: Locomotives destined to a Station no longer allowed to enter while occupied. Better Composition Positioning on Curved Rails: Movement on CurvedRails is now smoother. Added Locomotive and Wagon icons to FlowItemBin. Modelling fixes: Preventive fixes to improve modelling experience. Performance Enhancements Faster Rail Connections: Optimized rail automatic connection for improved performance. MoveWagon Streamlined: Object selection offers more consistent behavior when detaching wagons from larger compositions. Streamlined ConnectPoint Creation: Made changes to ConnectPoint creation for better performance. Optimized Pathfinding: Enhanced path discovery algorithms to improve overall performance. Status Window Consolidation: Review and behavior correction of status bubble on flowitems and task executers.
View full article
In the attached model we use a Timetable and two MTBF/MTTR objects to define Schedule Loss, Availability Loss (breakdowns) and an element of Performance loss due to short stops (state Down). The processor sends 'bad' items to port 2 based on the send to percentage which account for QualityLosses. The processor's 'best' processing time per part (5 seconds) is stored as a label, while the processing time itself is a triangular distribution with the minumum as 5 seconds - so it also contributes to performance loss. When the Type of the item changes a setup time occurs which is the final contributor to performance loss. Two state profiles were added to the processor - one to track production time and another for availability. An object process flow on the processor detects production profile state changes (between On and off shift) and regular Flexsim state changes and determines the availability state that should prevail. A user command getOEEstat is used to access the values which it calculates on demand and stores in a label on the processor called statsMap. The syntax for this command is: getOEEstat(myMachine,"OEE") The list of stats: "ScheduleLoss","AvailabilityLoss","PerformanceLoss","QualityLoss","IdealProdTime","AvailabilityRatio", "QualityRatio","PerformanceRatio", "IdealProdTime", "RunTime", "OEE", "TEE". A group was used to indicate which objects have their OEE tracked, and a stats Collector reads the group members and adds rows at reset. Finally Performance Measures were added for the stats for processor 1. Processor_OEE_2.fsm 2023-08-22 Update: Added 'TEE' stat.
View full article
Changing the packing method for task executers can be tricky and also can vary widely between types. In this article we'll explore the default packing method for each TE and how to alter it to suit the model's needs. Attached is a model which demonstrates the default packing method and the comparison. The model is also the best place to get premade code for the ASRS, the crane, and the Robot: TEStackingNew.fsm Default Stacking on Task Executers There are two types of default stacking methods on the TE's. AGV's, operators, forklifts, ASRS, and basicTE's all use a simple up and down stacking method: The other TE's (elevator, robot, and crane) don't separate the boxes at all so they all look like they're on top of each other (this is because they're mostly meant to only carry one item at a time): Changing the Stacking Pattern: AGV, Operator, & BasicTE: For these objects, changing the stacking method is relatively simple. Add 5 labels to the object: numx, numy, xshift, yshift, and zshift Add an OnLoad trigger in the properties panel Set the trigger by going to Visual->Set Location Type in this code current.xshift+item.size.x*((item.rank-1)%current.numx) -current.yshift+item.size.y*(Math.floor(((item.rank-1)/current.numx)%current.numy) - (current.numy-1)/2) current.zshift+item.size.z*Math.floor((item.rank-1)/current.numx/current.numy) The only thing that differs between these 3 objects are the label values. The labels "numx" and "numy" sets the number of objects in the x direction and how many in the y direction. For example a 3x3 grid on the AGV would set "numx" be 3 and "numy" be 3 xshift yshift zshift AGV 1 .5 .5 Operator .75 .29 1.10 BasicTE 0 0 .85 Elevator, Robot, & Crane: These objects are very similar to the TE's above. You'll follow the same steps above, except on the On Load trigger, choose to just paste custom code in the box. They have slightly different code (due to the different direction/ways of stacking) that you can copy from the model above. However, you will still add the labels to the TE's. You can set them using labels like these: xshift yshift zshift Elevator .7 1 .095 Robot .34 .35 .2 Crane .2 .5 -.25 Forklift: This is the easiest object to change because it is already built into the TE. To change the stacking pattern just add an OnEntry trigger and select Transporter Stacking Method, then just change the values to be what you would like. ASRS: For this one, you can change the stacking method by editing the model tree. The steps to change it are simple but specific: Open the model tree for the object by right clicking and selecting Explore Tree Find the behaviour node beneath the ASRS Node Add an node underneath called "eventfunctions" Beneath the node you just created add a node called "OnPreDraw" Paste in that node the code below (you can edit this to alter the stacking method how you would like): inheritcode(); TaskExecuter current = c; Object followingObj = first(current); double numx = 1; double numy = 4; double xshift = .95; double yshift = 1.45; double zshift = .1; while(objectexists(followingObj)){ double x = xshift+followingObj.size.x*((followingObj.rank-1)%numx); double y = -yshift+yloc(node(">visual/drawsurrogate/Lift/Slide", current))+followingObj.size.y*(Math.floor(((followingObj.rank-1)/numx)%numy) - (numy-1)/2); double z = zshift+followingObj.size.z*Math.floor((followingObj.rank-1)/numx/numy); double xFactor = 0.5; double yFactor = 0.5; double zFactor = 0; setloc(followingObj, x, y, z, xFactor, yFactor, zFactor); followingObj = next(followingObj); } Some things to keep in mind: Each TE is completely customizable by the user so the offset I considered to look right may not look right to you, the good thing is it's very changeable!
View full article
A narrated video demonstration of the FlexSim Healthcare Tutorial described in the FlexSim 2020 User Manual has been released! Here is a link to the written documentation: https://docs.flexsim.com/en/20.0/Tutorials/FlexSimHC/OverviewFlexSimHC/ Here's a link to the video: https://vimeo.com/394012280
View full article
Top Contributors