en
Sign in

← Back to the API reference

Duty A duty

A duty from the Duties panel: a series of stops a train's agent runs. A script cannot change a duty, only hand it over.

What for: To let a train run a duty with startAgent, for instance at a time on the model clock.

clock.at("07:00") {
   trains.Shuttle.startAgent(duties.ShuttleService)
}

Properties

name → String

Its name.

The duty's name.

log duties.Shuttle.name