- 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?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Hari
2024년 9월 2일
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
참고 항목
카테고리
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!