News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Web calculator for Standard cargo revenue (speed bonus, 12.5% floor), corrections welcome

Started by yulorien, November 14, 2026, 10:38:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yulorien

I built a browser calculator for per-trip cargo revenue in Simutrans-Standard (124.x / 125.x), and I would like people who know the formula better than I do to check it.

It follows ware_t::calc_revenue plus the (x + 1500) / 3000 conversion in the vehicle code:

kmh_base = floor(100 * convoy_kmh / ref_kmh) - 100
bonus    = max(125, 1000 + kmh_base * speed_bonus)
revenue  = floor((value * bonus * distance * amount + 1500) / 3000)

Inputs: pakset (Pak128, Pak64, Pak128.German), cargo, way type, year, convoy speed (the profit speed from the convoy window), Manhattan distance between halts, amount, trips per month. Output: revenue per trip and per month, the speed bonus in percent, a warning when the 12.5% floor applies, and a table of every cargo in the pakset sorted by revenue per unit per tile at your speed.

Worked example: Pak128 cars (value 170, speed_bonus 15), track in 2000 (ref 160 km/h), convoy at 200 km/h, 100 tiles, 50 cars. kmh_base = 25, bonus = 1375, revenue = floor((170 * 1375 * 100 * 50 + 1500) / 3000) = 389,583.

ref_kmh is interpolated between speedbonus.tab points the way vehicle_builder_t::get_speedbonus does it, for January of the year you enter; in-game it keeps creeping month by month, so later in a mid-curve year it reads a little higher. Standard only, no Extended. Running costs and maintenance are not modelled. The pakset tables were transcribed by hand.

It is a Simutrans cargo revenue calculator on my site, smart-calculators.net, which carries ads. If a value or curve is wrong, tell me which and I will fix it.

makie

A few notes from me on this:

In Pak128.german, vehicles have a fixed-cost component equal to 2% of their revenue. While that may not sound like much, it has a significant impact on profit within the game. A crucial factor here is the actual speed at which the vehicles are traveling; vehicles stuck in traffic still incur costs. Similarly, a high-speed train that cannot reach its top speed will generate little profit. Therefore, it is not always wise to simply choose the fastest train; instead, you should aim for a consistent mix of traffic on busy lines and, for heavy freight trains, you may opt for a more powerful locomotive. Furthermore, acceleration—such as after departing from a station or signals also affects costs; this is particularly relevant for local/short-haul transport.

The "Translator" can provide a cost forecast:
https://translator.simutrans.com/script/pakset_info.php
Look for the value labeled "rcost%e" on the right-hand side of the table.
This figure indicates what percentage of the revenue will be consumed by the vehicle's costs. A lower value translates to a higher profit.

The Translator is capable of even more: the contents of the columns in this table can be populated with arbitrary values. It is also possible to export the table as a CSV file using this method. It is well worth experimenting with this a bit. And there are no adds.

[de]
Anmerkungen von mir dazu:

Bei Pak128.german haben Fahrzeuge einen Fixkostenanteil von 2% des Ertrags. Da klingt nach nicht viel, hat im Spiel aber doch erhebliche Auswirkung auf den Gewinn. Entscheidend ist dabei mit welcher realen Geschwindigkeit die Fahrzeuge unterwegs sind. Fahrzeuge die im Stau stehen verursachen trotzdem Kosten. Auch ein Hochgeschwindigkeitszug der seine Höchstgeschwindigkeit nicht ausfahren kann, wird wenig Gewinn abwerfen. Deshalb ist nicht sinnvoll immer den schnellsten Zug zu nehmen, sondern auf vielbefahrenen Strecken für eine homogene Mischung zu sorgen und schwere Güterzüge lieber mit einer etwas stärkeren Lokomotive zu versehen. Auch die Beschleunigung nach Haltestellen, oder Signalen ist kostenrelevant. Zum Beispiel beim Nahverkehr.

Der Translator kann eine Kostenprognose abgeben:
https://translator.simutrans.com/script/pakset_info.php
Es ist der Wert "rcost%e" am rechten Rand der Tabelle.
Dieser Wert sagt wie viel Prozent des Ertrags diese Fahrzeug Kosten wird. Ein kleiner Wert bedeutet als höheren Gewinn.

Der Translator kann noch mehr: Der Inhalt der Spalten dieser Tabelle können wahlfrei mit Werten belegt werden. Auch ist es möglich auf diesen Weg die Tabelle als CSV zu exportieren. Es lohnt sich damit etwas zu experimentieren. Und es gibt hier keine Werbung.