Regulator(updateFrequency)

Not all components of an AI system need to be updated in each simulation step. This class can be used to control the update process by defining how many updates should be executed per second.

new Regulator(updateFrequency)

Constructs a new regulator.

Parameters:
Name Type Default Description
updateFrequency Number 0

The amount of updates per second.

Author:

Members

updateFrequency :Number

The amount of updates per second.

Default Value:
  • 0

Methods

ready() → {Boolean}

Returns true if it is time to allow the next update.

Returns:
Boolean -

Whether an update is allowed or not.