MODULE WBDiffModelPascal%s; 

	IMPORT 
		WBDiffODEMath,
		Math, 
		MathFunc;
	TYPE 
		 Equations = POINTER TO RECORD (WBDiffODEMath.Equations) END; 
		 Factory = POINTER TO RECORD (WBDiffODEMath.Factory) END; 
	CONST 
		nEq = %s; 
	VAR 
		fact-: WBDiffODEMath.Factory; 
		

	PROCEDURE (e: Equations) Derivatives (IN %s, %s: ARRAY OF REAL; n: INTEGER; t: REAL; OUT d%sdt: ARRAY OF REAL); 
	VAR 
		%s 
	BEGIN 
		%s 
                %s
	END Derivatives;

	PROCEDURE (equations: Equations) SecondDerivatives (IN theta, x: ARRAY OF REAL; numEq: INTEGER; t: REAL;OUT d2xdt2: ARRAY OF REAL);
	BEGIN 
		  HALT(126)
	END SecondDerivatives; 
	
	PROCEDURE (equations: Equations) Jacobian (IN theta, x: ARRAY OF REAL; numEq: INTEGER; t: REAL; OUT jacob: ARRAY OF ARRAY OF REAL); 
	BEGIN
	 HALT(126)
	END Jacobian; 
	
	PROCEDURE (f: Factory) New (option: INTEGER): WBDiffODEMath.GraphNode;
	VAR 
		equations: Equations; 
		node: WBDiffODEMath.GraphNode; 
	BEGIN
		 NEW(equations);
		 node := WBDiffODEMath.New(equations, nEq); 
		 RETURN node
	END New;
   
   
	PROCEDURE Install*; 
	BEGIN 
		  WBDiffODEMath.Install(fact) 
	END Install; 
	
	PROCEDURE Init; 
	VAR 
		f: Factory; 
	BEGIN 
		  NEW(f); fact := f 
	END Init; 
		
	BEGIN 
		  Init
END WBDiffModelPascal%s.