MODEL MASTER
AN OBJECT-ORIENTED SPREADSHEET FRONT-END

Making spreadsheets safer

Contents Previous Next

MM circuit example - making the connections

Having described all the objects, we now construct a system that contains the ones we want, and wire them together. And we also write a models statement, as we did in the company example, to tell MM which objects we want to appear in the worksheet.
object amplifier
    attributes
        input : real
        output: real
    where
        output[t] = 5*input[t].

object amplifier_with_feedback is_a amplifier
    where
        input[0] = 1 &
        (t>0) input[t] = output[t-1].

object inverter
    attributes
        input : real
        output: real
    where
        output[t] = input[t]-1.

system my_circuit contains
        amplifier_with_feedback
        inverter
    connects
        amplifier_with_feedback.output to inverter.intput

model m
    models my_circuit.

 


Contents Previous Next

Copyright © 1998 J Ireson-Paine. All rights reserved