Looky1173 / launchpad-bugs-migration

0 stars 0 forks source link

[BUG n°1213165] Problem with AI train in the way #259

Closed Looky1173 closed 1 year ago

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/bugs/1213165

Property Value
Reported by David Robinson (h5djr)
Date reported Fri, 16 Aug 2013 16:19:41 GMT

I am using the Allegra Add-On to the Glacier Express package from Simtrain.ch. I have tried it in x 1705 and v09 and the result is the same. I have also tried it in MSTS and it works as it should but not in Open Rails. My train is waiting in Davos Platz station ready to leave on the single track line to Filisur. Another (AI) train arrives at another platford, stop for passengers to get off and then moves forward to park in a siding. To get to the siding it has to move across one of the cross overs my train has to use to get to it's main single track line to Filisur, but part way across it just stops. My train is given to OK to proceed and a green signal, but if I move forward i go over the same cross over an into the side of the other train.

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/1

Property Value
Posted by David Robinson (h5djr)
Date posted Fri, 16 Aug 2013 16:19:41 GMT
Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/2

Property Value
Posted by r.roeterdink (r-roeterdink)
Date posted Mon, 26 Aug 2013 08:46:14 GMT

Let's get this one rolling. Would it be possible to provide the following screen-shots :

1) Similar as the one above, but with traffic reduced to just the AI train which sits in the player's train path. As it is, there are three AI trains stopped, the train in question could be either of them. I need to know exactly which train it is if I need to get any more info from the system. If you could take the screenshot so it would show the AI train from the front that would be even more usefull. Please show the dispatcher info.

2) A screenshot of the path editor window of MSTS Activity Editor showing the path of the AI train at this location - please zoom out so all individual switches etc. are clearly visible. Also select paltform and siding markers but deselect platform and siding names.

Some info : from the dispatcher window shown in the screenshot above, I can see that three AI trains are stopped in a station, the fourth is still moving. For two of these AI trains, that station stop is the last item in their path, the third still has some way to go. None of the AI train's paths cross the path of the player train, there is no common section on any of these paths. This is what I can derive from that :

The screenshot of the path should make clear what the actual situation is.

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/3

Property Value
Posted by David Robinson (h5djr)
Date posted Mon, 26 Aug 2013 10:49:26 GMT

Hello Rob

Thanks for your email. Attached are the screenshots that I think show what is happening. The AI train 8P is the one that stops across the points that the Player train needs to cross to join the main line to Filisur. In MSTS the 8P train does not stop across these points but continues into a siding out of the way and the Player train can join the main line.

Some good news - I ran another train in the Glacier Express package yesterday. It was a 2:00hr journey from St Moritz to Chur over the Albula Pass. The route is mostly single track with passing loops at stations and the Player train used a number of these loops to pass other stationary trains and also waiting in some loops for AI trains to pass and all the signals and points worked just as the should.

If you need anything else just let me know. I also have Team View remote control software on my PC so if you did want to connect and run anything on my PC to see what happens I would quite happy with that.

Kind regards

Dave

-----Original Message----- From:

Let's get this one rolling. Would it be possible to provide the following screen-shots :

1) Similar as the one above, but with traffic reduced to just the AI train which sits in the player's train path. As it is, there are three AI trains stopped, the train in question could be either of them. I need to know exactly which train it is if I need to get any more info from the system. If you could take the screenshot so it would show the AI train from the front that would be even more usefull. Please show the dispatcher info.

2) A screenshot of the path editor window of MSTS Activity Editor showing the path of the AI train at this location - please zoom out so all individual switches etc. are clearly visible. Also select paltform and siding markers but deselect platform and siding names.

Some info : from the dispatcher window shown in the screenshot above, I can see that three AI trains are stopped in a station, the fourth is still moving. For two of these AI trains, that station stop is the last item in their path, the third still has some way to go. None of the AI train's paths cross the path of the player train, there is no common section on any of these paths. This is what I can derive from that :

The screenshot of the path should make clear what the actual situation is.

-- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1213165

Title: Problem with AI train in the way

Status in Open Rails Tracker: New

Bug description: I am using the Allegra Add-On to the Glacier Express package from Simtrain.ch. I have tried it in x 1705 and v09 and the result is the same. I have also tried it in MSTS and it works as it should but not in Open Rails. My train is waiting in Davos Platz station ready to leave on the single track line to Filisur. Another (AI) train arrives at another platford, stop for passengers to get off and then moves forward to park in a siding. To get to the siding it has to move across one of the cross overs my train has to use to get to it's main single track line to Filisur, but part way across it just stops. My train is given to OK to proceed and a green signal, but if I move forward i go over the same cross over an into the side of the other train.

To manage notifications about this bug go to: https://bugs.launchpad.net/or/+bug/1213165/+subscriptions

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/4

Property Value
Posted by r.roeterdink (r-roeterdink)
Date posted Tue, 27 Aug 2013 17:07:40 GMT

Well, each screenshot only adds to the confusion here. The position where the trains are and the information in the Dispatcher Info simply do not match at all. It almost seems as if the train is just completely in the wrong position. But lets try to get some more info out of the system. Attached is a special test version of run_activity.exe. To run this, backup the existing version and replace it with this test-version. This contains two test facilities. First, it contains a trial version for the Dispatcher Control Window. This shows the track occupation and reservation based on the actual TrackCircuitSection database, this is the data which controls the signalling and AI train control. Could you please take a screenshot from the Dispatcher Control Window, at the moment the passenger train is ready to depart and the AI blocks the switch? Use CTRL-9 to open the Dispatcher Window. Please set the scale in such a way that the window shows both trains (player train = train 0, AI = train 3), and also the end of the siding where the AI is supposed to go. Further, this version outputs a series of test data files. These is both static data - build-up of signalling and trackcircuitsection database, as well as the train routes. It also dumps dynamic data - all actions taken by trains, on a high level for all trains but on a very detailed level for one selected train - in this case the selected train is train 3, the AI train. All output is send to directory C:\temp, so please ensure this directory exists. Also, if you have to run this version more than once, then please remove all files from C:\temp before restarting. Not all files are cleared when the program starts. If you then can please send me the screenshot plus all files from C:\temp, I can have a further look at what is happening. Thanks.

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/5

Property Value
Posted by David Robinson (h5djr)
Date posted Tue, 27 Aug 2013 18:19:17 GMT

Hello Rob

I assume by run_activity.exe you means RunActivity.exe in the Open Rails\Program directory as I don't seem to have a run_activity.exe anywhere on my PC. Also you a special version of that file is attached for me to run but there was no attachment to the email.

David

-----Original Message----- From:

Well, each screenshot only adds to the confusion here. The position where the trains are and the information in the Dispatcher Info simply do not match at all. It almost seems as if the train is just completely in the wrong position. But lets try to get some more info out of the system. Attached is a special test version of run_activity.exe. To run this, backup the existing version and replace it with this test-version. This contains two test facilities. First, it contains a trial version for the Dispatcher Control Window. This shows the track occupation and reservation based on the actual TrackCircuitSection database, this is the data which controls the signalling and AI train control. Could you please take a screenshot from the Dispatcher Control Window, at the moment the passenger train is ready to depart and the AI blocks the switch? Use CTRL-9 to open the Dispatcher Window. Please set the scale in such a way that the window shows both trains (player train = train 0, AI = train 3), and also the end of the siding where the AI is supposed to go. Further, this version outputs a series of test data files. These is both static data - build-up of signalling and trackcircuitsection database, as well as the train routes. It also dumps dynamic data - all actions taken by trains, on a high level for all trains but on a very detailed level for one selected train - in this case the selected train is train 3, the AI train. All output is send to directory C:\temp, so please ensure this directory exists. Also, if you have to run this version more than once, then please remove all files from C:\temp before restarting. Not all files are cleared when the program starts. If you then can please send me the screenshot plus all files from C:\temp, I can have a further look at what is happening. Thanks.

-- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1213165

Title: Problem with AI train in the way

Status in Open Rails Tracker: New

Bug description: I am using the Allegra Add-On to the Glacier Express package from Simtrain.ch. I have tried it in x 1705 and v09 and the result is the same. I have also tried it in MSTS and it works as it should but not in Open Rails. My train is waiting in Davos Platz station ready to leave on the single track line to Filisur. Another (AI) train arrives at another platford, stop for passengers to get off and then moves forward to park in a siding. To get to the siding it has to move across one of the cross overs my train has to use to get to it's main single track line to Filisur, but part way across it just stops. My train is given to OK to proceed and a green signal, but if I move forward i go over the same cross over an into the side of the other train.

To manage notifications about this bug go to: https://bugs.launchpad.net/or/+bug/1213165/+subscriptions

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/6

Property Value
Posted by r.roeterdink (r-roeterdink)
Date posted Tue, 27 Aug 2013 18:28:55 GMT

Ooops - sorry about that. Here is the RunActivity.exe (ehh, yes, that's what I meant ...)

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/7

Property Value
Posted by David Robinson (h5djr)
Date posted Tue, 27 Aug 2013 19:20:22 GMT

Hi

I have now run the RunActivity.exe file. Ataached are the two screen shots as Word files. I will send the other files in another email as the one I send with all the files in was too large are was blocked.

Regards

David

-----Original Message----- From:

Ooops - sorry about that. Here is the RunActivity.exe (ehh, yes, that's what I meant ...)

** Attachment added: "RunActivity.zip" https://bugs.launchpad.net/or/+bug/1213165/+attachment/3790476/+files/RunActivity.zip

-- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1213165

Title: Problem with AI train in the way

Status in Open Rails Tracker: New

Bug description: I am using the Allegra Add-On to the Glacier Express package from Simtrain.ch. I have tried it in x 1705 and v09 and the result is the same. I have also tried it in MSTS and it works as it should but not in Open Rails. My train is waiting in Davos Platz station ready to leave on the single track line to Filisur. Another (AI) train arrives at another platford, stop for passengers to get off and then moves forward to park in a siding. To get to the siding it has to move across one of the cross overs my train has to use to get to it's main single track line to Filisur, but part way across it just stops. My train is given to OK to proceed and a green signal, but if I move forward i go over the same cross over an into the side of the other train.

To manage notifications about this bug go to: https://bugs.launchpad.net/or/+bug/1213165/+subscriptions

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/8

Property Value
Posted by David Robinson (h5djr)
Date posted Tue, 27 Aug 2013 19:28:30 GMT

Here are the second batch of files - zipped up with WinRAR

David

-----Original Message----- From:

Ooops - sorry about that. Here is the RunActivity.exe (ehh, yes, that's what I meant ...)

** Attachment added: "RunActivity.zip" https://bugs.launchpad.net/or/+bug/1213165/+attachment/3790476/+files/RunActivity.zip

-- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1213165

Title: Problem with AI train in the way

Status in Open Rails Tracker: New

Bug description: I am using the Allegra Add-On to the Glacier Express package from Simtrain.ch. I have tried it in x 1705 and v09 and the result is the same. I have also tried it in MSTS and it works as it should but not in Open Rails. My train is waiting in Davos Platz station ready to leave on the single track line to Filisur. Another (AI) train arrives at another platford, stop for passengers to get off and then moves forward to park in a siding. To get to the siding it has to move across one of the cross overs my train has to use to get to it's main single track line to Filisur, but part way across it just stops. My train is given to OK to proceed and a green signal, but if I move forward i go over the same cross over an into the side of the other train.

To manage notifications about this bug go to: https://bugs.launchpad.net/or/+bug/1213165/+subscriptions

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/9

Property Value
Posted by r.roeterdink (r-roeterdink)
Date posted Wed, 28 Aug 2013 11:02:35 GMT

Thanks - now it's beginning to make some sense. The AI train has a reverse point in the sidings and, at the moment of the screenshots, has actually reversed - so it is heading away from the crossing, and that is why there is no overlap between the AI path and the player path. But the train is indeed in the wrong location. I will try to explain.

So, this is what is defined for the AI train. It stops at the station, then runs to the siding where it reverses, heads back to the station and has another station stop.

This is how it works in MSTS. The train stops at the station, runs to the siding and will run up to the point where the front of the train passes the reversal point. At that moment, the rear of the train has cleared the crossing, and the route is released for the player train. The AI train waits in the siding until the player train has cleared the crossing, and then reverses into the station for the second stop.

This is how it works in OR - and how it should work. The train stops at the station, and then runs to the siding. Unlike in MSTS, in OR it is not necesarry for the train to run as far as the actual reversal point. Based on the actual 'diverging' point (where incoming and outgoing routes 'split'), the actual reversal point and any signals inbetween and beyond the reversal point, a fairly complex algorithm is used to determine to actual point where the train will stop and reverse. In this situation, as there are no signals involved, the train will reverse just clear of the 'diverging' point. Now, bad luck has crept in here, for this reversal point puts the front of the train just short of the first switch of the crossing with the player train, but still within the overlap for this switch. But when the AI train reverses, track occupation etc. is reset and in this process, the overlap is not taken into account. So the switch is not occupied by the AI train, and the system clears the route for the player train. This is not quite correct - more on that later. It is not the main cause of the problem, though. The main problem is what happens next. The train has reversed, is still stopped, and the system now checks if it is allready in the next station. And here is where things went wrong. A very small error (>= instead of <=) caused the system to assume the train is in the station, and activated the station stop - but is in, in fact, still 300m short of the station. Even when the station stop time has expired, the train does not depart as the exit signal for the station is at danger - a train is not allowed to depart from a station if the exit signal is at danger. So the train remains stopped. I have corrected this error, so the train should now reverse and head back into the station, clearing the path for the player train. So please try the attached version. I still have left the debug output switched on just in case it still not runs as expected.

As for the overlap protection - that is quite complicated, and I will have to think of a proper way of dealing with that. It is likely to be a rather extensive change of code and may take quite a while before this is done. With the station stop in the correct location, it should no longer affect this activity, though. By the way, this problem with the station stop might also be the cause of the other activity to fail, so it's worth while checking that with the attached patch version. If that problem still remains, than please send me a screenshot of the dispatcher window for that situation so I can prepare a debug version for that run.

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/10

Property Value
Posted by David Robinson (h5djr)
Date posted Wed, 28 Aug 2013 17:19:23 GMT

Hi Rob

Thanks very much for the amended version. It works just as it should. The AI train arrives in the platform. It then moves forward over the switch and then reverses back into a different platform ready for it's return journey, clearing the switch for the player train. The signal gives the player train the OK to leave and it moves forward, crosses several tracks on to the main single track route and leaves for Filisur. I have run it all the way to Filisur and it waits in a two loops for other AI trains coming in the opposite direction. As soon as these have entered the loop the signals change and the player trains is free to leave.

It's amazing the difference a small change to the program can make.

Thanks again. I will now try the new versaion with some of the other routes and see what happens with them.

Regards

David

-----Original Message----- From:

Thanks - now it's beginning to make some sense. The AI train has a reverse point in the sidings and, at the moment of the screenshots, has actually reversed - so it is heading away from the crossing, and that is why there is no overlap between the AI path and the player path. But the train is indeed in the wrong location. I will try to explain.

So, this is what is defined for the AI train. It stops at the station, then runs to the siding where it reverses, heads back to the station and has another station stop.

This is how it works in MSTS. The train stops at the station, runs to the siding and will run up to the point where the front of the train passes the reversal point. At that moment, the rear of the train has cleared the crossing, and the route is released for the player train. The AI train waits in the siding until the player train has cleared the crossing, and then reverses into the station for the second stop.

This is how it works in OR - and how it should work. The train stops at the station, and then runs to the siding. Unlike in MSTS, in OR it is not necesarry for the train to run as far as the actual reversal point. Based on the actual 'diverging' point (where incoming and outgoing routes 'split'), the actual reversal point and any signals inbetween and beyond the reversal point, a fairly complex algorithm is used to determine to actual point where the train will stop and reverse. In this situation, as there are no signals involved, the train will reverse just clear of the 'diverging' point. Now, bad luck has crept in here, for this reversal point puts the front of the train just short of the first switch of the crossing with the player train, but still within the overlap for this switch. But when the AI train reverses, track occupation etc. is reset and in this process, the overlap is not taken into account. So the switch is not occupied by the AI train, and the system clears the route for the player train. This is not quite correct - more on that later. It is not the main cause of the problem, though. The main problem is what happens next. The train has reversed, is still stopped, and the system now checks if it is allready in the next station. And here is where things went wrong. A very small error (>= instead of <=) caused the system to assume the train is in the station, and activated the station stop - but is in, in fact, still 300m short of the station. Even when the station stop time has expired, the train does not depart as the exit signal for the station is at danger - a train is not allowed to depart from a station if the exit signal is at danger. So the train remains stopped. I have corrected this error, so the train should now reverse and head back into the station, clearing the path for the player train. So please try the attached version. I still have left the debug output switched on just in case it still not runs as expected.

As for the overlap protection - that is quite complicated, and I will have to think of a proper way of dealing with that. It is likely to be a rather extensive change of code and may take quite a while before this is done. With the station stop in the correct location, it should no longer affect this activity, though. By the way, this problem with the station stop might also be the cause of the other activity to fail, so it's worth while checking that with the attached patch version. If that problem still remains, than please send me a screenshot of the dispatcher window for that situation so I can prepare a debug version for that run.

** Attachment added: "RunActivity.zip" https://bugs.launchpad.net/or/+bug/1213165/+attachment/3791499/+files/RunActivity.zip

-- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1213165

Title: Problem with AI train in the way

Status in Open Rails Tracker: New

Bug description: I am using the Allegra Add-On to the Glacier Express package from Simtrain.ch. I have tried it in x 1705 and v09 and the result is the same. I have also tried it in MSTS and it works as it should but not in Open Rails. My train is waiting in Davos Platz station ready to leave on the single track line to Filisur. Another (AI) train arrives at another platford, stop for passengers to get off and then moves forward to park in a siding. To get to the siding it has to move across one of the cross overs my train has to use to get to it's main single track line to Filisur, but part way across it just stops. My train is given to OK to proceed and a green signal, but if I move forward i go over the same cross over an into the side of the other train.

To manage notifications about this bug go to: https://bugs.launchpad.net/or/+bug/1213165/+subscriptions

Looky1173 commented 1 year ago

Imported from https://bugs.launchpad.net/or/+bug/1213165/comments/11

Property Value
Posted by r.roeterdink (r-roeterdink)
Date posted Wed, 28 Aug 2013 18:36:36 GMT

OK - that's good. The attached version is the same patch but without the debug output - that runs a bit better. I will commit the patch to the official version tomorrow.