Code center > Bugs and fixes

Energy keeps entering

<< < (3/4) > >>

Testlund:
Hey, the shapes are a very nice feature! You can do a lot of things with them. A lot better than the wall drawing tool.  

Testlund:
I've been testing 2.42.7 now, but I think the NRG/body feature still acts weird. It's more like turning it on or off. For instance, if I set the slider to 0 and start a new sim then 1000 nrg goes into the veggies body but if I set any other value then all energy goes into body. I whould have expected that when I set it to 10, then 10 % of 32000 should go into the body, wich is 3200.  

Actually, I discovered that what the slider does is setting the SPEED at wich 32000 nrg will enter the body.  

Have I missunderstood something here again?  

EricL:
I just stepped through the code and it looks to me like it is doing the right thing.  Here is the relevant code:


--- Code: --- Case 0 'per veg
        Energy = tok * (1 - SimOpts.VegFeedingToBody)
        body = (tok * SimOpts.VegFeedingToBody) / 10
      Case 1 'per kilobody
        Energy = tok * (1 - SimOpts.VegFeedingToBody) * rob(t).body / 1000
        body = (tok * (SimOpts.VegFeedingToBody) * rob(t).body / 1000) / 10
      Case 2 'quadratically based on body.  
        tok = tok * ((rob(t).body ^ 2 * Constant) + (1 - Constant * 1000 * 1000))
        Energy = tok * (1 - SimOpts.VegFeedingToBody)
        body = (tok * SimOpts.VegFeedingToBody) / 10
      End Select
      rob(t).nrg = rob(t).nrg + Energy
      rob(t).body = rob(t).body + body
--- End code ---

So, if using normal per cycle feeding, if you have it set for 1000nrg/cycle/veg and move the slider to 10, then 90% of the 1000 will go to nrg and 10% of the 1000 will go to body.  nrg will go up by 900 per cycle and body will go up by 10 per cycle (not 100.  It takes 10 units of nrg to make 1 unit of body).

Testlund:
So that's how it works! I allways use per kilobody point feeding wich I have set to 12. I found it worked the best for me several versions ago and I have never tried anything else after that.

Numsgil:
Per kilobody makes the most sense I think from a biological point of view.  You would expect larger cells to have more surface area, and thus produce more energy.  It also discourages cancer, which is a fairly lame adaptation.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version