From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7165 invoked by alias); 5 Sep 2004 22:30:22 -0000 Mailing-List: contact xconq7-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sources.redhat.com Received: (qmail 7158 invoked from network); 5 Sep 2004 22:30:21 -0000 Received: from unknown (HELO sccrmhc12.comcast.net) (204.127.202.56) by sourceware.org with SMTP; 5 Sep 2004 22:30:21 -0000 Received: from [192.168.181.128] (c-67-172-156-222.client.comcast.net[67.172.156.222]) by comcast.net (sccrmhc12) with ESMTP id <20040905223021012000q5uge>; Sun, 5 Sep 2004 22:30:21 +0000 Message-ID: <413B937C.9060609@phy.cmich.edu> Date: Mon, 06 Sep 2004 18:51:00 -0000 From: Eric McDonald User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) MIME-Version: 1.0 To: Lincoln Peters CC: Xconq list Subject: Re: Calculating net material production References: <1094422286.4338.21419.camel@localhost> In-Reply-To: <1094422286.4338.21419.camel@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg01126.txt.bz2 Lincoln Peters wrote: > Is there any code already in place to track such statistics? Or will I > have to perform deeper code surgery to do this? I think there is already something that sums up total materials possessed by a side. It is used in the materials display beneath the units type list in the Tcl/Tk interface. If the basic calculation behind this is not already in the kernel, then it could probably be moved there, and you could call it at the end of each turn and update some arrays (of length 'nummtypes') that would allow you to maintain a running average of the rates of production: m_prod_avg[m] += (m_at_turn_end[m] - m_at_last_turn_end[m]) / 2; or something like that. Eric