Find a more meaningful way to to calculate the productivity for productionsites

Bug #1316929 reported by Astuur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Wishlist
Unassigned

Bug Description

This closely related to Bug #571796 from 2010.

The percentages that are displayed with production sites when pressing "s" are basically an accounting of successful versus failed attempts to produce a ware for the last 20 such events.
A produced ware increases the percentage by 5%, a failed attempt lowers it by the same amount.
Time doesn't factor in there at all.

In effect, a site that has not produced anything for an hour (economy don't need ...) but had 20 successful production cycles before that time, will still show 100% productivity.
I think that is hard to interpret for newcomers, maybe even misleading and not so useful.

It may be time to overcome and replace this strange calculation with a better, more meaningful solution
that more closely reflects the "real" productivity.

What I consider a "real" productivity, would be a ratio of actual current performance in relation to the site's maximum possible performance, as determined from its conf file. Where performance is measured in "ware output" per period of time.

Advantages:
* It would be easier and more natural to interpret.
* It would more closely reflect the current state of of your economy.
* It would be helpful to decide whether you need to build more similar production sites.
* It would allow to display the percentage without the 5% granularity
* It could also eliminate the disturbing on/off characteristic in the wares statistic display, that you get at higher time resolutions, if that graph was based on these numbers in a separate adjustment.

Example (programers will find a better way to do it)

Each production site should save its successful production events in a buffer together with a timestamp.

The maximum performance for each production site should be calculated:
For this, all relevant time periods should be summed up to calculate the minimum time needed
Example: (Barbarian granitemine)

[work]
consume=ration
sleep=20000
animate=working 20000
mine=granit 2 100 10 2
produce=raw_stone:2

Obviously one production cycle needs 40000 ms and produces 2 raw stones.
That is 20 sec for one stone, or 30 in a period of 10 minutes.

Now look up the site's buffer and calculate how many successful production events it had within a the last 10 minutes.
If there have been 5, the productivity is 5/30 or 16.6 %.
The calculation could be done every minute or so and rounded to full percents.

The maximum performance values will not be exact for those workers that walk a variable distance (lumberjacks, quarry stone masons, farmers) but still more useful than what we have.

Revision history for this message
SirVer (sirver) wrote :

What about sites that produce more than one ware? (i.e. axe factory). What about trainingsites - does the productivity drop when there are no soldiers to train too? What about stopped sites, should the productivity drain there too?

I think it would be nice to have a productivity view for each program in a site. So you could compare the productivity for say smelting gold vs smelting iron in a tab in the building view. The shown productivity could then just be the average rounded to full percent.

Figuring out the production cycle is not totally easy though - it means to run the production, assuming all conditions are green and time how long it takes (of course this could be done in simulation on loading). The conf file can be arbitrarily complex and solving for the run time without running the program is not possible without solving the halting problem I think.

Changed in widelands:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

I am reluctant to setting this to confirmed. I think it is important, but there is no actionable way forward right now I fear. Setting to incomplete for more discussion.

Changed in widelands:
status: Expired → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver)
Changed in widelands:
status: Expired → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.