Using Entities to add resources to a Resource Pool in SimEvents

조회 수: 6 (최근 30일)
Control Zed
Control Zed 2020년 2월 29일
댓글: Abdolkarim Mohammadi 2020년 12월 3일
Is there any way to use an Entity attribute to add resources to a Resource Pool. For example if I define a Cargo Entity with a Fuel attribute, when the Cargo entity is generated it would add the amount of Fuel defined by its Fuel attribute to the resource pool. In such a model a separate Entity, e.g., a Car entity would be the entity acquiring the resource.

답변 (1개)

Abdolkarim Mohammadi
Abdolkarim Mohammadi 2020년 5월 28일
This can be done via a Simulink function block. You should also set some of the properties of the resource pool. Find the attached model.
  댓글 수: 2
ivan mcgregor
ivan mcgregor 2020년 12월 3일
hi. this can be used for increase resource amount, but how about decrease amount via signal port? thanks
Abdolkarim Mohammadi
Abdolkarim Mohammadi 2020년 12월 3일
You cannot decrement resources via input port of the Resource Pool. You can only pass an entity to consume resource via Resource Acquirer and NOT passing it through Entity Server.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by