@Serena :
looking through the code I found this bit in circuitbreaker.cs :
public override void Update(float elapsedSeconds)
{
if (TCSCloseAuthorization() && CurrentPantographState() == PantographState.Up)
{
if (!ClosingTimer.Started)
ClosingTimer.Start();
SetCurrentState(ClosingTimer.Triggered ? CircuitBreakerState.Closed : CircuitBreakerState.Open);
}
else
{
if (ClosingTimer.Started)
ClosingTimer.Stop();
SetCurrentState(CircuitBreakerState.Open);
}
}
I'm not sure what happens here, but there could be problems with this code in pre-update mode (i.e. for AI trains starting before the start of the activity or timetable), for in pre-update there is no clock, so the ClosingTimer would not run.
Could it be this leaves all AI trains which started during pre-update without the circuitbreaker closing properly?
As for pantogrpahs : when AI trains become active, "PantographUp" events is send, below is part of CreateAITrain (in AI.cs) :
TrainCar car = RollingStock.Load(Simulator, wagonFilePath);
car.Flipped = wagon.Flip;
train.Cars.Add(car);
car.Train = train;
car.SignalEvent(PowerSupplyEvent.RaisePantograph, 1);
train.Length += car.LengthM;
All AI's always runs with pantographs up.
Regards,
Rob Roeterdink