Topic: Fixing "Calculation Needed"
WorldSavior |
Posted at: 2019-11-24, 15:47
@JJG: You're welcome. And thanks for your posts
Not exactly, to be precise
Is this bug not fixed already? I think that it build19 it was like that, but in build20 skipping doesn't take any non-neglectable time.
If one could distinguish if a building has low productivity because of missing wares or missing need, this would be a good feature. Or even if one couldn't distinguish it. However, the productivity numbers are broken anyway, so maybe we need a better implementation... Wanted to save the world, then I got widetracked Top Quote |
stonerl |
Posted at: 2019-11-24, 18:11
The skip bug is solved since build 20. The way skips work is quite simple. A production program gets started and it checks whether the wäre isbnwededbor Not. If the economy doesn't need the ware itbskips the production and the programm ends. Before the program gets started again the logic checks whether the program finished with a skipped and whether this skip was more then 10 seconds ago. If not, the program doesn't get started. If it is more than 10 seconds since the program got skipped, it is removed from the skipped stack and started again. Top Quote |
JJG Topic Opener |
Posted at: 2019-11-25, 00:49
My goal is to fix the productivity numbers that now show in the help as "Calculation needed". Did you means something other than that? Edited: 2019-11-25, 01:05
Top Quote |
GunChleoc |
Posted at: 2020-01-03, 14:01
production_program.cc is the one. Ideally, we would have some doce in there that will calculate it for us, so we won't have to recalculate whenever we change a program. Some production programs also call worker programs, in which case the average walking speed depending on work area radius becomes important. playsound is just a trigger and doesn't cost any time. Busy indexing nil values Top Quote |
JJG Topic Opener |
Posted at: 2020-01-08, 02:52
Good tips, thanks. Production speed data like this is currently missing or hard coded as independent values, prone to get stale, but simplest to implement. - With sufficient coding, it could be calculated at run-time, which increases startup time and isn't needed. - With sufficient compiler macros, it could be calculated at compile-time, probably better than run-time. - My goal is to write a perl script to create the missing data as hard coded independent values, so someone can run the script before releasing the code before compile-time. I counted 384 production building lua files, lets assume 200 of them need updating. I haven't climbed the learning curve for code updates yet. -- "decades are not cardinally numbered" Top Quote |
hessenfarmer |
Posted at: 2020-01-09, 12:48
Hi JJG, while going over our bug list in github I found some very useful information. see https://www.widelands.org/forum/topic/4523/ and https://github.com/widelands/widelands/issues/3437 so there are 2 basic ways of calculating performance. Edited: 2020-01-09, 12:48
Top Quote |