Oscar C13 avatar image
Oscar C13 asked Felix Möhlmann commented

Stop working at a specific time

Hi everyone
I have made a TimeTable for the operator to work from 8:00 to 17:00 Monday to Friday.
There is a machine that takes 1 h 30 min to process an item, so I want that, if it is 15:30 or later, the operator does not go to the machine, but does something else.
I can´t keep the operador from going to the machine.

Attach the model

FlexSim 21.2.2
calendario.fsm (42.0 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Marcello Rosadini avatar image
Marcello Rosadini answered Felix Möhlmann commented

Hi Oscar,

you could make the decision to call it or not based on the time of the day.

take a look at the class Datetime

for instance:


will get you the hour of the day in the simulation

· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Oscar C13 avatar image Oscar C13 commented ·
Thanks, but I have already observed that link and I still can´t get it.

If I put Model.datetime.hour<15 it does nothing

and if I put DateTime.hour<15 gives me an error.

0 Likes 0 ·
Marcello Rosadini avatar image Marcello Rosadini Oscar C13 commented ·

Hello Oscar,

I believe it is just a matter of improper syntax (it is case sensitive...)

In the section I sent, there are several examples showing the correct use:

  1. Model.dateTime.hour

This will return a double number and you can compare it to any other value you like.

0 Likes 0 ·
Oscar C13 avatar image Oscar C13 Marcello Rosadini commented ·

That is the first thing that I tried before asking the question. I don´t know if I am doing something else wrong.


Even if I put that, he keeps going to the processor after the 3 pm.

0 Likes 0 ·
1636963675128.png (13.1 KiB)
calendario.fsm (42.0 KiB)
Show more comments