0

I am using "Time-Based Entity Generator" and I need to control the entities generation. For example, if Simulation Clock < 100 stop generation and else set interarrival time = 1.

I tried this:

if SimClk < 100

    IntARR = inf;
else
    IntARR = 1;
end

It didn't work as when the interarrival time set to be Inf, It stopped generation and cannot return back.

Any help ?!

Ocean Blue
  • 33
  • 4
  • 7

1 Answers1

0

In your example you could use the following Matlab Action script :

persistent once;
if isempty(once)
    dt=100;
    once=1;
else
    dt=1;
end

Also uncheck the option "Generate entity at simulation start".

titus
  • 452
  • 4
  • 17