Author Topic: Cargo sometimes goes to the wrong stop  (Read 689 times)

0 Members and 1 Guest are viewing this topic.

Offline accord2

Cargo sometimes goes to the wrong stop
« on: March 04, 2017, 06:06:03 PM »
I am currently reviewing old bug reports and I notice that this one appears to have no reported resolution. May I ask whether this can still be reproduced?

I think it is fixed, however some vehicles (in my save game ships) some times send cargo to the wrong station. It is a different bug and I think it was mention before by someone else. 

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #1 on: March 05, 2017, 12:08:33 AM »
Thank you for the report: I have split this from the other topic because it concerned a different bug. Please do make sure only ever to report one bug per thread, or else it is impossibly difficult to keep track of which bugs are fixed and which are not.

In order to try to fix this, I will need a lot more detail: enough detail to be able reliably to reproduce the problem. Are you able to upload a saved game in which this can reliably be reproduced and set out the steps necessary in that game to reproduce it?
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.

Offline accord2

Re: Cargo sometimes goes to the wrong stop
« Reply #2 on: March 05, 2017, 10:17:59 AM »
This only happens rarely and I don't know how to reproduce this in a different game.

It happens in games where I have a main harbour where different routes start. Sometimes (rarely) a ship heading to A loads cargo of destination B. Then another ship from route A will load the B's cargo at harbour A and take it again to the main harbour.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #3 on: March 05, 2017, 11:27:10 AM »
I am afraid that it is almost impossible to fix a bug of unknown cause that there is no known way to reproduce. If you or anyone else are able to find how this can be reproduced reliably, I should be very grateful.
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.

Offline accord2

Re: Cargo sometimes goes to the wrong stop
« Reply #4 on: March 05, 2017, 01:54:08 PM »
When it happens again I will send you :)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #5 on: March 05, 2017, 02:28:11 PM »
Thank you.
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.

Offline accord2

Re: Cargo sometimes goes to the wrong stop
« Reply #6 on: March 05, 2017, 09:51:20 PM »
Thank you.

Here it is https://www.dropbox.com/s/uwn4q2dfrx36l97/Wrong%20destination.sve?dl=0
Please, go to Deberhill Market dock and you will find 215 crates of fish that should go to Norstable, those are the wrongly sent cargo.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #7 on: March 06, 2017, 12:59:55 AM »
I cannot see any fish at Deberhill Market dock - but there are 215 crates of meat bound for Norstable Market Stop. Is this what you meant?

May I ask the reason that you think that the cargo has gone to the wrong stop? The cargo is routed by time: the shortest overall journey time (that is, each leg of each journey, plus waiting and transshipment times at each stop, and the waiting times at each stop are different for each destination). The routing itself will only be wrong if the route actually taken by the cargo has a greater journey time (thus calculated) than another route. Have you checked all of the timings to see whether this is so? The timings for each leg of the journey (including waiting and transshipment times) are shown in each stop's details window.
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.

Offline accord2

Re: Cargo sometimes goes to the wrong stop
« Reply #8 on: March 06, 2017, 08:27:19 PM »
I cannot see any fish at Deberhill Market dock - but there are 215 crates of meat bound for Norstable Market Stop. Is this what you meant?

May I ask the reason that you think that the cargo has gone to the wrong stop? The cargo is routed by time: the shortest overall journey time (that is, each leg of each journey, plus waiting and transshipment times at each stop, and the waiting times at each stop are different for each destination). The routing itself will only be wrong if the route actually taken by the cargo has a greater journey time (thus calculated) than another route. Have you checked all of the timings to see whether this is so? The timings for each leg of the journey (including waiting and transshipment times) are shown in each stop's details window.
Oh, sorry. yes meat.  :-[
How do I see the time of a line that is not programmed? By the way, if in that save you go to Norstable you will also find wrongly sent cargo. That cargo should go to Deberhill Market (in that case I created a direct route between those docks because I was tired of having all those crates there waiting). I have direct routes from the sources of that cargo to the final destination. How can the game prefer a longer route (wait at the initial dock, then go to another dock, then wait there, then go back, then wait again and then go to the final dock) than a direct one? Yes, maybe it is the travelling time, but I really don't know how to see that.  :-[

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #9 on: March 07, 2017, 01:38:58 PM »
I do not follow: what do you mean by a line that is not programmed?
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.

Offline accord2

Re: Cargo sometimes goes to the wrong stop
« Reply #10 on: March 07, 2017, 08:08:58 PM »
I do not follow: what do you mean by a line that is not programmed?
Maybe I used the wrong term, I'm not a English native speaker. For example, a line "not programmed" is one that does not appear at the line menu. For example, like you said the cargo prefers travelling with the shortest time, how do I know this time if I can't see the "line" they use at the management menu? If cargo uses the line A, I can go to menu and see the time, however if it just gets in a "random" ship and then gets into another one until it reaches the destination, how I know the time of the travel?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #11 on: March 07, 2017, 10:54:31 PM »
I think that you may be confusing the timing of individual legs of the journey with the timing of the journey as a whole. The routes taken by goods are calculated using the timings which are displayed in each stop's details window.

To give a very simple example of goods trying to get from A to B, imagine that stop A's details window contained the following information:

Journey to B: 1 hour travelling, 2 hours waiting
Journey to C: 1:30 hour travelling, 5 minutes waiting

And C's details window contained the following information

Journey to A: 1:30 hour travelling, 5 minutes waiting
Journey to B: 30 minutes travelling, 10 minutes waiting

the goods would go from A to B via C because 1:30 hours + 5 minutes + 30 minutes + 10 minutes is less than 1 hour + 2 hours.
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.

Offline accord2

Re: Cargo sometimes goes to the wrong stop
« Reply #12 on: March 08, 2017, 12:55:50 PM »
I think that you may be confusing the timing of individual legs of the journey with the timing of the journey as a whole. The routes taken by goods are calculated using the timings which are displayed in each stop's details window.

To give a very simple example of goods trying to get from A to B, imagine that stop A's details window contained the following information:

Journey to B: 1 hour travelling, 2 hours waiting
Journey to C: 1:30 hour travelling, 5 minutes waiting

And C's details window contained the following information

Journey to A: 1:30 hour travelling, 5 minutes waiting
Journey to B: 30 minutes travelling, 10 minutes waiting

the goods would go from A to B via C because 1:30 hours + 5 minutes + 30 minutes + 10 minutes is less than 1 hour + 2 hours.
Ah, now everything makes sense. Thank you :)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15260
  • Total likes: 361
  • Helpful: 159
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo sometimes goes to the wrong stop
« Reply #13 on: March 18, 2017, 02:12:55 PM »
I wonder whether the changes that I made to the waiting time code last week make these apparent anomalies less frequent?
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.