neweff production: Consider insufficient food

newe() and prod() duplicate parts of the update's do_feed(), except
they round babies down instead of randomly, to get a stable,
conservative forecast.  Unlike the update, they assume sufficient
food.  Inaccurate for sectors that are going to starve or have
suboptimal population growth.  Not documented.  Has always been that
way.

Eliminate the undocumented assumption by replacing the duplicate code
by a call of do_feed().  Add a suitable parameter to do_feed() to
preserve the different rounding.

The update test shows the improvement.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-06-04 09:50:09 +02:00
parent 43fc32a365
commit 41a2f7d1df
6 changed files with 40 additions and 56 deletions

View file

@ -62,12 +62,12 @@
Play#1 output Play#1 1 10,0 + 100%
Play#1 output Play#1 1 12,0 + 100%
Play#1 output Play#1 1 14,0 + 100%
Play#1 output Play#1 1 1,1 + 86%
Play#1 output Play#1 1 3,1 + 86%
Play#1 output Play#1 1 5,1 + 86%
Play#1 output Play#1 1 7,1 + 64%
Play#1 output Play#1 1 9,1 + 20%
Play#1 output Play#1 1 11,1 + 16%
Play#1 output Play#1 1 1,1 + 73%
Play#1 output Play#1 1 3,1 + 73%
Play#1 output Play#1 1 5,1 + 73%
Play#1 output Play#1 1 7,1 + 58%
Play#1 output Play#1 1 9,1 + 16%
Play#1 output Play#1 1 11,1 + 13%
Play#1 output Play#1 1 13,1 a 100%
Play#1 output Play#1 1 15,1 a 100%
Play#1 output Play#1 1 2,2 g 88%
@ -132,7 +132,7 @@
Play#1 output Play#1 1 Thu Jan 1 00:00:00 1970
Play#1 output Play#1 1 PRODUCTION SIMULATION
Play#1 output Play#1 1 sect des eff avail make p.e. cost use1 use2 use3 max1 max2 max3 max
Play#1 output Play#1 1 13,1 a 100% 26 214f 8.25 $0 214
Play#1 output Play#1 1 13,1 a 100% 20 165f 8.25 $0 165
Play#1 output Play#1 1 15,1 a 100% 12 99f 8.25 $0 99
Play#1 output Play#1 1 2,2 g 0% 4 0d 1.00 $0 0
Play#1 output Play#1 1 9,3 e 100% 93 0m 1.00 $0 0c 0c 0