News:

SimuTranslator
Make Simutrans speak your language.

JIT2 demand based production rate scaling

Started by DrSuperGood, December 20, 2017, 06:55:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

I have just committed changes which add demand based production rate scaling to JIT2.

Previously JIT2 worked entirely on supply based production rate scaling, a concept inherited from JIT0/1. As the outputs of a factory fill up with product, the rate of production of the product starts to decrease. Since JIT2 limits ordering using a demand buffer this allows factories to produce at around the rate of demand continuously rather than in large uncontrolled batches. For factories with no outputs, eg a shop, this production rate limit had to be assumed to be 100%.

In a situation where there is an over supply of product everything works perfectly. All factories work constantly, producing approximatly at the rate of consumption. However, if there is a situation of under supply then a factory will use up all product as it arrives trying to meet the desired production rate and then sit idle for an extended period resulting in pulse width modulation like factory activity. Not only does it look ugly but it also plays havoc with power management as power stations and consumer switch on and off maximum supply/load values causing huge spikes.

This is where demand based production rate scaling helps. Demand based production rate scaling throttles back factory production rate as demand buffers fill up. This limits the factory to producing at the rate goods are supplied allowing them to consume constantly rather than in large uncontrolled batches.

By combining both these features factories are allowed to work continiously in most cases. A shop that is under supplied will continiously consume product at some fraction of its potential rate. A supplier will operate continiously to produce only at the rate its products are consumed. A factory that takes inputs to produce outputs will limit to either demand or supply depending on which bottlenecks. Even power plants will throttle back energy production in the case of under supply allowing them to provide power both reliably and continuously.

To reflect this new mechanic JIT2 factory infomation has been revised. The cryptic input demand buffers are no longer visible to users. Instead both inputs and outputs of a factory display a production rate limit percentage. In the case of an input a value less than 100% means that there is an under supply of the product to the factory, it might be a good idea to transport more goods from another supplier. In the case of an output a value less than 100% means that there is an oversupply of the product from the factory, it might be a good idea to send its goods to more consumers.

I also added a per minute (I think...) production rate to the factory information UI. Unlike the per month information which changes based on month length, the per minute will remain the same for any month length and reflects the balance of the pakset for that factory. This makes it more clear to users how often they can expect products to/from a factory rather than some cryptic monthly amount.

I have done some rough testing of the new JIT2 feature and everything appears to work. However I cannot rule out any small or obscure bugs. As such I encourage people using JIT2 to try out the next nightly and provide feedback. As with all nightly tests, it is recommended that you backup any important save files to avoid losing them in case of a critical bug.

Ters

I am a bit concerned about involving yet another time scale into the game. I don't think anything else in the game relates directly to real-world time. If so, this kind of breaks the fourth wall. Some people might be confused if it is in-game minutes, or real-world minutes.

I am a bit confused in the fourth paragraph. It starts out with "demand", but ends up with "supply".

DrSuperGood

QuoteI am a bit concerned about involving yet another time scale into the game. I don't think anything else in the game relates directly to real-world time. If so, this kind of breaks the fourth wall. Some people might be confused if it is in-game minutes, or real-world minutes.
The problem is currently there is no real sense of time or production rate. One sees a factory which produces 1,000 units per month and have little idea how much that actually is until months have passed. One is not even sure how long a month is until one spends several game months playing.

The idea is to supply a time invariant view of how productive a factory is. If months are short or long it does not matter. If the game is speed up or slowed down it does not matter, as that usually does not happen in multiplayer anyway.
QuoteI am a bit confused in the fourth paragraph. It starts out with "demand", but ends up with "supply".
Supply based production rate limiting limits production to approximately the rate other industries demand the goods. Demand based production rate limiting limits production to approximately the rate other industries supply the goods. This allows a factory to operate smoothly in both under supply of inputs and over supply of output bottleneck situations. Without them a factory will be prone to on-off cycling with a duty cycle.

Ters

Quote from: DrSuperGood on December 21, 2017, 12:35:45 AM
The problem is currently there is no real sense of time or production rate. One sees a factory which produces 1,000 units per month and have little idea how much that actually is until months have passed. One is not even sure how long a month is until one spends several game months playing.

I'm still not sure how long a minute is, despite decades of living. They seem to constantly keep changing length. When playing Simutrans, they are usually shorter than normal. I simply keep adding trains as long as the station fills up, until the first train comes back after completing a round-trip. Others may perhaps play with a stop watch, just like I have a vehicle profitability calculator. I thought that strategy would work even better with JIT2 than JIT1 (or rather would work with JIT2, as it doesn't quite work with JIT1).

Quote from: DrSuperGood on December 21, 2017, 12:35:45 AM
Supply based production rate limiting limits production to approximately the rate other industries demand the goods. Demand based production rate limiting limits production to approximately the rate other industries supply the goods. This allows a factory to operate smoothly in both under supply of inputs and over supply of output bottleneck situations. Without them a factory will be prone to on-off cycling with a duty cycle.

Supply based limiting is based on demand, and demand based limiting is based on supply? It's no wonder I was confused.

gauthier

Imho, monthly production rate is fairly understandable and I'm used to it. Why not let both values ?