Elvas Tower: AI Creeping (Timetable mode) - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

AI Creeping (Timetable mode) from x2410 Rate Topic: -----

#11 User is offline   JohnnyS 

  • Conductor
  • Group: Status: Active Member
  • Posts: 287
  • Joined: 05-May 11
  • Gender:Male
  • Simulator:OR/MSTS
  • Country:

Posted 16 September 2014 - 12:40 PM

Thanks all for info.

Quote

In order to find which condition is the cause of this problem, we probably need a debug HUD that will tell us what is the state of the subsystems of the train.
I will start to write this HUD page.

OK, I'll hold off on any further screenshots/analysis till this is accomplished

Quote

Pantograph was always up in my case.

Same here.

Cheers,
John.

#12 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 16 September 2014 - 01:01 PM

@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

#13 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 19 September 2014 - 02:06 PM

Did a little research and found that problem is caused because the logic for the circuitbreaker tests power authorization from "Train.LeadLocomotive" - but AI trains do not have a LeadLocomotive (the LeadLocomotive for a player train is the first driveable engine in the consist - this has no meaning for AI trains).

Release 2501 has a temporary solution to this problem, it bypasses the circuitbreaker logic for AI trains and always sets circuitbreaker to closed.
This will at least provide a working situation until the experts can come up with a more permanent solution.

Regards,
Rob Roeterdink

#14 User is offline   JohnnyS 

  • Conductor
  • Group: Status: Active Member
  • Posts: 287
  • Joined: 05-May 11
  • Gender:Male
  • Simulator:OR/MSTS
  • Country:

Posted 20 September 2014 - 12:20 AM

Hi Rob,

Thanks very much.

Cheers,
John.

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users