In SimEvents, how can I block "plants" that are occupied so that the batch uses another plant?
조회 수: 6 (최근 30일)
이전 댓글 표시
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
채택된 답변
Abdolkarim Mohammadi
2020년 5월 19일
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
Abdolkarim Mohammadi
2020년 8월 25일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!