Digital program preparation with HSL The dynamic region of the simple spring damping eqation X = FI-K2'X + K1'X can be written in HSL language as follows
DYNAMIC PRINT 30 TIME, SDOT, X, FT DEFINE [Kl,li21 TERMVAL [19.01 INDEPVAR [TIME] COMDEL [3.1413 6.0] DERIVATIVE FT = 1.0 XDD = FT-K2*XDOT-K1*X SDOT = INTEG [XDOT] END END
The description of the dynamic region is enclosed by the DYNAMIC . . . END statements above. The DEFINE statement indicates variables to the translator that are defined by other than regular statements. for example, by a READ statemeut. TERMVAL indicates the terminal value for the independent variable at which control is transferred to the terminal region. INDEPVAR assigns the given variable name to the independent variable. while COMDEL defines the communication interval. The DERIVATIVE ... END statements enclose the derivative section. The representation statements given above are self-evitlent.
References:
Truitt, T.D. (1965) Truitt, T.D. "A Discussion of the EAI Approach to Hybrid Copmutation" Simulation October 1965
Strauss (1966) Strauss, J. C. "Basic Hytran simulation language" pp. 603-611.
in [AFIPS] (1966) [AFIPS] Proceedings of the 1966 Fall Joint Computer Conference FJCC 29