This directory contain base classes for plant system.

Directories of a_plant, e_plant each contains classes for building
the algorithmic and equation based type plant systems, respectively.

The inheritance structure is as follow:
EKSObject	System		ESystem
				ASystem
		Connection	EConnection
				AConnection
		Component	EComponent	ECoil
						EBoiler
						...
				AComponent	Type_5
						ABoiler
						...

Usage:

To create an algorithmic based type plant system:
	run build_template and use context of Context_algorithm to
	create a template for the programme.

To create an equation based type plant system:
	run build_template and use context of Context_equation
	create a template for the programme.

------------------------------------------------------------------------------
CODING DETAILS:

The equation based system:
	The function	execute() in class ESystem create at each time step
	the system equation-set and returns to the caller (Context).
	In this system, Context is required to call this function at each time
	step and passes the equation-set to the solver and get the solution
	back and passes back to the system. The system will then distribute
	the new solution to each state-variable in componens.
		The function in ESystem to refresh state-variable
		has not yet completed.
	What excute() does:
		1. get all connections (a list),
		2. create a empty reference component list,
		3. for each connection, get source and target components.
			- check each if it is already in the reference list or
			  is a boundary node;
			  if not then create the component equations and append
			  to the system equation-set; then add the components
			  to the reference list.
			- call function connect() in connection to add coupling
		   	  coefficients to the two component equation-sets.
			- reset the reference component list.
		5. repeat 3. and returns the system equation-set.

	Function create_me(EKSObject* caller) in EComponent class is a virtual
	function and is	implemented in the actual component classes.
	At the moment only 3 components are created.
	Issam is writing many more of them.

	What create_me(EKSObject* caller) does:
		create an equation-set for the component and returns it.
	Note: the equation-set only contains all the state-variables and
	      coefficients internal to the component, any outside contact will
	      be supplemented by the connection.

	For equation type connection, user defines at run time:
		- how many links between the source and the target components;
		- for each link, the location of state-variables in source and target.
		- the type of the link (flow or contact)

	Function connect() in class EConnection is basically creating coupling
	coefficients for the two components it owns. Internally it does alot
	checking to decide what to do at different condition.


The algorithmic type system:
	The function	execute() in class ASystem does all the simulation
	and does not require any solver. It does this by going through all 
	the connection in the list and calling the function connect() in each
	connection.

	Conditions of usage:
		1. the first connection in the system has to have a source
		   component as ACard_reader.
		2. for any component output data is required, it has to be
		   connected to a component of APrinter.

	Function create_me(EKSObject* caller) in AComponent class is a virtual
	function and is	implemented in the actual component classes.
	At the moment only 4 components are created.

	What create_me(EKSObject* caller) does:
		each time it is called, it calculates based onthe  input vector
		and its parameters and put the result into the corresponding output
		vector.

	Function connect() in class AConnection:
		1. update output vector of the source component,
		2. COPY the data in the specific location of the source component's
		   output vector into the specific location of the target component's
		   input vector. (including legal type checking)
