Elvas Tower: Automatic control of locomotive by the Computer - Elvas Tower

Jump to content

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

Automatic control of locomotive by the Computer Rate Topic: -----

#1 User is offline   Rohit 

  • Conductor
  • Group: Status: Active Member
  • Posts: 281
  • Joined: 12-December 12
  • Gender:Male
  • Simulator:MSTS, Open Rails
  • Country:

Posted 08 November 2014 - 06:46 AM

Dear all,

Is it possible to operate the locomotive wuthout the user in a mode where the system itself control and operate the locimotive as per the time-table.

#2 User is offline   Matej Pacha 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 571
  • Joined: 08-December 10
  • Gender:Male
  • Location:Slovakia
  • Country:

Posted 08 November 2014 - 07:03 AM

Hi,
You can set up an activity or a timetable and switch the view to follow an AI train. That should do the same as you probably want.
However, I have some concepts on automatic cruise control (speed controller), but it's far from being released now.

How it helped.

Matej

#3 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 08 November 2014 - 07:52 AM

I am in a process of implementing Railworks-like engine scripting, which actually allows writing of an automatic speed control script, although I have not written such a script yet. Actually such a scripting already works on my computer, but I am waiting with starting the discussion about this API until the waves around 1.0 release are flattened. This scripting interface unifies the current TCS interface (replaces it) with the ability of overriding existing MSTS cabview controls input data, issuing any locomotive command currently available built-in in OpenRails, overriding controls (e.g. throttle) without modifying their positions (like a real-world on-board speed controlling does), and defining per-locomotive custom controls in a custom keymap. These custom controls would be (at a later time) exposed to the animation handling subroutines, so that custom animations could be hooked onto them. These mostly work already for me, but it is not a good time to come out with such proposals now. I just wanted to inform you, to avoid parallel efforts. :)

#4 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 09 November 2014 - 12:07 AM

I think he asks about activity/timetable debug style AI train control. Currently for this i just created a service on a siding without stops, and just a small path.

#5 User is offline   Rohit 

  • Conductor
  • Group: Status: Active Member
  • Posts: 281
  • Joined: 12-December 12
  • Gender:Male
  • Simulator:MSTS, Open Rails
  • Country:

Posted 09 November 2014 - 04:18 AM

What that i meant was that the possibility of switching the control of our train to the computer so that it operates as per the timetable without our intervention.............

#6 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,144
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 09 November 2014 - 12:20 PM

Doing that just makes it another AI train. Personally I fail to see any useful purpose in this.

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,012
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 09 November 2014 - 01:20 PM

It is useful to debug activities. As already mentioned some times here, a workaround is to create a testing activity where the player train is transformed into an AI train, and where a dummy player train with a short path is created.
It is also the first step towards switching player trains (I mean appointing different player trains in different moments during simulation).

#8 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,144
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 09 November 2014 - 01:39 PM

If it is a step towards selectable player trains while in an activity, I can see a use for it, as is the debug facility. Both worthy candidates post version 1.

#9 User is offline   roeter 

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

Posted 09 November 2014 - 02:59 PM

A few points here.
First of all, there is a significant difference between activities and timetable mode when it comes to possible switching of trains.
For timetables, all trains are equal, and no distinction is made between player and AI when processing the timetable details. Therefor, switching would be easier as all trains have all required info and details. The only limitation at this at the moment is that, as the actual run starts, the player train is an instance of the train class, while AI trains are instances of AITrain class which is a child of the train class. It is not possible to cast a parent to a child or vice versa so, at present, it is not possible to convert the player train to AI or convert an AI to player train. I'm looking into possible ways to overcome this but that will take some time, however the possibility to switch is important for timetable mode as certain actions (e.g. attach and detach) require the possibility to switch the player from one train to another.
For activities, things are much more complicated as specific items like station stops for the player train are not held in the train data but in the activity data. Switching between player and AI train would therefor require conversion of activity data to AI control data and vice versa - clearly much more complicated. Any triggers etc. defined in an activity can not be copied at all and would be lost.

A further complication is that the program does need a player train - it simply cannot live without it. So even if one day switching between trains would be possible, aborting the player train and just sit as passenger (camera 5) or as lineside observer (camera 8) will not be possible. I tried this, and the program just crashes left, right and centre - and that was without any HUD display, most of which are, ofcourse, directly linked to player train information and most certainly also would crash without an active player train.

Regards,
Rob Roeterdink

#10 User is offline   mauried 

  • Hostler
  • Group: Status: Active Member
  • Posts: 74
  • Joined: 01-October 13
  • Simulator:Open Rails
  • Country:

Posted 09 November 2014 - 06:39 PM

MSTS had a little documented feature called Introductory Train Ride mode where the Player Train
was driven by an AI Engineer.
ie it simply made the player train an AI train, but the train was still called the Player Train.
There are a lot of benefits in being able to do this in route debugging.
Firstly, it allows you to ride in the cab and watch whats going on.
You can watch the track monitor and see what the signals ahead are showing and
it allows fault finding where you dont have to sit at the computer for long periods of time waiting
until you get to a particular location in the route.
The feature in MSTS was enabled by changing 1 variable in the Activity script.
Whether this is possible in OR I dont know, but if it can easily be coded in , its a really useful feature to have.
The line in the Activity File which enables the feature is this one
Mode ( 2 ), which has to be changed to Mode ( 0 ) for Introductory Ride Mode.

  • 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