|
Compiling High-level Access Interfaces for Multi-site Software (CHAIMS)
|
|
Implementation of the Transportation example in C++ (Stand alone
Version)
The c++ implementation of the Transportation example can be found in:
It consists of 5 Megamodules:
- io: handles input and output
- routeinfo: it has two functions
- it looks up all possible routes from a file called routes. A list of
routes does not contain any information about the transportation type (air
or ground). The result is of the following type:
san-fransisco,san-jose,new-york
- it splits a given list of routes into a list of unique city pairs.
For the example above it would be:
san-fransisco,san-jose
san-jose,new-york
- air: looks up the air ost for city pairs
- it takes a list of city pairs and looks up the cost for each connection
in a file called airRoutes. The output is a list of city pairs where the
cost to take a plane for this connection is attached after the pair.
- ground: looks up the ground cost for city pairs (see air)
- bestroute: finds out which the best route is regarding the costs
from air and ground
- it takes the route information from routeinfo and the cost information
from air and ground to compute the best route.
Every module is implemented in a class and can be found in a separate
file. The program name is megaprogram. The two cities between the route
is computed is hard coded for now.
3/27/97 Meikel Poess