makhidkarun / traveller_pyroute

Traveller trade route generator
MIT License
14 stars 5 forks source link

Add debug option to fix pop-based trade codes in flight #107

Closed CyberiaResurrection closed 8 months ago

CyberiaResurrection commented 8 months ago

I got tired of 3 megabytes+ of crap filling up the logs of full-orchestra charted space runs, which I generally have to leave running overnight.

A shufti showed ~60% of those on the Dec 23, 2023 TravellerMap data were invalid/missing population trade code complaints (including the infamous 'Ba Lo Ni' combo on actually-barren systems).

Thus, I added a fix_pop debug option, to fix those problems as their respective starlines were parsed, which did the following: approx 25,700 parsing complaints as at status quo; approx 10,770 parsing complaints as at this PR; that giving a 58.0% net reduction in the number of complaints filling up the logs in a full-orchestra run, and (big surprise) reducing crap buildup by ~1.8 megabytes.

The remaining trade-code related complaints (using the categorisation in TradeCodes) not addressed by this PR break down as: Code Type Invalid Calculated Total
Ag Econ 502 122 624
In Econ 496 224 720
Na Econ 154 138 292
Pa Econ 0 1,228 1,228
Pi Econ 0 1,552 1,552
Pr Econ 12 902 914
Ri Econ 98 622 720
Econ Subtotal 1,262 4,788 6,050
As Planet 2 6 8
De Planet 226 37 263
Fl Planet 204 41 245
Ga Planet 6 865 871
He Planet 1 1,141 1,142
Ic Planet 1 33 34
Oc Planet 7 97 104
Po Planet 86 74 160
Va Planet 2 604 606
Wa Planet 177 29 206
Planet Subtotal 712 2,927 3,639
GRAND TOTAL 1,974 7,715 9,689

The remaining 1,081 complaints break down as:

Disallowed residual trade code - 38 Importance mismatch - 11 Acceptance mismatch - 927 Symbols mismatch - 2 Misc - 103

bobbyjim commented 8 months ago

Here's to less crap!

On Wed, Apr 3, 2024 at 1:36 AM Alex Goodwin @.***> wrote:

I got tired of 3 megabytes+ of crap filling up the logs of full-orchestra charted space runs, which I generally have to leave running overnight.

A shufti showed ~60% of those were invalid/missing population trade code complaints (including the infamous 'Ba Lo Ni' combo on an actually-barren system).

Thus, I added a fix_pop debug option, to fix those problems as their respective starlines were parsed, which did the following: approx 25,700 parsing complaints as at status quo; approx 10,800 parsing complaints as at this PR; that giving a 57.9% net reduction in the number of complaints filling up the logs in a full-orchestra run, and (big surprise) reducing crap buildup by ~1.8 megabytes.

You can view, comment on, or merge this pull request online at:

https://github.com/makhidkarun/traveller_pyroute/pull/107 Commit Summary

File Changes

(6 files https://github.com/makhidkarun/traveller_pyroute/pull/107/files )

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/makhidkarun/traveller_pyroute/pull/107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7KVBSEAPDPV6ZMI3GLXS3Y3OPODAVCNFSM6AAAAABFUVOWXKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDEMBSHE2TGMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>