
I cannot change the number of resources over simulation time in SimEvents (Version 23.2 R2023b)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi!
I had an old simulation model (Simevents Legacy Blocks) where the number of (Human) Resources (shop assistants) was easy to change over time. It emulates the different workers assigned to different work shifts all along the week.

Now I moved to Version 23.2 and I have tried to do something similar:

I have tried to use the "Change amount through control port" option but I've been returned the error message "Invalid connection from output port 1 of 'MATLAB Function1' to 'Input Port 1' of 'ShopMallCentre/Resource Pool1'. Ports are not compatible and cannot be connected to each other."
I have tried with a 1D Look-Up table and with a Matlab Function block to feed the amount of resources but I always get the same error message.
I have read about using Enable gates and the like, but I feel that there will be something more "Straight forward" and "easy to show" to my degree students.
Please, can anyone help?
Thank you very much,
Albert
댓글 수: 0
답변 (1개)
Laurent Royer
2025년 3월 11일
Hi Albert,
The Resource Pool block should receive an entity, and I'm guessing your MATLAB function "AssistantsCreation" is not generating an entity, hence the error. Also note that you can only increment the number of resources with the entity payload, not decrement it.
One way to generate this entity is with the Message Send block:

Hope this helps,
Laurent
댓글 수: 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!