News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Max Intransit off by consumption factor

Started by PJMack, August 06, 2022, 07:59:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PJMack

When I simplified the intransit calculation, I had assumed that the formulas given were correct and that simplifying them to reduce rounding would fix the issues where some intransit calculations were incorrect.  Though the simplified calculations does result in lower rounding, some low max intransit values persisted. 

After going through how the results of the calculation is used, I have determined that the consumption factor is compensated for twice, once in the intransit calculation, and once each time it is actually used.  (Though for some of those cases, I am not sure the correct factor is actually being used, I will need to look into it more). 

Removing the consumption factor from the intransit calculation does appear so far to be working as I am currently testing it in a large stable game map using the master branch of my fork.  The sudden increase of intransit values to the correct ones does result in a sudden surge of goods traffic. 

P.S. I added the commit with the corrections to my "factory_link_refactor" branch which turns out to be the branch that PR#563 (another bug fix) was using.  I can move it to a different branch if needed.

jamespetts

Thank you - I have incporporated the changed in the factory_link_refactor branch into master; the commits in that branch did not indicate that any alteration in the balance had taken place; can I check which commit that this was in? Was it 1778ef6a783c960279a13143783e7af972380992 ? I had thought that that was simply removing redundant code.
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.