AccelerationSegment

class AccelerationSegment(val startId: Int, val endId: Int, var fixedSpeed: Float) : TrackSegment(source)

Represents a segment of acceleration on a track.

This class implements the SegmentFunction interface and provides a method to calculate the speed of a train segment based on the acceleration and various factors such as weather, maintenance, and train weight.

Parameters

fixedSpeed

The speed value for the segment.

Constructors

Link copied to clipboard
constructor(startId: Int, endId: Int)
constructor(startId: Int, endId: Int, fixedSpeed: Float)

Properties

Link copied to clipboard
val endId: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val type: SegmentTypes

Functions

Link copied to clipboard
open override fun applyForces(train: Train, deltaTime: Float)
Link copied to clipboard
open override fun getSaveData(): Map<String, String>
Link copied to clipboard
open override fun setSaveData(data: Map<String, String>)