.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #34  
Old August 30th, 2001, 02:43 AM

Guest
 
Posts: n/a
Default Re: OT - bored with gaming ? Get philosophy!

There are many variations on this theme. I use 'C' language structures here. I use [n] to indicate an array. The size for any particular "n" depends on the span of the set.

struct node
{
lea_node struct leaf*;
twi_node struct twig*;
bra_node struct branch*;
tru_node struct trunk*;
}

struct link
{
traffic_cur int;/* number of packets sent during current time cycle */
traffic_pre int[n];/* number of packets sent during previous time cycles */
tra_index int;/* index to traffic_pre */
bandwidth int;/* load factor allocation */
timestamp long;/* time at which counter traffic_cur began to run */
}
Note : A history buffer is used to avoid thrashing caused by transient traffic spikes

struct trunk
{
tru_trunk struct trunk*;/* pointer to next processor partition */
capacity int;/* Processor instruction execution ability in current partition */
utilization int;/* useful operations performed during current time cycle */
running_total int;/* total utilization during Last n cycles */
timestamp long;/* time at which counter utilization began to run */
branches struct branch *[n];
links struct link [n];
}
Note : new running_total = utilization + running_total * (n-1)/n.

struct branch
{
twigs struct twig * [n];
links struct link [n];
}

struct twig
{
leaves struct leaf * [n];
links struct link [n];
}

struct leaf
{
linkup struct node * [n];
links struct link [n];
}

If someone else is already doing this, then PROVE it by pointing to a history.

In any case, this is the Last "that" you get for free...
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:29 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.