News:

Want to praise Simutrans?
Your feedback is important for us ;D.

[11.20] Strange schedule quirks

Started by Sarlock, February 23, 2014, 06:00:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sarlock

Doing a bunch of tests to try and figure out some weird things that are going on with the server game.

When I open a schedule for a ship, the waypoint that it is next going to is not always the one that is displayed as selected on the schedule list.  At first it seemed like it was just the first setting on the schedule that is affected this way but I've seen it happen in other ways as well now.

Secondly, while testing this occurrence, I came up with two different errors as a result:

and

I've sent you a save game so that you can see for yourself.  The game will load centred on three different ships, one already locked up with the 976 hour loading time, and two that are doing a small 4-waypoint circuit around in front of the depot.  One is using a line (line 359) and other is a line-less schedule.  Try opening the schedule on the ship on the left (the one with a line) and after you close it will set it to a loading time of 0:00.  If you open the schedule on the right ship, you will find that often it will not indicate the next stop correctly, but doesn't seem to lock up on loading time during any schedule edits.

Very odd.

I have also done some testing and established that the maximum waypoint distance is between 500 and 600 tiles on a straight stretch of open ocean.  At 600 the ship will return "no route".

I'll do tomorrow, I have a 4am Canada-Sweden hockey game to wake up for in 6 hours...
Current projects: Pak128 Trees, blender graphics

jamespetts

Thank you very much for your reports. The main problem relating to the server game and long shipping routes has taken me most of the day to track down, but I have eventually found it and pushed a fix for it: when I had fixed a problem reported by Carl relating to trains taking odd routes in some cases, I had altered the calculation of the cost in the A* path-finding algorithm for convoys (multiplying it by 10 to allow for fractional values to represent the difference in distance between a straight and diagonal tile), but I had not adjusted the calculation of the heuristic to match. This made the path-finding algorithm very inefficient and prone to exhausting its allocated number of maximum steps (1,000,000) much more quickly than was hitherto the case. I have now fixed this by multiplying the heuristic calculation by 10, with the result that the pathfinding algorithm has returned to its previous level of efficiency.

The issues that you are describing are not all bugs: the behaviour of vehicles in skipping waypoints is intentional in that they immediately route onwards from each non-reversing waypoint, which, in the case of trains and other convoy types that use block reservations, they can reserve blocks beyond the next waypoint so that they do not have to stop at the waypoint or treat it as a signal. In normal use, this does not create difficulties, but might produce odd behaviour when a large number of stops are recorded as being "no route" (odd things are likely to happen when every stop is a non-reversing waypoint, for example).

Quite what you are seeing with the loading time issues I have yet to investigate, but will endeavour to look into that presently. Apologies that you and others are having trouble with the online game, and thank you all for your reports.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have now looked into the stuck ship issue. Quite how it got into that state is not clear, but I have now added code that should automatically detect when a convoy is in that state and move it on. As to the little circles, this seems to be caused by all the other entries in the schedule being deleted. Unfortuantely, because they had already been deleted by the time that this game was saved, I cannot see what is causing this problem.

How was the game, incidentally?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

Thank you for all of your hard work in researching these issues.  If you refer to the circles that the ships were making it's because I specifically made those circles for testing purposes, they're just an artificial creation to demonstrate the odd loading time bug and the schedule jumping-ahead issue (which I did experience in a few other instances on actual lines-it was just a lot easier to demonstrate in a closed environment).

Game was amazing... if you were Canadian.  Not so enjoyable for Swedish fans.  ;)
Current projects: Pak128 Trees, blender graphics