Bart wolker
Bart wolker

Reputation: 21

anylogic: How to view the simulation date and time

I would like to have a view of the simulation date and time in my view area. I tried to copy the method of the product and delivery example but it didn't work. I did the following:

The error that I'm getting is: "SimpleDateFormat cannot be resolved to a type".

Does it have to do something with my dependencies? Are dependencies needed?

Upvotes: 0

Views: 507

Answers (1)

Jaco-Ben Vosloo
Jaco-Ben Vosloo

Reputation: 3930

When you use classes not available by default they need to be imported into the current class.

You can do this in the imports section of the agent you are using the class

enter image description here

But not to worry, had you used code complete it would have been done for you. Simply go to the end of the of SimpleDateFormat code and press code complete (ctr+space on Windows, cmd+space on Mac) and viola, the import section will be updated for you

Upvotes: 1

Related Questions