Is it possible to divide a resource from a resource pool into different percentages?

1 vue (au cours des 30 derniers jours)
Prashant
Prashant le 25 Nov 2024
Commenté : Prashant le 26 Nov 2024
Suppose there is a resource pool "trucks" which transports different materials to another location. While transporting, I want to fill a truck with 20% a, 30% b and 50 % c. The truck will transport the materials, get empty and then become available again.

Réponses (1)

Pramil
Pramil le 26 Nov 2024
Modifié(e) : Pramil le 26 Nov 2024
Hello Prashant,
Since your resource is the "trucks", you can define an "Entity Generator" block that mimics the loading behaviour for the "truck".
Here is how you can achieve this:
  • Add an "Resource Pool" block namely "truck" along with an "Entity Generator" block and open it's dialog box.
  • Set the "Generation method" to "Time-based" and set a "Period", time required to load the "truck".
  • Navigate to "Entity type" and create attributes for each material "a","b" and "c" with initial value set to "0". Add an additional attribute say "plate" to identify different "trucks".
  • Navigate to "Event actions", under "Generation action" and add the following code:
persistent number_plate
if isempty(number_plate)
number_plate = 1;
end
entity.Plate = number_plate;
entity.a = 20; % modify the quatity as per requirement ...
entity.b = 30; % as well as you can add any logic or create an array for different timestep ...
entity.c = 50; % where index could be number_plate having different composition of materials.
number_plate = number_plate + 1;
  • Add other blocks like "Resource Acquirer", "Entity Server" etc as per your modelling requirements.
  • At last unload the "truck" using an "Entity Terminator" block.
I have attached an example model that I have created for your reference.

Catégories

En savoir plus sur Discrete-Event Simulation dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by