Code center > Bug reports

2.42.7 bugs/questions

(1/4) > >>

Griz:
2.42.7
questions on energy management:

if I set the day/night cycle to 1000
and
Sun comes up if nrg < 1000000
[sun forced down not enabled]
and
start with a total energy or ~ 750000 ...
the sun is indeed 'forced up' until energy rises above 1000000.
then, the 1000 dy/night cycle seems to come into play.
so far, so good.
this is what I would expect.

however ...
if I try the same with
Sun goes down if nrg > 1500000
[Sun forced up not enabled]
I find it cycles 'around' the 1500000 setting ...
in as little as a single cycle ...
up, down, up, down, up, down ....
with the day/night cycle seeming to never
be allowed to come into play.

here's what I expected:
that if I set
Sun goes down if nrg > 1500000
and
Sun comes up if nrg < 1000000
that the energy would stay between those values ...
the sun forced down at 1500000 ...
the day/night cycle working in this area ...
the sun forced to rise if energy  fell below 1000000.
however ...
I again find it cycles 'around' the upper 1500000 setting ...
the sun rising/setting at nearly every cycle.
 
what am I misunderstanding here?

attaching the zipped sim where it does this ...
cycles around that upper setting.
it uses a MultiVeg and some bots
that circle clockwise ...
I can provide those if you need them ...
although I guess you can snag their dna.

Griz:
while experimenting with this Energy sim  ...
got:
Error. This array is fixed or temporily locked.
had the energy graph open
including the error.zip

if I get time later today ...
will run it thru VB ...
but I'm not very good at debugging unless
it points it out directly.

Griz:
oops!
in that sim ...  2427CW
change the veg/nrg per cycle to something less than 200 ...
I was using 20 but forgot to alter it and resave.

EricL:
The nrg limts sound liej they are working correctly.  When the sim nrg cross the 1500000 sun down threshold, the sun is forced down and the day/night cycle is paused.  When it drops below this limit, the normal cycle is allowed to continue.   You probably have the autotroph nrg/cycle set so that when the sun is up there is a sizable net nrg increase in the sim so even one cycle of sunlight will push the nrg back above the limit, forcing the sun down again and exhibiting the single cycle oscillation you describe for up to 2000 cycles (1000 cycles of sunlight) and then nightime will arrive and the sim nrg will go down until dawn.

The locked array thing is a bug with the re-dimensioning the Shots array.  Not sure yet why it has started happening - I didn't touch the code, probalby timing related - but I think the locking has to do with a routine lower down on the stack accessing the array while it is re-dimensioned higher up the stack.  It's timing dependent and dependent on the number of shots.  Once a sim reaches a stable high water mark on shots, it won't happen since the array size won't need to be further increased so if you hit the bug, you shoudl hit it pretty early in a sim.

I will post a buddy drop once I have a solid fix, probably Wednesday.

Griz:

--- Quote from: EricL ---The nrg limts sound liej they are working correctly.  When the sim nrg cross the 1500000 sun down threshold, the sun is forced down and the day/night cycle is paused.  When it drops below this limit, the normal cycle is allowed to continue.   You probably have the autotroph nrg/cycle set so that when the sun is up there is a sizable net nrg increase in the sim so even one cycle of sunlight will push the nrg back above the limit, forcing the sun down again and exhibiting the single cycle oscillation you describe for up to 2000 cycles (1000 cycles of sunlight) and then nightime will arrive and the sim nrg will go down until dawn.
--- End quote ---
well ... I am having trouble seeing that ...
even with nrg/cycle set to 10.
with the day/night cycle disabled ... it certainly doesn't happen ...
as it is then always daylight between the upper/lower settings.
and with it enabled ...
it's as though the day/night cycle is reset to Sun Up every time
it drops below the upper limit ...
whereas it would be nice to have it be Night when comng 'down'.
it doesn't appear that the day/night count is independant ...
but is somehow reset by the sun up/down setpoints.
iow ... if I start a new sim with the day/night cycle set to 1000 ...
that 1000 doesn't begin to be counted until I go above the lower
energy level that is forcing the sun to be Up.
I can't tell if that happens when coming down from the upper limit ...
that should force the sun down.
 
if I were to set the day/night cycle to some very large value ...
might this give me a chance to see if it's working?
is there any limit?

maybe I'll be able to look at the code sometime this week ...
and see if I can finger out how you are doing this.
that's the only way it will make sense I guess ...
if I can somehow 'see' it.

if you've got a sim where you have observed it working ...
please zip it so I can see ... and believe.  

tanks

Navigation

[0] Message Index

[#] Next page

Go to full version