swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Chicken and egg problem


From: Sven Thommesen
Subject: Chicken and egg problem
Date: Mon, 22 Jul 1996 13:24:47 -0700

Manor,

as a follow-up to my two messages from last Tuesday, here's another 
conundrum I've identified.

Again, in module HeatbugObserverSwarm, in method buildObjects:

        ...
        // create the ModelSwarm
        modelZone = [Zone create: self getZone]];
        heatbugModelSwarm = [HeatbugModelZone create: modelZone];
        // create probe displays
        [probeDisplayManager createProbeDisplayFor: heatbugModelSwarm];
        [probeDisplayManager createProbeDisplayFor: self];
        // wait for user to set parameters and hit 'go'
        [controlPanel waitForControlEvent];
        if ([controlPanel getState] == ControlStateQuit) return self;
        // let model swarm build its objects (including sub-swarms ...)
        [heatbugModelSwarm buildObjects];
        ...

The problem is this: you wait for the user to set parameters, then create 
the objects for ModelSwarm. But what if there are sub-swarms of 
ModelSwarm, on which we want probes and for which the user needs to set 
parameters before we 'go'? Perhaps the number and types of sub-swarms are 
governed by the user-set parameters? We appear to need a multi-stage 'go' 
...

As I stated in my second message on Tuesday, we also seem to want to put 
probe creation *after* all calls to buildObjects.

Please tell me if the following scheme would work:

        // create the ModelSwarm
        modelZone = [Zone create: self getZone]];
        heatbugModelSwarm = [HeatbugModelZone create: modelZone];
        // let model swarm build its objects (including sub-swarms ...)
        [heatbugModelSwarm buildObjects];
        // create probe displays
        [probeDisplayManager createProbeDisplayFor: heatbugModelSwarm];
        // --> create probe display for subswarms of modelswarm ... ?
        // --> should be done in ObserverSwarm, right ?
        [probeDisplayManager createProbeDisplayFor: self];
        // wait for user to set parameters and hit 'go'
        [controlPanel waitForControlEvent];
        if ([controlPanel getState] == ControlStateQuit) return self;
        
This takes care of the logical progression IF the set of sub-swarms is 
fixed and given. BUT it still does not take care of the need for a 
multi-stage 'go' described above ...

Hope y'all had a nice time in SF !

--Sven


reply via email to

[Prev in Thread] Current Thread [Next in Thread]