- Use the "Resource Acquirer" block to acquire the resource for the entities.
- Before the entities reach the Composite Entity Creator block, use the "Set Attribute" block to remove or modify the resource attribute from the entities.
- Combine the entities using the Composite Entity Creator block.
- After the composite entity is created, use the Resource allocation blocks to reassign the resources to the composite entity.
Can entities pass through the Composite Entity Creator block with resources?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to combine entities from different paths and they are drawn from a finite pool, defined as a resource. However, the Composite Entity Creator block will not accept entities with resources?
How do I get around this, considering that I want the resources to be in use until some time after the Composite Entity Creator block?
0 commentaires
Réponses (1)
Hari
le 4 Fév 2024
Hi Denesh Reddy,
I understand that you are trying to combine entities from different paths using the Composite Entity Creator block and these entities are associated with resources. And you are facing an issue because the block does not accept entities with resources.
Assuming that you are using SimEvents for discrete-event simulation, one possible solution is to separate the resource attribute from the entities before they enter the Composite Entity Creator block. You can then reassign the resources to the composite entity after it has been created. Here's a example way to do that:
This approach ensures that the entities can pass through the Composite Entity Creator block without carrying an explicit resource attribute that the block cannot handle. The resources are still kept in use and reassigned to the composite entity later in the simulation.
Refer to the documentation of SimEvents for a comprehensive understanding of the discrete-event simulation environment. https://www.mathworks.com/help/simevents/
For details on how to manipulate entity attributes, you can look into the Set Attribute block documentation:
To understand how resources are managed within SimEvents, refer the documentation for
Resource Acquirer - https://www.mathworks.com/help/simevents/ref/resourceacquirer.html
Hope this helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Discrete-Event Simulation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!