Use the Selected Resources table of the Resource Acquirer block to receive the resource amount definition from the block dialog box or an entity attribute. Using attributes as the source for the resource requires synchronicity between these blocks:
Entity Generator block with the attribute definition that Resource Acquirer wants to supply the source amount
Resource Pool block that defines the resource
Resource Acquirer block the acquires the resource
This example shows this synchronicity.
Open a new model and add Resource Pool, Entity Generator, and Resource Acquirer blocks. For the Resource Pool block:
Set Resource name to
Set Resource amount to
In the Statistics tab, select Amount in use, #u.
In the Entity Generator block dialog box, click the Entity type tab and in the Define attributes table:
Enter the attribute name,
to indicate that the attribute defines the amount of the resource.
Set the value to
In the Resource Acquirer block dialog box, click the
Entity type tab and under Available Resources, select
water and move it to the Selected
In the Selected Resources table,
For Amount Source, select
For Amount, enter
match the attribute name defined in the Entity Generator block.
To complete the model, add the following blocks and connect them as shown in the figure:
Entity Terminator (select the Statistics tab Number of entities arrived, #a check box)
Two Scope blocks
Simulate the model and observe the amount of resources in use (Scope).