Shipping Coordination Megaprogram Example

January 22, 1997 
Raj Sheth

The goal is to create a simple program which will simulate coordination of
shipping goods from two locations.  This will mirror the example presented
in "Towards Megaprogramming" by Wiederhold et al.  Once this C prototype is
written, the example will be expanded to use several commnication standards
such as CORBA, DCE, and ActiveX.

This program will have two main functions, each one representing one of the
megamodules in the example.  The application will be command line driven,
and, since this is simply a simulation intended to show the features of
megamodule coordination through CHAIMS, each of the functions will be
simplified.

The two major functions are described below

1) Ground Transportation

	This function will estimate the time necessary to travel between
the airport and the location of delivery.  Since this is a simulation, it
will do that by selecting a random number within a reasonable range.  In
addition, it will take a truck schedule and a time as a parameter, and it
will schedule a truck after searching for an available truck.  The truck
schedule will be a parameter so that this function can be used for multiple
cities, and it can be constructed from a simple 2D array or a 1D array of
linked lists.  There will be a boolean parameter to tell if the time passed
as a parameter is an arrival time or a start time.  It will return the
estimated amount of time needed and will somehow indicate if there are no
available trucks.

2) Air Transportation

	This function will estimate the air travel time necessary to ship
the package between two cities.  In addition, like the ground
transportation model, it will schedule the package delivery on an airplane.
However, the airplanes have a predetermined schedule of flights, so the
data would need to be modeled differently to track the different types of
airlines, the different flight times, and the number of packages on each
flight.  Once again, there will be a time parameter and a boolean telling
whether the time is an arrival time or departure time.  It will return the
total estimated amount of time of the package shipment including the flight
time and the time which the package spends on the ground.

In addition, this program will have utility functions which will find the
info on a certain package and list all packages being sent.

The program will use a command line interface with the following options:

-m "name" 	Name of the package

-s "city name" 	Start city

-e "city name"	End city

-d 19970117	Arrival/Departure date in yyyymmdd

-t 12:00	Arrival/Departure time in 24hr format

-a		If present, indicates that time given is
		arrival time.

-g		If present, indicates that time given is
		departure time.

-f "name"	Find this package

-l 		Lists the names of all packages being sent



1/22/97ct