// 
// $Log: Network.java,v $
// Revision 1.2  1996/02/27  00:35:32  jaf
// Updated things here and there to make it closer to something that
// could compile.
//
// Added "GeneralProperties prop;" variables to most classes, to make
// them extensible.
//
// Revision 1.1  1996/02/26  23:21:11  jaf
// Initial revision
//
// 





// For Euclidean network design problems, where switches may be placed
// anywhere in the plane, rather than only in one of a discrete set of
// Place's, the x,y coordinates specify where within the Place the
// Switch lies.

// It also seems that we might want to create switches that are not
// associated with any given Place, but still display it at its x,y
// coordinates.  In that case, position can be null.

// type is intended to specify things like the manufacturer and model
// number, in case we ever want to detail such things.

// Fixed part: name, place, x, y
// Extensible part: type

class Switch {
	String name;
	Place place;
	float x,y;
	GeneralProperties prop;
}



// A "link" connects a pair of Switch's, and may consist of one or more
// physical links.  For example, it might consist of 2 2.4 Gb/s links
// and one 600 Mb/s link.  Each physical link should be one of the
// kinds defined in an instance of the LinkType class.

// It might be more detail than we care for, but we could also store a
// sequence of Conduit's over which this Link passes, since it could go
// through several Conduit's, and there could be more than one sequence
// of Conduit's between the Place's where Switch's l and r are installed.
// Any optimization algorithm should always use the shortest sequence
// of Conduit's from one Place to another (a shortest path in the
// physical_graph), but we might want to represent an existing Link
// which does not use such a shortest path.

// While I'm mentioning that level of detail, we might also want to
// allow different cables between the same pair of switches to follow
// different sequences of Conduit's.  As far as the performance of the
// network is concerned, this doesn't matter.  However, there might be
// some cable already installed between a pair of switches that we
// might want to use, and then an optimizing algorithm chooses a new,
// shorter path to install new cable.  I'll leave such ideas out of
// the code for now.

class Link {
	String name;
	Switch l,r;
	HashTable physicalLinks;
	//"multiset" of LinkType  // a "multiset" because we can have more
				// than one of a 2.4 Gb/s link, for example.
	//(or, for each LinkType, a count of how many physical links to
	//use of that type)
	GeneralProperties prop;
}



// Rob called this class "solution".  It represents a collection of
// Switch's and their interconnection by Link's.

class Network {
	Set switches;
	Set links;
	GeneralProperties prop;
}
