Note: This page is no longer being maintained and is kept for archival purposes only.
For current information see our main page.
Garden with Insight Kurtz-Fernhout Software
Developers of custom software and educational simulations.
Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company
Garden with Insight
Product area
Help System
Contents
Quick start
Tutorial
How-to
Models

Garden with Insight v1.0 Help: EPIC Code Example

 
SUBROUTINE HPURK 
C     EPIC3090 
C     THIS SUBPROGRAM IS THE MASTER PERCOLATION COMPONENT.  IT 
C     MANAGES THE ROUTING PROCESS 
       (COMMON BLOCK REMOVED) 
      ADD=0. 
      SEP=0. 
      ST(LD1)=ST(LD1)+RFV-QD 
      DO 3 KK=1,NS 
         K=LID(KK) 
         ST(K)=ST(K)+SEP 
         IF (WTBL.GT.Z(K)) GO TO 2 
         SSF(K)=0. 
         O(K)=0. 
         SEP=0. 
         GO TO 3 
    2    CALL HPERC 
         ST(K)=ST(K)-SEP-SST 
         SSF(K)=SST 
         O(K)=SEP 
         ADD=ADD+SST 
    3 CONTINUE 
      SST=ADD 
      K=NS 
    4 L=LID(K) 
      L1=LID(K-1) 
      XX=ST(L)-PO(L) 
      IF (XX.LE.0.) GO TO 5 
      ST(L1)=ST(L1)+XX 
      O(L1)=O(L1)-XX 
      ST(L)=PO(L) 
    5 XX=ST(L)-FC(L) 
      IF (XX.LE.0.) GO TO 6 
      C1=ST(L1)/FC(L1) 
      C2=ST(L)/FC(L) 
      IF (C1.GE.C2) GO TO 6 
      X1=XX*(1.-EXP(.05*(C1-C2))) 
      ST(L1)=ST(L1)+X1 
      O(L1)=O(L1)-X1 
      ST(L)=ST(L)-X1 
    6 K=K-1 
      IF (K.GT.1) GO TO 4 
      RETURN 
      END 

This example is part of a discussion of the translation of the EPIC code to Pascal. Compare this to the Pascal code example from Garden with Insight's code.

Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company
Updated: March 10, 1999. Questions/comments on site to webmaster@kurtz-fernhout.com.
Copyright © 1998, 1999 Paul D. Fernhout & Cynthia F. Kurtz.