News:

SimuTranslator
Make Simutrans speak your language.

Simple transportation from industry A to industry B

Started by jimishol, August 03, 2022, 06:22:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jimishol

I started a new game some days ago.
On first day i thought 'well, the game basically asks from me to transport goods from A to B multiple times. How should i react so as not to fail fast?'.
I had some thoughts, i made some notes.
This process, that i consider as game play time, was fun, at least for me.
I am about to continue with the main game process. This means, i will press the "Power" button on my PC to power it on.
I hope you will find right my idea to share 16 pages of notes with this forum.
If it seems 'Too Long to Read', there is no need for a reply. I share my notes as ".pdf" file and as a ".tex" for those that would like to correct, edit, delete or create their own notes, not starting from scratch.
I am not in any way specialist on the subject. I am just a player.
For this reason
there is no warranty of any kind for the rightness of my notes on the subject. The entire risk as to the quality and accuracy of my writings is with you. Should be my notes prove defective on your game play, you assume the cost of all frustrations and necessary servicing, repair or correction of your, because of my notes, ruined game.  ;) 
 
P.S.
I renamed from_AtoB.tex to from_AtoB.txt in order to be able to attach it here. Rename it back to ".tex". It can be edited by any program that uses latex.
pdf is here AtoB.pdf

KneeOn

I don't understand much of what was there and I'm sure others who know how the game engine works will be able to contribute a lot more however it was interesting to read just how complex the units are.

Balancing all of the costs Vs the revenue is hard enough without having to do it against time and distance. 

I hope others will be able to pick apart what you've written, it might prove to be invaluable in determining balancing guides!

jimishol

#2
Come on!
All I wanted was to create few simple notes for simple transportation of goods from A to B. I did not expected that such a task could be proved so complex!
I started, at last, my real game and, upon deciding what industry to take care first, I run upon "apothecary".  So, for the kind of completeness, I am forced to postpone my game again.
Apothecary
In my notes, the assumptions was that one can not be payed for more than the production or more than the consumption. On dealing with "demand" the assumption was 'do not let production or consumption stop'. Thus one would transfer the maximum of possible products and maximize his rewards.
Apothecary has storage zero!. So, production will stop anyway once products are delivered (and continue after all products are consumed). So, if production will stop, don't bother at all. Why the game introduced apothecary without storage? It is not only that production stops just after delivery but it will not start till all previous delivered products is consumed. Additionally, with no products in stock, consumption stops as soon as production starts and will remain stopped until next delivery.

Let schedule on 100% load a convoy with capacity 'cp'. I created a table, to follow what happens, with time, vegetable storage, apothecary storage and cargo on convoys, all just after examined times. The assumption on which I worked was that upon returning the convoy to farm after delivery, there was still products to be consumed.

It turns out that no matter what is the capacity of convoys, the power of them to carry goods per month is always consumption*production/(consumption+production).  They will be paid only for that and not for the whole consumption, as it should be falsely assumed in the first place. The average velocity would be such that distance "l" is covered in
L=cp/2*consumption*production/(consumption+production) months

The revenue per month is
Revenue=consumption*production/(consumption+production)*l*(ppd-2*n*cpd/cp)-n*cpm

I trust the above formula only with the assumptions I mentioned and when n=1. That is when the above final flow of consumption*production/(consumption+production) per month is below the capabilities of my convoys and I do not need more than 1 to achieve it.

Lets start play! :D

P.S.
My apothecary needs 4crates per month, 5 farms produce 0.7, 0.7, 1, 1, 1.8 vegetables per month. But they do not produce their sum 5.2 per month actually.
If the above formula for power is applied to each of the line and sum the results, the final result is that the farms produce 4.03 vegetables per month. As the apothecary demands. It can not be coincidence. It is coincidence. Anyway, I believe that the object of the game is so complicated that formulas should be considered tools and not spoilers. That is why i dared to suggest some. Thank you.

PJMack

There are some formulas related to game-play scattered throughout the forum which I agree would benefit consolidation into a single place, however in some cases the formulas are were done with older versions of Simutrans or Simutrans extended so one must double-check with the actual code. 

The apothecary is not supposed to have a storage capacity of zero, that is probably a bug somewhere, and for that case I would recommend saving, switching to public player (There is a known intermittent issue with the GUI when switching players), deleting the offending apothecary, then switch back to the "default" player.

As for calculation of industry shipment, there is some entropy, feedback loops, and rounding involved.
Industry production is at a fixed rate per month, but production does stop when an industry lacks requisite goods, lacks staffing (except for rural producers), or the output goods are full.  Consumers only consume goods in proportion to customers, but manufacturers consumer goods as goods are produced.  Goods are only shipped when there is an cargo route between the origin and destination.  How much goods are shipped per month depends on the average estimated lead time between the producers to the consumer per good type.  The estimated lead time calculation is ridiculously complex but an oversimplification of it is the sum of all expected wait times and expected journey times.

jimishol

Thank you PJMack
Formulas can be game related or theoretical, such as v=l/t or that a vehicle can carry half his capacity per time (https://forum.simutrans.com/index.php/topic,21826.0.html) as i claim in my notes. So, update might need only the first ones. In any case, all can benefit from knowing them.

I read in posts that many experienced players chose to destroy 'harmful' industries. I do not understand exactly why, if the is no line connecting them. Is it because they will be targets of destinations in any case and alter harmfully some indexes the game uses to calibrate the world?

I understood clearly your last paragraph but i want to ask something that puzzles me. Say an industry needs 5 suppliers to satisfy 100% of her needs. If player chooses to connect only 3 of them and satisfy the 60% of industry needs. What will happen in future. Will the 60% satisfaction stay stable? If industry drop her needs to 60% and split it to 5 suppliers again, the 3 active suppliers will sent lower and lower products and production will eventually stop. If she splits her new 60% nneds only to the 3 connected suppliers, the production will be stable at 60% of the initial one.

PJMack

Deleting a useless industry does allow for more (potentially useful) industries to be created.  Currently, the industry code will introduce up to four new chains per month if the the number of industries per capita is too low.  The industry generation code sometimes places industries that would never be profitable to service, or outright impossible.  An example of the former would be a vegetable farm in the middle of a desert island which would require creating a road up to the farm (destroying expensive farmland tiles), to the shore with a dock and creating a depot just for a vehicle to get from the farm to the dock to be sailed to the mainland.  Another example is where a fishing port is on the coast to a different sea than the fishing grounds.  A more debatable scenario is where a player would be 90% of the way to completing a high speed rail line and an industry just happens to appear right where he/she was about to lay the final tracks.

As to under-supplied consumers, they will remain stable at the reduced supply.  As new suppliers become active, they will supply the consumer until the original demand is met.  The only reasons that demand would reduce below the original would be if the industry upgrades to one that needs less of that particular good.

jimishol

#6
The main concept in my pdf file, even somehow complex, seemed small in my head. I didn't like the idea that took 16 pages to be written.
I decided to rewrite it, removing any collateral but essentially irrelevant reflection. New version is much more comprehensive with more strict and clear approach. For those that are bored to read it, this is a summary. The final formula for revenue per month is what one could easily suggest without any theoretical approach. The intermediate result though, that the transportation that a convoy creates, is created only by the half of his loaded cargo, is anti-instinctive. Because of that I, and probably many new players, on the start of their game play used convoys with half the capacity than that they actually needed.
The new edition of pdf is here
I attach his .tex file as .txt. If you download it, rename it to .tex before you use it.