rneum -> RE: Marine Traffic (11/13/2021 5:35:06 PM)
|
I can't seem to post numbers > 99.... I'd seen the randomized traffic scripts of occasional merchants, but due to the effort required scenarios seldom include the clutter and complexity encountered in the world. I decided an approach to generate sea lanes and then randomly populate them was necessary. This was not too hard and I expect to make the github repo public after some refactoring, testing, and review to cite sources. The transport and exchange of world commerce is a complicated process with a wide variety of variation and scope, but a number of resources are available publicly to guide the scenario developer. The World-Seaborne-Trade_-UNCTAD-2018 and WorldPortTraffic-Data-for-IAPH are some guides to help identify major ports and the distribution of the freight across ports and traffic types in a sea lane. I sourced ports from the National Geospatial-Intelligence Agency World Port Index (WPI) due to properties such as Facilities_RoRo, Facilities_Container, Facilities_OilTerminal, Facilities_LNGTerminal, Cranes_Fixed, and Cranes_Container and added both harbor and shore locations for ship and facility placement.(approximately [guess I can't post the number] entries) { name='Alexandria', country='United States', Facilities_RoRo='Unk', Facilities_Container='Unk', Facilities_OilTerminal='Unk', Facilities_LNGTerminal='Unk', Cranes_Fixed='No', Cranes_Container='Unk', harbor={ latitude=38.71 , longitude=-76.43}, shore={ latitude=38.72, longitude=-76.52}} I pulled ships from a public DB that gave type, flag, and size and then went and assigned the closest DBID to the entry. A lua table was created composed of [number > 99 ] commercial ships in ... classes: | Class | ____ | Class | |-----------|-----------|--| |Anchor handling supply tug||General cargo vessel| |Auxiliary ship||Heavy Lift Vessel| |Barge||Liquefied gas carrier| |Bulk carrier||Offshore Installation/Maintenance/Repair| |Cable ship||Oil Products Tanker| |Cargo and passenger||Oil tanker| |Cargo ship||Ore carrier| |Container ship||Passenger ship| |Cruise Liner||Platform| |Drilling unit||Platform supply vessel||Pusher/Tug| |Factory ship||RoRo ship| |Ferry||Supply vessel| |Fishing vessel||Trawler| {type ='Ship', class = 'Supply vessel', dbid = [sorry number > 99] , flag = 'Canada', unitname = 'ANNE RISLEY' } The primary function is GenerateSealanesAndTracks(sealanegen, allports, CONST_SEALANE_SIDE, { {source ='Izmir', destination = 'Marseille'}, {source ='Marseille', destination = 'Trieste'}, {source ='Odesa', destination = 'Marseille'}, {source ='Istanbul', destination = 'Odesa'}, {source ='Istanbul', destination = 'Batumi'}, {source ='Haifa', destination = 'Marseille'} }) [image]local://upfiles/82745/8148AD4E1BD943BC87E7D264F94E25F4.jpg[/image]
|
|
|
|