0

I have an agent Container, which has a parameter departure_date. I want to generate random future dates for this parameter. The date should be between current date and next 30 days. How can I achieve this?

Thank you in advance.

1 Answers1

0

It is not clear whether your parameter is of type Date or double. I'll provide you with a solution for each case.

  • Date

departure_date = addToDate(date(), DAY, random()*30);

  • Double - assuming your model time unit is DAYS

departure_date = time() + random()*30

Emile Zankoul
  • 2,161
  • 2
  • 6
  • 18