list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

Canal System

Canal system class diagram.

See also the state diagram for the canal lock.

The following are the requirements from which this was derived:

The Canal Monitoring and Control System is used to automate canal locks in response to water craft that want to pass through a canal system. The system can be installed in any network of canals. Each canal is divided up into segments. Each segment has two ends which can either be a bend, a lock gate, a low bridge, or a system entry/exit point (where boats can move to or from other waterways such as rivers and lakes). A special kind of canal segment is a lock. The water level in a lock can be raised or lowered so its height matches the height of an adjacent segment. Several locks can exist side by side (as in the Rideau Canal next to Parliament Hill in Ottawa). A low bridge is a location where the bridge needs raising for a boat to pass. A bend is simply a place where the canal changes direction - keeping track of these helps simplify mapping of the system.

The system keeps track of the GPS co-ordinates of each segment end, the height of the water above sea level in each segment (which can change in locks), and optionally a name given to a series of locks or segments.

Each water craft using the system must have a transponder. The transponder includes a GPS unit and transceiver. When the captain of a craft wants to travel through the system, he enters his plannned destination in the transponder. The size of the boat is also tracked. The transponder regularly transmits the location of the craft to the control system so the control system can monitor traffic.

When a craft reaches a gate, the system knows it is there and needs to pass through since it has received the data about the desired destination. The control system takes care of opening the gate, raising or lowering of the water level, and then opening the next gate, etc. When a boat reaches a low bridge, a similar procedure takes place, except that raising or lowering the water doesn't happen.

When there are a lot of boats, the system makes several of them queue up so they can pass through a lock or low bridge at the same time. The system has, however, to ensure that only the right number and size of boats are put into a lock at once, so the lock doesn't become overly full (the system knows the size of each lock). Complicating matters is the fact that there will be boats travelling in both directions.

Example

// UML class diagram that models a canal as a
// network of segments, with Locks. See the
// State Machine section for a state machine for
// each lock
class CanalNetwork {
  name;
  0..1 -- * CanalNetwork subNetwork;
  0..1 -- * Craft activeVessels;
  * -- * SegEnd;
}

class SegEnd {
  name;
  GPSCoord location;
}

class Segment {
  Float waterLevel; // m above sea level 
  1..* -- 2 SegEnd;
}

class Lock {
  isA Segment;
  Float maxLevel;
  Float minLevel;
}

class Bend {
  isA SegEnd;
}

class EntryAndExitPoint {
  isA SegEnd;
}

class MooringPoint {
  isA SegEnd;
}

class Obstacle {
  isA SegEnd;
  0..1 downstreamObstacle -- * Craft upStreamQueue;
  0..1 upstreamObstacle -- * Craft downStreamQueue;  
}

class LowBridge {
  isA Obstacle;
}

class LockGate {
  isA Obstacle;
}

class Craft {
  lazy GPSCoord location;
}

class Trip {
  0..1 -> 1..* SegEnd;
  0..1 -- 1 Craft;
}

class Transponder {
  id;
  0..1 -- 0..1 Craft;
}

class GPSCoord {
   Float lattitide;
   Float longitude;
}
      

Load the above code into UmpleOnline