Closed CyberiaResurrection closed 6 months ago
From Discord chat with @tjoneslo :
distance_weight = [0, 30, 50, 75, 130, 230, 490, 9999, 9999, 9999, 300]
This is starting point for this discussion. This is the approximate, numbers relative to nothing, "cost" for making a jump between two worlds. This includes things like crew salaries, maintenance, broker's fees, fuel, life support and docking charges, the relative profitability of the ship based upon cargo capacity. Of this, the cost for fuel is a relatively small percentage. And even if you multiply the fuel costs by 10, it's still a small percentage of the overall operational cost.
In the TradeCalculation#route_weight() function we need to select a value to add to the existing weight calculation. Because the numbers are made up, we can make up more numbers to reflect this without getting into a detailed analysis of actual fuel costs.
If poor starports (DEX) add 50 points to the operations scale of thing, mostly because of lack of services and trade opportunities. I would add 100 to the route weight if either end is DS trade station. This becomes balanced against an 7 to 8 parsec (3 to 4 jumps) going "around" vs the two jumps to the DS trade station and back out the other side.
Again from Discord chat with @tjoneslo: me: that's not what I was asking - you're adding 100 to the route weight to/from DSS, fine. What counts as a DSS in the first place? tjoneslo: Anything that has a star, brown dwarf or larger is not a DSS. There doesn't have to be anything in orbit around said star, just that it exists.
Figured here was a good spot to thrash out how deep space stations (DSS) will work in PyRoute.
I'm leaning towards a generalisation of what currently exists, so existing stars continue unaltered not because they are existing stars, but as a consequence of their bits in the extended framework.
Simplest I can think of: As DSS have fuel costs that (as far as I can tell universally) are in excess of the at-berth costs for refined fuel, express them as multiples of the at-berth cost. Using Riftspan Station as an example, it costs 5,000 credits per ton of refined fuel. Depending on whether you're coming in from CT or GT, it's 10x or 14.2x base cost, respectively - I'd take the geometric average of those two, or 11.9.
Now, multiply each link's effective cost and distance by the average of the fuel costs at each end (in our case,1 on the existing-system end and 11.9 on the DSS end, for 6.45 total) - this assumes the vast bulk of traffic is single-jump without any fancy bits like jump tanks. The multiplied costs are fed into pathfinding, and the multiplied distances are fed into route generation (ie, effective length of overall route).
This enables (for example), Amondiage to Filentred. Although the route is 8 pc long (Amondage - Riftspan - Filentred or versa vica), it's effective length for route purposes is 51 pc (8 * 6.45 = 51.6, rounded down to 51 pc). Cerebin to Filentred (via Chandler and Riftspan stations) has a real-world distance of 29 pc (using TravMap's routefinder, allowing anomalies), but the trans-Rift portions add 81pc to that, for 110pc total. For a longer route, consider Prometheus to Mora. 225 pc real-world (again allowing anomalies), but 306 pc thanks to Chandler and Riftspan stations.
If a given link is station to station, no problem - multiply those costs by the average of the fuel costs at each end (say 11.9).
After a route is found involving at least one station, check to see that it's still big enough to draw before doing so.
Thoughts, @tjoneslo ?