For Mark's case, I get the same results with simple as I do limited recursion, but the simple takes ~57 seconds and the limited took about 88 seconds.
Now for Tromodor's case. Here, both routines took abouy 28 seconds.
Now the next case is interesting. The first entry is the limited recursion, it took 120 seconds, and ended returning a worse result than the simple fit, which took around 40 seconds.
Clearly the greedy algorithm when applied to the capacity constraint ordered by profit (since weights are 1 as they are all tons) is finding a more lucrative use of the capacity going from Wolf 265/Felice Prospect to Sigru/Hernandez. The profit table of this one hop is:
I have no idea what the limited recursion is doing, but the greedy algorithm is clearly sweeping up all those lucrative limited supply items (like Insulating Membranes and Beryllium) first before spending credits on other items like Titanium. The greedy algorithm happens to also be the exact (optimal) BKP solution in this case and up to a capacity of 420. Beyond that, the C-code for BKP crashes out

Yes, sorting, even worst case, is O(n^2) and most decent implementations are O(n log n). Actual recursion is going to be exponential O(2^n) as this is NP-hard so you have to assume enumeration of all possibilities. YOUCH!
SIMPLE IS FIRST:
F:\Elite\TD>trade.py run --fr="Orang/Bessel Gateway" --cap=720 --cr=11b --ly=24.73 --empty=37.61 --pad=L --hops=2 --jum=3 --loop --summary -vv --progress
* Hop 1: .........1 origins
* Hop 2: .....1,538 origins .. 5,040-2,981,520cr gain, 7-4,141cr/ton
Orang/Bessel Gateway -> Orang/Bessel Gateway (score: 1708820.401607)
Load from Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
720 x Slavery/Imperial Slaves 14,339cr vs 17,539cr, 12 hrs vs 26 days
Expect to gain 2,304,000cr (3,200cr/ton)
Load from Ju Shosi/De Lay Point (2.07Kls, BMk:N, Pad:L, Plt:Y, Shp:N, Out:Y, Ref:Y):
628 x Weapons/Reactive Armour 833cr vs 2,441cr, 26 days vs 12 hrs
92 x Weapons/Non-lethal Weapons 632cr vs 1,766cr, 26 days vs 12 hrs
Expect to gain 1,114,152cr (1,547.43cr/ton)
----------------------------------------------------------------------------
Finish at Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 3,418,152cr (2,373cr/ton) => est 11,003,418,152cr total
F:\Elite\TD>trade.py run --fr="Orang/Bessel Gateway" --cap=720 --cr=11b --ly=24.73 --empty=37.61 --pad=L --hops=2 --jum=3 --loop --summary -vv --progress
* Hop 1: .........1 origins
* Hop 2: .....1,538 origins .. 5,040-2,981,520cr gain, 7-4,141cr/ton
Orang/Bessel Gateway -> Orang/Bessel Gateway (score: 1708820.401607)
Load from Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
720 x Slavery/Imperial Slaves 14,339cr vs 17,539cr, 12 hrs vs 26 days
Expect to gain 2,304,000cr (3,200cr/ton)
Load from Ju Shosi/De Lay Point (2.07Kls, BMk:N, Pad:L, Plt:Y, Shp:N, Out:Y, Ref:Y):
628 x Weapons/Reactive Armour 833cr vs 2,441cr, 26 days vs 12 hrs
92 x Weapons/Non-lethal Weapons 632cr vs 1,766cr, 26 days vs 12 hrs
Expect to gain 1,114,152cr (1,547.43cr/ton)
----------------------------------------------------------------------------
Finish at Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 3,418,152cr (2,373cr/ton) => est 11,003,418,152cr total
F:\Elite\TD>trade.py run --fr="Orang/Bessel Gateway" --cap=720 --cr=11b --ly=24.73 --empty=37.61 --pad=L --hops=2 --jum=3 --loop --summary -vv --progress
* Hop 1: .........1 origins
* Hop 2: .....1,538 origins .. 5,040-2,981,520cr gain, 7-4,141cr/ton
Orang/Bessel Gateway -> Orang/Bessel Gateway (score: 1708820.401607)
Load from Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
720 x Slavery/Imperial Slaves 14,339cr vs 17,539cr, 12 hrs vs 26 days
Expect to gain 2,304,000cr (3,200cr/ton)
Load from Ju Shosi/De Lay Point (2.07Kls, BMk:N, Pad:L, Plt:Y, Shp:N, Out:Y, Ref:Y):
628 x Weapons/Reactive Armour 833cr vs 2,441cr, 26 days vs 12 hrs
92 x Weapons/Non-lethal Weapons 632cr vs 1,766cr, 26 days vs 12 hrs
Expect to gain 1,114,152cr (1,547.43cr/ton)
----------------------------------------------------------------------------
Finish at Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 3,418,152cr (2,373cr/ton) => est 11,003,418,152cr total
F:\Elite\TD>trade.py run --fr="Orang/Bessel Gateway" --cap=720 --cr=11b --ly=24.73 --empty=37.61 --pad=L --hops=2 --jum=3 --loop --summary -vv --progress
* Hop 1: .........1 origins
* Hop 2: .....1,538 origins .. 5,040-2,981,520cr gain, 7-4,141cr/ton
Orang/Bessel Gateway -> Orang/Bessel Gateway (score: 1708820.401607)
Load from Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
720 x Slavery/Imperial Slaves 14,339cr vs 17,539cr, 12 hrs vs 26 days
Expect to gain 2,304,000cr (3,200cr/ton)
Load from Ju Shosi/De Lay Point (2.07Kls, BMk:N, Pad:L, Plt:Y, Shp:N, Out:Y, Ref:Y):
628 x Weapons/Reactive Armour 833cr vs 2,441cr, 26 days vs 12 hrs
92 x Weapons/Non-lethal Weapons 632cr vs 1,766cr, 26 days vs 12 hrs
Expect to gain 1,114,152cr (1,547.43cr/ton)
----------------------------------------------------------------------------
Finish at Orang/Bessel Gateway (89ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 3,418,152cr (2,373cr/ton) => est 11,003,418,152cr total
Now for Tromodor's case. Here, both routines took abouy 28 seconds.
SIMPLE IS FIRST:
F:\Elite\TD>trade.py run --from fujin --to fujin --hops 4 --age 2 -vvv --summary --pla=YN? --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress --pad-size=L
* Hop 1: .........1 origins
* Hop 2: .......261 origins .. 648-180,600cr gain, 9-1,204cr/ton
* Hop 3: .....1,341 origins .. 7,060-741,930cr gain, 23-2,473cr/ton
NOTE: Pruned 2192 origins too far from any end stations
* Hop 4: .......339 origins .. 536,700-1,165,918cr gain, 1,192-2,590cr/ton
Fujin/Futen Spaceport -> Fujin/Futen Spaceport (score: 1315679.347652)
Start CR: 35,000,000
Hops : 4
Jumps : 8
Gain CR : 1,312,668
Gain/Hop: 328,167
Final CR: 36,312,668
Load from Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
72 x Textiles/Natural Fabrics 352cr vs 815cr, 4 hrs vs 3 hrs, total: 25,344cr
78 x Textiles/Leather 204cr vs 615cr, 4 hrs vs 3 hrs, total: 15,912cr
Expect to gain 65,394cr (435.96cr/ton)
Load from GCRV 1568/Cernan Dock (1.36Kls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 246cr vs 4,723cr, 3 hrs vs 4 hrs, total: 36,900cr
Expect to gain 671,550cr (4,477cr/ton)
Load from Daruwutja/Acropolis (740ls, BMk:N, Pad:L, Plt:N, Shp:N, Out:Y, Ref:Y):
142 x Weapons/Reactive Armour 227cr vs 2,664cr, 5 hrs, total: 32,234cr
8 x Weapons/Personal Weapons 416cr vs 3,531cr, 5 hrs, total: 3,328cr
Expect to gain 370,974cr (2,473.16cr/ton)
Load from Snoquot/Wrangell City (71ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Machinery/Marine Equipment 3,621cr vs 4,986cr, 5 hrs vs 4 hrs, total: 543,150cr
Expect to gain 204,750cr (1,365cr/ton)
----------------------------------------------------------------------------
Finish at Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,312,668cr (2,187cr/ton) => est 51,312,668cr total
F:\Elite\TD>trade.py run --from fujin --to fujin --hops 4 --age 2 -vvv --summary --pla=YN? --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress --pad-size=L
* Hop 1: .........1 origins
* Hop 2: .......261 origins .. 648-180,600cr gain, 9-1,204cr/ton
* Hop 3: .....1,341 origins .. 7,060-741,930cr gain, 23-2,473cr/ton
NOTE: Pruned 2192 origins too far from any end stations
* Hop 4: .......339 origins .. 536,700-1,165,918cr gain, 1,192-2,590cr/ton
Fujin/Futen Spaceport -> Fujin/Futen Spaceport (score: 1315679.347652)
Start CR: 35,000,000
Hops : 4
Jumps : 8
Gain CR : 1,312,668
Gain/Hop: 328,167
Final CR: 36,312,668
Load from Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
72 x Textiles/Natural Fabrics 352cr vs 815cr, 4 hrs vs 3 hrs, total: 25,344cr
78 x Textiles/Leather 204cr vs 615cr, 4 hrs vs 3 hrs, total: 15,912cr
Expect to gain 65,394cr (435.96cr/ton)
Load from GCRV 1568/Cernan Dock (1.36Kls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 246cr vs 4,723cr, 3 hrs vs 4 hrs, total: 36,900cr
Expect to gain 671,550cr (4,477cr/ton)
Load from Daruwutja/Acropolis (740ls, BMk:N, Pad:L, Plt:N, Shp:N, Out:Y, Ref:Y):
142 x Weapons/Reactive Armour 227cr vs 2,664cr, 5 hrs, total: 32,234cr
8 x Weapons/Personal Weapons 416cr vs 3,531cr, 5 hrs, total: 3,328cr
Expect to gain 370,974cr (2,473.16cr/ton)
Load from Snoquot/Wrangell City (71ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Machinery/Marine Equipment 3,621cr vs 4,986cr, 5 hrs vs 4 hrs, total: 543,150cr
Expect to gain 204,750cr (1,365cr/ton)
----------------------------------------------------------------------------
Finish at Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,312,668cr (2,187cr/ton) => est 51,312,668cr total
F:\Elite\TD>trade.py run --from fujin --to fujin --hops 4 --age 2 -vvv --summary --pla=YN? --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress --pad-size=L
* Hop 1: .........1 origins
* Hop 2: .......261 origins .. 648-180,600cr gain, 9-1,204cr/ton
* Hop 3: .....1,341 origins .. 7,060-741,930cr gain, 23-2,473cr/ton
NOTE: Pruned 2192 origins too far from any end stations
* Hop 4: .......339 origins .. 536,700-1,165,918cr gain, 1,192-2,590cr/ton
Fujin/Futen Spaceport -> Fujin/Futen Spaceport (score: 1315679.347652)
Start CR: 35,000,000
Hops : 4
Jumps : 8
Gain CR : 1,312,668
Gain/Hop: 328,167
Final CR: 36,312,668
Load from Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
72 x Textiles/Natural Fabrics 352cr vs 815cr, 4 hrs vs 3 hrs, total: 25,344cr
78 x Textiles/Leather 204cr vs 615cr, 4 hrs vs 3 hrs, total: 15,912cr
Expect to gain 65,394cr (435.96cr/ton)
Load from GCRV 1568/Cernan Dock (1.36Kls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 246cr vs 4,723cr, 3 hrs vs 4 hrs, total: 36,900cr
Expect to gain 671,550cr (4,477cr/ton)
Load from Daruwutja/Acropolis (740ls, BMk:N, Pad:L, Plt:N, Shp:N, Out:Y, Ref:Y):
142 x Weapons/Reactive Armour 227cr vs 2,664cr, 5 hrs, total: 32,234cr
8 x Weapons/Personal Weapons 416cr vs 3,531cr, 5 hrs, total: 3,328cr
Expect to gain 370,974cr (2,473.16cr/ton)
Load from Snoquot/Wrangell City (71ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Machinery/Marine Equipment 3,621cr vs 4,986cr, 5 hrs vs 4 hrs, total: 543,150cr
Expect to gain 204,750cr (1,365cr/ton)
----------------------------------------------------------------------------
Finish at Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,312,668cr (2,187cr/ton) => est 51,312,668cr total
F:\Elite\TD>trade.py run --from fujin --to fujin --hops 4 --age 2 -vvv --summary --pla=YN? --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress --pad-size=L
* Hop 1: .........1 origins
* Hop 2: .......261 origins .. 648-180,600cr gain, 9-1,204cr/ton
* Hop 3: .....1,341 origins .. 7,060-741,930cr gain, 23-2,473cr/ton
NOTE: Pruned 2192 origins too far from any end stations
* Hop 4: .......339 origins .. 536,700-1,165,918cr gain, 1,192-2,590cr/ton
Fujin/Futen Spaceport -> Fujin/Futen Spaceport (score: 1315679.347652)
Start CR: 35,000,000
Hops : 4
Jumps : 8
Gain CR : 1,312,668
Gain/Hop: 328,167
Final CR: 36,312,668
Load from Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
72 x Textiles/Natural Fabrics 352cr vs 815cr, 4 hrs vs 3 hrs, total: 25,344cr
78 x Textiles/Leather 204cr vs 615cr, 4 hrs vs 3 hrs, total: 15,912cr
Expect to gain 65,394cr (435.96cr/ton)
Load from GCRV 1568/Cernan Dock (1.36Kls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 246cr vs 4,723cr, 3 hrs vs 4 hrs, total: 36,900cr
Expect to gain 671,550cr (4,477cr/ton)
Load from Daruwutja/Acropolis (740ls, BMk:N, Pad:L, Plt:N, Shp:N, Out:Y, Ref:Y):
142 x Weapons/Reactive Armour 227cr vs 2,664cr, 5 hrs, total: 32,234cr
8 x Weapons/Personal Weapons 416cr vs 3,531cr, 5 hrs, total: 3,328cr
Expect to gain 370,974cr (2,473.16cr/ton)
Load from Snoquot/Wrangell City (71ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Machinery/Marine Equipment 3,621cr vs 4,986cr, 5 hrs vs 4 hrs, total: 543,150cr
Expect to gain 204,750cr (1,365cr/ton)
----------------------------------------------------------------------------
Finish at Fujin/Futen Spaceport (560ls, BMk:N, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,312,668cr (2,187cr/ton) => est 51,312,668cr total
Now the next case is interesting. The first entry is the limited recursion, it took 120 seconds, and ended returning a worse result than the simple fit, which took around 40 seconds.
F:\Elite\TD>trade.py run --from "HYL/Sch" --to "SIGRU/Hern" --hops 3 -vvv --summary --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress
* Hop 1: .........1 origins
* Hop 2: .....1,083 origins .. 4,050-483,000cr gain, 27-3,220cr/ton
NOTE: Pruned 5288 origins too far from any end stations
* Hop 3: .....1,717 origins .. 435,900-1,060,800cr gain, 1,453-3,536cr/ton
Hyldeptu/Schroeder Gateway -> Sigru/Hernandez Gateway (score: 1200793.100512)
Start CR: 35,000,000
Hops : 3
Jumps : 5
Gain CR : 1,204,266
Gain/Hop: 401,422
Final CR: 36,204,266
Load from Hyldeptu/Schroeder Gateway (922ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Technology/Robotics 1,957cr vs 3,911cr, 13 hrs vs 25 days, total: 293,550cr
Expect to gain 293,100cr (1,954cr/ton)
Load from Snotricopa/Hobaugh Settlement (872ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 51cr vs 5,116cr, 25 days vs 32 days, total: 7,650cr
Expect to gain 759,750cr (5,065cr/ton)
Load from Wolf 265/Felice Prospect (7.38Kls, BMk:Y, Pad:M, Plt:N, Shp:N, Out:N, Ref:Y):
71 x Metals/Titanium 563cr vs 1,423cr, 32 days vs 28 days, total: 39,973cr
33 x Metals/Uranium 2,113cr vs 3,239cr, 32 days vs 28 days, total: 69,729cr
20 x Metals/Gallium 4,419cr vs 5,845cr, 32 days vs 28 days, total: 88,380cr
18 x Metals/Indium 5,163cr vs 6,534cr, 32 days vs 28 days, total: 92,934cr
Expect to gain 151,416cr (1,066.31cr/ton)
----------------------------------------------------------------------------
Finish at Sigru/Hernandez Gateway (10ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,204,266cr (2,724cr/ton) => est 51,204,266cr total
F:\Elite\TD>trade.py run --from "HYL/Sch" --to "SIGRU/Hern" --hops 3 -vvv --summary --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress
* Hop 1: .........1 origins
* Hop 2: .....1,083 origins .. 4,050-483,000cr gain, 27-3,220cr/ton
NOTE: Pruned 5288 origins too far from any end stations
* Hop 3: .....1,717 origins .. 435,900-1,060,800cr gain, 1,453-3,536cr/ton
Hyldeptu/Schroeder Gateway -> Sigru/Hernandez Gateway (score: 1226335.845144)
Start CR: 35,000,000
Hops : 3
Jumps : 5
Gain CR : 1,229,734
Gain/Hop: 409,911
Final CR: 36,229,734
Load from Hyldeptu/Schroeder Gateway (922ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Technology/Robotics 1,957cr vs 3,911cr, 13 hrs vs 25 days, total: 293,550cr
Expect to gain 293,100cr (1,954cr/ton)
Load from Snotricopa/Hobaugh Settlement (872ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 51cr vs 5,116cr, 25 days vs 32 days, total: 7,650cr
Expect to gain 759,750cr (5,065cr/ton)
Load from Wolf 265/Felice Prospect (7.38Kls, BMk:Y, Pad:M, Plt:N, Shp:N, Out:N, Ref:Y):
33 x Metals/Uranium 2,113cr vs 3,239cr, 32 days vs 28 days, total: 69,729cr
20 x Metals/Gallium 4,419cr vs 5,845cr, 32 days vs 28 days, total: 88,380cr
18 x Metals/Indium 5,163cr vs 6,534cr, 32 days vs 28 days, total: 92,934cr
27 x Metals/Titanium 563cr vs 1,423cr, 32 days vs 28 days, total: 15,201cr
16 x Industrial Materials/Superconductors 5,904cr vs 7,222cr, 32 days vs 28 days, total: 94,464cr
10 x Metals/Cobalt 233cr vs 1,106cr, 32 days vs 28 days, total: 2,330cr
5 x Metals/Beryllium 7,299cr vs 9,024cr, 32 days vs 28 days, total: 36,495cr
8 x Industrial Materials/Semiconductors 443cr vs 1,335cr, 32 days vs 28 days, total: 3,544cr
5 x Metals/Lithium 1,102cr vs 2,146cr, 32 days vs 28 days, total: 5,510cr
3 x Metals/Silver 4,032cr vs 5,508cr, 32 days vs 28 days, total: 12,096cr
3 x Metals/Tantalum 3,258cr vs 4,626cr, 32 days vs 28 days, total: 9,774cr
1 x Industrial Materials/Insulating Membrane 9,323cr vs 11,580cr, 32 days vs 28 days, total: 9,323cr
1 x Metals/Gold 9,155cr vs 10,875cr, 32 days vs 28 days, total: 9,155cr
Expect to gain 176,884cr (1,179.23cr/ton)
----------------------------------------------------------------------------
Finish at Sigru/Hernandez Gateway (10ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,229,734cr (2,732cr/ton) => est 51,229,734cr total
* Hop 1: .........1 origins
* Hop 2: .....1,083 origins .. 4,050-483,000cr gain, 27-3,220cr/ton
NOTE: Pruned 5288 origins too far from any end stations
* Hop 3: .....1,717 origins .. 435,900-1,060,800cr gain, 1,453-3,536cr/ton
Hyldeptu/Schroeder Gateway -> Sigru/Hernandez Gateway (score: 1200793.100512)
Start CR: 35,000,000
Hops : 3
Jumps : 5
Gain CR : 1,204,266
Gain/Hop: 401,422
Final CR: 36,204,266
Load from Hyldeptu/Schroeder Gateway (922ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Technology/Robotics 1,957cr vs 3,911cr, 13 hrs vs 25 days, total: 293,550cr
Expect to gain 293,100cr (1,954cr/ton)
Load from Snotricopa/Hobaugh Settlement (872ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 51cr vs 5,116cr, 25 days vs 32 days, total: 7,650cr
Expect to gain 759,750cr (5,065cr/ton)
Load from Wolf 265/Felice Prospect (7.38Kls, BMk:Y, Pad:M, Plt:N, Shp:N, Out:N, Ref:Y):
71 x Metals/Titanium 563cr vs 1,423cr, 32 days vs 28 days, total: 39,973cr
33 x Metals/Uranium 2,113cr vs 3,239cr, 32 days vs 28 days, total: 69,729cr
20 x Metals/Gallium 4,419cr vs 5,845cr, 32 days vs 28 days, total: 88,380cr
18 x Metals/Indium 5,163cr vs 6,534cr, 32 days vs 28 days, total: 92,934cr
Expect to gain 151,416cr (1,066.31cr/ton)
----------------------------------------------------------------------------
Finish at Sigru/Hernandez Gateway (10ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,204,266cr (2,724cr/ton) => est 51,204,266cr total
F:\Elite\TD>trade.py run --from "HYL/Sch" --to "SIGRU/Hern" --hops 3 -vvv --summary --credits=50000000 --capacity=150 --ly-per=29.09 --empty-ly=33.31 --insurance=15000000 --progress
* Hop 1: .........1 origins
* Hop 2: .....1,083 origins .. 4,050-483,000cr gain, 27-3,220cr/ton
NOTE: Pruned 5288 origins too far from any end stations
* Hop 3: .....1,717 origins .. 435,900-1,060,800cr gain, 1,453-3,536cr/ton
Hyldeptu/Schroeder Gateway -> Sigru/Hernandez Gateway (score: 1226335.845144)
Start CR: 35,000,000
Hops : 3
Jumps : 5
Gain CR : 1,229,734
Gain/Hop: 409,911
Final CR: 36,229,734
Load from Hyldeptu/Schroeder Gateway (922ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Technology/Robotics 1,957cr vs 3,911cr, 13 hrs vs 25 days, total: 293,550cr
Expect to gain 293,100cr (1,954cr/ton)
Load from Snotricopa/Hobaugh Settlement (872ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y):
150 x Medicines/Basic Medicines 51cr vs 5,116cr, 25 days vs 32 days, total: 7,650cr
Expect to gain 759,750cr (5,065cr/ton)
Load from Wolf 265/Felice Prospect (7.38Kls, BMk:Y, Pad:M, Plt:N, Shp:N, Out:N, Ref:Y):
33 x Metals/Uranium 2,113cr vs 3,239cr, 32 days vs 28 days, total: 69,729cr
20 x Metals/Gallium 4,419cr vs 5,845cr, 32 days vs 28 days, total: 88,380cr
18 x Metals/Indium 5,163cr vs 6,534cr, 32 days vs 28 days, total: 92,934cr
27 x Metals/Titanium 563cr vs 1,423cr, 32 days vs 28 days, total: 15,201cr
16 x Industrial Materials/Superconductors 5,904cr vs 7,222cr, 32 days vs 28 days, total: 94,464cr
10 x Metals/Cobalt 233cr vs 1,106cr, 32 days vs 28 days, total: 2,330cr
5 x Metals/Beryllium 7,299cr vs 9,024cr, 32 days vs 28 days, total: 36,495cr
8 x Industrial Materials/Semiconductors 443cr vs 1,335cr, 32 days vs 28 days, total: 3,544cr
5 x Metals/Lithium 1,102cr vs 2,146cr, 32 days vs 28 days, total: 5,510cr
3 x Metals/Silver 4,032cr vs 5,508cr, 32 days vs 28 days, total: 12,096cr
3 x Metals/Tantalum 3,258cr vs 4,626cr, 32 days vs 28 days, total: 9,774cr
1 x Industrial Materials/Insulating Membrane 9,323cr vs 11,580cr, 32 days vs 28 days, total: 9,323cr
1 x Metals/Gold 9,155cr vs 10,875cr, 32 days vs 28 days, total: 9,155cr
Expect to gain 176,884cr (1,179.23cr/ton)
----------------------------------------------------------------------------
Finish at Sigru/Hernandez Gateway (10ls, BMk:Y, Pad:L, Plt:N, Shp:Y, Out:Y, Ref:Y) gaining 1,229,734cr (2,732cr/ton) => est 51,229,734cr total
Clearly the greedy algorithm when applied to the capacity constraint ordered by profit (since weights are 1 as they are all tons) is finding a more lucrative use of the capacity going from Wolf 265/Felice Prospect to Sigru/Hernandez. The profit table of this one hop is:
Code:
F:\Elite\TD>trade trade "Wolf 265/Felice Prospec" "SIGR/Hern" -vvv
Item Profit Cost AvgCost Buying AvgBuy Supply Demand SrcAge DstAge
---------------------------------------------------------------------------------------------------------------------------------------
Industrial Materials/Insulating Membrane 2,257 9,323 9926 11580 10913 1 7,153 32.96 28.59
Metals/Beryllium 1,725 7,299 7594 9024 8216 5 21,530 32.96 28.59
Metals/Gold 1,720 9,155 9206 10875 9837 1 12,116 32.96 28.59
Metals/Silver 1,476 4,032 4360 5508 4813 3 132,005 32.96 28.59
Metals/Gallium 1,426 4,419 4666 5845 5152 20 30,152 32.96 28.59
Metals/Indium 1,371 5,163 5375 6534 5805 18 13,213 32.96 28.59
Metals/Tantalum 1,368 3,258 3543 4626 3994 3 225,091 32.96 28.59
Industrial Materials/Superconductors 1,318 5,904 6137 7222 6663 16 34,550 32.96 28.59
Metals/Uranium 1,126 2,113 2388 3239 2782 33 206,888 32.96 28.59
Metals/Lithium 1,044 1,102 1402 2146 1715 5 59,826 32.96 28.59
Industrial Materials/Semiconductors 892 443 813 1335 1082 8 70,587 32.96 28.59
Metals/Cobalt 873 233 629 1106 740 10 63,879 32.96 28.59
Metals/Titanium 860 563 914 1423 1137 71 81,523 32.96 28.59
Metals/Copper 482 425 441 907 607 42 153,165 32.96 28.59
Textiles/Conductive Fabrics 447 521 561 968 869 14 172,669 32.96 28.59
Industrial Materials/Polymers 444 132 115 576 323 58 335,369 32.96 28.59
Metals/Aluminium 419 243 300 662 463 59 202,272 32.96 28.59
Textiles/Synthetic Fabrics 263 120 154 383 332 41 492,570 32.96 28.59
Chemicals/Explosives 172 193 281 365 436 15 14,067 32.96 28.59
I have no idea what the limited recursion is doing, but the greedy algorithm is clearly sweeping up all those lucrative limited supply items (like Insulating Membranes and Beryllium) first before spending credits on other items like Titanium. The greedy algorithm happens to also be the exact (optimal) BKP solution in this case and up to a capacity of 420. Beyond that, the C-code for BKP crashes out
I'm an actuary; we're supposed to be frustratingly pedantic like thatI said should.... So it's only 99.7% of the time. I'm okay with that.
Well, thank Oliver for that. The list gets passed in sorted on profit, with lower cost winning when profits are tied.
Oh yeah, that video that shows the thing never actually freezes, and hints as to why it's being so slow:
https://youtu.be/fkCjyXC1n2A
Yes, sorting, even worst case, is O(n^2) and most decent implementations are O(n log n). Actual recursion is going to be exponential O(2^n) as this is NP-hard so you have to assume enumeration of all possibilities. YOUCH!
Last edited: