In SimEvents, how can I block "plants" that are occupied so that the batch uses another plant?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Samir Acchaoui
el 6 de Mayo de 2020
Comentada: Abdolkarim Mohammadi
el 25 de Ag. de 2020
Hello, everyone,
I am currently in the process of modeling a production line with SimEvents. Unfortunately I can't get any further and need help urgently.
There are 3 stations and each station has several facilities. That means I can run several batches at the same time. How can I set that a new batch should start a free plant?
I also try to find out how I can define the states for the individual plants in SimEvents.
Example:
Plant 1 has the following states: Water supply, Heat, Rest and then Ready for discharge.
Do you have an idea?
0 comentarios
Respuesta aceptada
Abdolkarim Mohammadi
el 19 de Mayo de 2020
The best option here is the entity output switch block. Each plant is connected to a port of this block. There are several options available for selecting the plant. If you want new entities to be directed to an idle plant, you can choose the "First port that is not blocked" option. You can also create set and get functions to query the status of the plants and use a MATLAB function block to randomly choose from idle plants.
2 comentarios
Abdolkarim Mohammadi
el 25 de Ag. de 2020
There is no such set and get function blocks. They are normal Simulink functions coupled together, where the output of the Set function is connected to the input of Get function. You set the value of a variable with Set function and it is stored in the output port of this block. When you need this value, you get it via Get function. For example, in your model of plants, when a consumer order leaves plant, you set the status of this plant using the following code as an Exit event action:
SetPlantStatus (1);
And when the next order arrives, you use the following code to share the notice that it has been occupied:
PlantStatus = GetPlantStatus ();
However, as I mentioned in my answer, it is better for you to use the entity output switch block.
Más respuestas (0)
Ver también
Categorías
Más información sobre Discrete-Event Simulation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!