View Issue Details

IDProjectCategoryView StatusLast Update
0006012Dwarf FortressDwarf Mode -- Itemspublic2014-08-07 17:23
Reporterag Assigned ToToady One  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.34.11 
Fixed in Version0.40.07 
Summary0006012: Temperature updates for items in containers never stabilize.
DescriptionItems are supposed to reach the temperature of the environment within reasonably short time, and cease being updated. Instead, the process reaches a boundary 1 temperature unit away from the environment and never progresses further, thus forcing updates to continue forever.

The issue is caused by interaction between update from environment, and update from other items in the container. The container temperature update is done in a vmethod that performs the following steps (assuming environment temp is 10015, and the bin is 10016):

1. Average temperature for all items in bin is computed: 10016
2. Items are updated from environment 10015; the delta amounts to -0:001, moving them to 10015:499.
3. Items are updated from the average 10016; the delta is +0:001, restoring the original temp.
4. Bin is updated from average 10016, reaching 10016.
5. Bin is updated from environment, returning to 10015:499.

(the notation is "temperature:fraction")

The end state is exactly equivalent to the initial, yet the needs update flag is confirmed.
Steps To ReproduceFind a bin with items underground and set all temperatures to 10100. Observe them quickly reach 10016 (assuming environment is 10015) and stop there. The bin itself will stop at 10015:499, or whatever the right fraction for it will be.
Additional InformationMy profiling of a few large forts suggests that temperature updates for items are the topmost source of lag there, along with unit temperature updates, unit friend-or-foe checks, and pathfinding; so I think this issue warrants attention.

A similar problem may exist with spatters on items, but I didn't investigate closely.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2012-06-12 00:14 ag New Issue
2014-08-07 10:15 user6 Assigned To => user6
2014-08-07 10:15 user6 Status new => confirmed
2014-08-07 15:40 Toady One Status confirmed => resolved
2014-08-07 15:40 Toady One Fixed in Version => Next Version
2014-08-07 15:40 Toady One Resolution open => fixed
2014-08-07 15:40 Toady One Assigned To user6 => Toady One