Exforsys

Online Training

model train system

This is a discussion on model train system within the Software Patterns forums, part of the Testing category; how to model a train system to include track and, to begin with two trains. at present i have implemented ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-25-2005, 08:13 AM
mark
Guest
 
Posts: n/a
model train system

how to model a train system to include track and, to begin with two trains.
at present i have implemented using a vector two train objects fit into
vector at different positions and each has a move method which changes
postion +1 and replaces old position with a "empty block". (when vector
reaches end goes to beginning - creating a circular track) when one train
catches up to another it has to wait. what i want is for a transaction to
occur between trains and maybe control centre that involves train1 telling
train2 to speed up. have not been able to reference get name of train from
vector only that it is a train object - then i want to say train2.speedUp().

is this a fair model. i thought of using two dimensional vector to involve
tracks which intersected.

is there a more obvious model to choose - i have had jxta mentioned to me to
use trains as peers - but have no experience of this.

thanks for any help
mark



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.