I have no idea how performant it would be, but I wonder if it would suffice to have interconnected regional market nodes, with the cost of the transportation of a good calculated through these nodes, rather than doing it for each state. It wouldn't be as granular but perhaps it would be faster since there would presumably be less computations. e.g., for a good going from New York to California, you might just check the cost along the path from the "North American West Coast" to "North American East Coast" regional market nodes. I don't think it would handle individual state changes well, like if a war or treaty cut off a direct land route from one coast to another, but the performance may be worth it (and it's still a more detailed model of transport distance than what currently exists).