MarkAusten / TDHelper

GUI for Trade Dangerous and EDDBlink
MIT License
7 stars 4 forks source link

[Regression] Saved output has extraneous text compared to TDH #27

Closed eyeonus closed 6 years ago

eyeonus commented 6 years ago

This is the exact same run returned by both TDH and TDH2 (TDH2's insurance calculation is wrong by exactly 1 credit, hence the one credit discrepancy in the Start CR and Final CR), then saved to #1:

The actual route is exactly the same in both cases, and have thus been replaced with ellipses.

TDH2 (saved_1.txt):

Command line: -u "S:\Elite Dangerous Programs\Trade Dangerous\trade.py" run --fr="Liu Bajara/Silva Terminal" --cap=36 --ins=156181 --cr=6811317 --ly=12.65 --empty=14.30 --loop-int=5 --loop --pad=SML? -vvv --hops=6
NOTE: Pruned 1087 origins too far from any end stations
NOTE: Pruned 2650 origins too far from any end stations
Liu Bajara/Silva Terminal -> Liu Bajara/Silva Terminal (score: 72221.245367)
Start CR:  6,655,136
Hops    :          6
Jumps   :         12
Gain CR :    418,644
Gain/Hop:     69,774
Final CR:  7,073,780

  Load from Liu Bajara/Silva Terminal (462ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
.
.
.
  Unload at Liu Bajara/Silva Terminal (462ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) => Gain 58,140cr (1,615cr/ton) => 7,229,961cr
  ----------------------------------------------------------------------------
Finish at Liu Bajara/Silva Terminal (462ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 418,644cr (1,974cr/ton) => est 7,229,961cr total

TDH (saved_1.txt)

Liu Bajara/Silva Terminal -> Liu Bajara/Silva Terminal (score: 72221.245367)
Start CR:  6,655,135
Hops    :          6
Jumps   :         12
Gain CR :    418,644
Gain/Hop:     69,774
Final CR:  7,073,779
  Load from Liu Bajara/Silva Terminal (462ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
.
.
.
  Unload at Liu Bajara/Silva Terminal (462ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) => Gain 58,140cr (1,615cr/ton) => 7,229,961cr
  ----------------------------------------------------------------------------
Finish at Liu Bajara/Silva Terminal (462ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 418,644cr (1,974cr/ton) => est 7,229,961cr total
MarkAusten commented 6 years ago

Sounds like a rounding issue in the calculations to me. I'll check it out.

MarkAusten commented 6 years ago

So, FDev seem to be calculating my insurance with a value of 2.49999943 % instead of 2.5% and your percentage is 4.99998079 % instead of 5 %, but I've no idea what they use for the 3.75 % calculations.

To be honest, I'm not sure that a discrepancy that small is worth bothering about.

eyeonus commented 6 years ago

It's not. 1 credit. Pssh. Whatever.

However, the insurance discrepancy wasn't the issue.

The issue is that TDH2 has extraneous lines when saving output to any of the Saved #X tabs.

I only mention the insurance discrepancy to explain why TDH2's output has a different Start CR and Final CR than TDH does, since in TDH the insurance has to be entered manually, whereas in TDH2 the insurance is calculated automatically.

eyeonus commented 6 years ago

This issue has not been fixed.