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

1 visualización (últimos 30 días)
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.

Respuestas (1)

Pramil
Pramil el 26 de Nov. de 2024
Editada: Pramil el 26 de Nov. de 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.

Categorías

Más información sobre Discrete-Event Simulation en Help Center y File Exchange.

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by