I cannot change the number of resources over simulation time in SimEvents (Version 23.2 R2023b)

1 view (last 30 days)
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

Answers (1)

Laurent Royer
Laurent Royer on 11 Mar 2025
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

Categories

Find more on Discrete-Event Simulation in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!