using names before they're defined

davehowey at f2s.com davehowey at f2s.com
Wed Jul 19 11:49:35 EDT 2006


Iain, thanks - very helpful.

Really I'm trying to write a simulation program that goes through a
number of objects that are linked to one another and does calculations
at each object. The calculations might be backwards or fowards (i.e.
starting at the supply or demand ends of the system and then working
through the objects). And also, I might have multiple objects linked to
a single object (upstream or downstream) - e.g. compressor -- multiple
combusters - turbine

I like your idea of using something like a setStreams method to
establish the linking. The streams do reflect each other, although
having many-to-one and vice versa will complicate that. I have not
quite got my head around having multiple links. In C++ I would be
thinking about something like a linked-list but I'm not sure that's the
right approach here.

Dave




More information about the Python-list mailing list