On Jan 12, 2004, at 10:21 AM, Gary Stainburn wrote:

I'm trying to model a very simple neural net, where the changes in one block
affect all of it's neighbours. e.g. If one block becomes occupied the signal
to enter it should change to red. The signal of the block in rear should
change to caution.


Any train occupying the block in rear would have to stop.

If a signaller in a signalbox throw a lever to set a call-ahead signal, the
train should be able to draw forward.


Thus:

Just throwing out more ideas below. Remember that I've already admitted to knowing very little about this.


* blocks must be able to talk to each other

Would each block having a link to the blocks next to it (think linked list) cover the needed information?


* blocks must be able to read signals

Or get passed the needed signal information when they are being called on to do something.


* levers must be allowed to set signals (and points/switches)

This makes me wonder if Lever really needs to be it's own class or just methods of other classes.


* signalboxes must be able to own blocks, points, signals, and levers
        (a signalman can only throw his own signals)

This sounds like an excellent choke point to manage all these things.


As you can see, there is a hell of a lot of cross-object talk which is why I
decided to put everything in to one namespace.

Well, objects that couldn't talk to each other would be pretty darn boring. Cross talk is okay. That's how the real Trainset works after all, right?


James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to