Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Simulating Trade Routes

  1. #1

    Default Simulating Trade Routes

    I'm developing a small sandbox RPG, and one procedural element I'd like to have is fairly realistic trade between cities. I'm curious if anyone here has experience with this sort of thing, or at least knowledge about European trade practices in the 1300's to 1500's. I'm especially interested in algorithms people may have that would help this simulation.

    My simulation must serve multiple goals. The first goal is to determine how important each city in the world is, since in the real world city population size was highly linked with how much of a hub of trade a city was. Initially, I want to procedurally determine the population level of each city before the game starts. As the game progresses, I'd like cities to slowly wax or wane in power based partially on how involved they are in the flow of trade. Finally if the player wants to be a merchant I want to allow that, so the simulation needs to be able to handle local prices.

    So, how do I determine which cities prosper due to trade? How do I determine which nations (groups of cities) prosper due to trade? How can cities or merchant organizations attempt to control trade to their advantage (naval power)?

    Here's the basic framework I'm planning on using, though I'm willing to consider changing anything if someone has a good idea:

    I have approximately 250 cities placed across my map. Each city is the center of trade of its own surroundings, which include 6-10 market towns and up to 1000 villages. For the purposes of my simulation, each province (city + satellite settlements) is considered a single unit.

    Each city supplies certain luxury or manufactured goods for export, such as alcohol (wine, rum, beer), weapons and armor, jewelry, textiles (wool, cotton, silk), perfume, dyes, spices, incense, glass, ceramics/porcelain, alchemical goods, furs, fine timber, opium, etc. Cities have demand for goods that they don't produce.

    Cities are linked together in a web of trade connections. Land routes connect cities to each other as long as they're quite close or inaccessible by water. Sea routes connect ports to each other in chains along the coast. River routes allow barge traffic to move along the slow, wide rivers in the lowlands.

    Each trade connection is assigned a cost which represents time and risk involved in using it. Connection length and type are the primary cost factors, but other modifiers such as a mountain pass or areas of known pirate/bandit activity also apply. This network of connections can be searched using a search algorithm like A* to allow AI agents to make rational decisions about which trade routes should be taken.
    Last edited by SteelyGlint; 02-24-2010 at 01:27 AM.

  2. #2
    Publisher Mark Oliva's Avatar
    Join Date
    Jul 2009
    Location
    Altershausen, Northern Bavaria
    Posts
    1,505

    Default

    It's pretty clear to me what you want to do, but it's not at all clear to me what you want from us. You asked about an algorithm. A sensible algorithm would be pretty illusory, because the number of factors that affect trade and its success or failure are variable and often not logical but rather politically emotional. However, if you're going to implement the following basically good concept:

    Quote Originally Posted by SteelyGlint View Post
    Each city supplies certain luxury or manufactured goods for export, such as alcohol (wine, rum, beer), weapons and armor, jewelry, textiles (wool, cotton, silk), perfume, dyes, spices, incense, glass, ceramics/porcelain, alchemical goods, furs, fine timber, opium, etc.
    You should give more thought to what you can and can't export. In the 1300s to 1500s, beer, for instance, certainly was one of the items you wouldn't export. Beers and ales of that era spoiled within a few days' time. Not only was refrigeration limited to what a beer cellar could provide, but the use of effective ingredients - particularly hops - that stabilized and helped preserve the brew were little known.
    Mark Oliva
    The Vintyri (TM) Project

  3. #3

    Default

    I guess you're right, it's a little hard for me to explain what I'm looking for in responses here. I'm trying to figure out how the wealth produced by trade gets distributed, and what intentional human factors go into deciding where trade hubs appear. Is there a positive feedback loop caused by an arbitrary city having a slight edge in trade, and the benefits from that edge spiraling into local dominance? If so, how could I simulate that?

    Why is it that some tiny states like Venice, Genoa, Holland, the ancient Phoenicians, and Lubeck (the seat of the Hanseatic League) were able to exert such extensive control over regional trade? Is it simply because they happen to have powerful navies, and therefore are able to protect their merchant fleets?

    Would merchants work solely out of their "home city," trading only between it and foreign ports? Is that a good way to ensure that cities with the largest amount of merchants benefit the most from trade?

    As far as I know hops were cultivated in central Germany by around 900 AD, and had spread throughout most of Europe as a beer additive by the end of the 1500's. But even if the cultivation of hops was a problem, I'd say it's a minor problem since this is an alternate world and I could say that beer production is more advanced than it was in the real world.

  4. #4

    Default

    Try searching for the algorithms in game forums such as "The Patrician 2" or "Port Royal 1&2". These are games, that almost exclusively handle trade.

  5. #5
    Guild Journeyer gilgamec's Avatar
    Join Date
    Mar 2009
    Location
    Colonia Claudia Ara Agrippinensium
    Posts
    130

    Default

    Hmmm... I think you're putting the cart before the horse here. For instance:
    Quote Originally Posted by SteelyGlint View Post
    The first goal is to determine how important each city in the world is, since in the real world city population size was highly linked with how much of a hub of trade a city was.
    This is, at best, a misrepresentation of where population size comes from. Many 'trade hubs' of the Middle Ages (say, Lagny in Champagne) were seasonal trade fairs and never functioned as cities. Many cities (or, at least, settlements) had political power because the local lord was important and powerful, but were never trade hubs (like, say, Lusignan, also in France). The force that makes cities more and less powerful (and, peripherally, larger or smaller), at least in the long term, is economic development, which is symbiotic with but orthogonal to trade.

    Quote Originally Posted by SteelyGlint View Post
    Initially, I want to procedurally determine the population level of each city before the game starts.
    Again, city sizes are dependent (somewhat) on economic development -- the more things are produced, the more people can be supported doing something other than growing food. This means that city sizes are highly historical. Still, you could do worse than draw sizes from a logistic distribution and fake a consistent backstory.

    Quote Originally Posted by SteelyGlint View Post
    As the game progresses, I'd like cities to slowly wax or wane in power based partially on how involved they are in the flow of trade. ... So, how do I determine which cities prosper due to trade? How do I determine which nations (groups of cities) prosper due to trade? How can cities or merchant organizations attempt to control trade to their advantage (naval power)?
    Again, begin involved in trade is less of an issue than economic development. Basically, it comes down to four (and one bonus) steps:

    1. You export something. Initially, at least, this is usually natural resources (mined silver, sea fish, salt, whatever). Being able to export means that you have more than you need.
    2. You can thus trade your exported goods with other cities (via merchants, trade routes, what have you). You buy things you want (or need), that you don't produce yourself.
    3. The key to the process is that it's cheaper to import the raw materials and process them yourself, than to import finished goods. So you see things like the development of a fine Flemish textile industry, replacing the importing of linens from southern Europe. This in turn has two effects:
      1. You no longer have to import linen.
      2. You can now export the textiles you make.

    4. These two factors mean that your city is bigger (by all of the textile manufacturers, and the people who make their shoes and candles and...), you can import something in lieu of the linen, and you can import even more stuff by selling your textiles.
    5. The additional bonus is that some of the textile manufacturers might now branch out into other fields (say, decorative lace) and you have have even more exports.

    I've tried to work out a way to simulate this process procedurally, but it's extremely difficult due to the fine-grained nature of the goods you have; basically, just having "precious metals" or "fine timber" isn't enough (what about the craftsmen that make the jewelery or build the oak-beamed manse?), and lumping all "luxury goods" together completely ignores the creative side of the process. Without economic development, trade is just "buy low - sell high", which can be a fun game, but is pretty much completely solvable (with something like solving a Walrasian system of equations for the equilibrium prices).

    So, in short: The process of "trade" can be broken up into static and dynamic processes. In the static simulation, it's pretty simple, because what is produced where doesn't change; even fluctuations like land routes closing or cities being besieged will have only short-lived effects. If you want trade to affect the economic fortunes of cities, you need a much more fine-grained analysis, simulating the economic life of each city, and allowing novel goods to appear; this is difficult to do.

  6. #6

    Default

    In addition to this fine explanation: It depends on how long you intend to play. What settlements produce won't change overnight.

  7. #7

    Default

    Thanks for your input.

    I'm trying to get a handle on how the three main wealth creation/allocation avenues interact, and what results their interactions have with regard to city populations and the flow of history. The three avenues I'm referring to here are raw production (agriculture, mining, forestry, fishing, etc.), manufacturing (metalworking, textiles, brewing, crafts, etc.) and trade. To use your words, production would be fairly static, manufacturing would be somewhat more dynamic, and trade would be the most dynamic of the three. Each layer is interrelated with the other two.

    I'd guess that what you're saying is that the development of guilds and their associated industries within each city are more important than the trade that occurs with other cities. I imagine that manufacturing industries would generally spring up in close proximity to the raw materials they require; textile guilds near supplies of wool or flax for instance.

    I'm also trying to figure out how to decide where manufacturing centers arise, since they're at least as important as centers of trade. Perhaps this whole problem could be divided into a three layer system as I mentioned above: production arranged semi-randomly based on biome, manufacturing appearing initially near raw materials, and trade allowing manufacturing centers to compete. I'm open to suggestions on how to model the growth or failure of guilds and manufacturing, especially concerning how they relate to trade.

    When I mentioned fine timber, I was actually trying to draw a distinction between the kind of wood that would be used for firewood or simple construction versus the great beams needed for the roof of a cathedral or the keel or mast of a ship. This might be important in a province analogous to Holland, with a large shipbuilding industry and insufficient forests to supply it.

    I don't need to simulate everything perfectly; I just want to produce something that's not completely unrealistic.

    To that end, I've divided goods into a number of categories. Goods like food locally depress the demand for similar goods, and low value goods like bricks are unlikely to be traded. The categories are food (cheese, fish, fruit, grain, livestock, salt), intoxicants (beer, coffee, opium, tea, tobacco, wine), construction materials (bricks, stone, wood, fine stone like marble, fine timber for ships), textiles (cotton, flax, furs, silk, wool), metal goods (armor, tools, weapons), and luxuries (books, dyes, glass, incense, jewelry, perfume, porcelain, spices).

    Obviously, things can always be more finely divided or grouped differently and I'm open to suggestions. But I'm mainly interested in continuing the discussion of what leads to the growth of city populations, industries, and trade.

    Quote Originally Posted by Al. I. Cuza
    In addition to this fine explanation: It depends on how long you intend to play. What settlements produce won't change overnight.
    The time scale could extend out to multiple lifetimes, though probably not more than 200 years.

  8. #8

    Default

    Little observation: Big manufacturing centers were usually also big trade hubs. Or at least in very close proximity. Because there you would have everything you needed.

  9. #9
    Guild Journeyer
    Join Date
    Aug 2008
    Location
    Cleveland, Oh
    Posts
    153

    Default

    In my unprofessional opinion you need to develop a base cost for all materials that are to be traded. You then need to create a rating system to determine the base scarcity or abundance of the material for each province. Next would be the time scale for change either monthly or seasonal. Then you would have to create a chart for the events that could occur and the modifiers that they could apply to the product war, poor harvest, boom etc. Further more you would have to determine a base population for the provinces and the modifiers that could occur due to events plagues , war, economic expansion.

    you obviously know all of this but start with the baseline and then go from there. If you do not have the base then the rest seems overwhelming in my opinion. Unless your players are really into this then it really have no value besides an intellectual exercise. Good luck

    The other method that i have seen as functional was used to the darksun traders book that left the values fixed until the players arrived at a location and then the random factor was determined this simulated the effects of random actions upon arrival not predetermined values that do not directly affect the characters. But it is your world .

  10. #10

    Default

    For my random Traveller subsector maps I connected each A, B, or C type starport with up to two random nearest neighbors of the same or better type; lower types are left unconnected. This typically results in treelike connectivity (though loops occasionally form) with A ports being hubs for B ports, which are in turn hubs for C ports. It's a pretty simple algorithm and seems to give reasonable-looking results.

    It's not as involved as what you're trying to do, but maybe you'd find the basic idea applicable at some level -- connecting cities to random nearest neighbors of the same or greater population would give the same kind of routes.
    Last edited by isomage; 02-27-2010 at 10:58 PM.
    My random map generators and GIMP scripts: http://axiscity.hexamon.net/users/isomage/

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •