MODEL MASTER
AN OBJECT-ORIENTED SPREADSHEET FRONT-END

Making spreadsheets safer

Contents Previous Next

MM company example - specifying cell locations

In that last example, the MM compiler decided which attributes to put where. But we can override its allocation.
object parkinsons is_a company_and_workers
    where
        workforce[0] = 100 &
        (t>0) workforce[t] = workforce[t-1]*2 &
        average_salary[0] = 12000 &
        (t>0) average_salary[t] = average-salary[t-1]*1.5 &
        incomings[0] = 1000 &
        (t>0) incomings[t] = incomings[t-1] * 1.1 &

model model1
    models parkinsons
    incomings at C1 &
    outgoings at C5 &
    workforce at C2.

Here, the programmer specifies column numbers for some of the attributes. The compiler will still allocate the rest.

 


Contents Previous Next

Copyright © 1998 J Ireson-Paine. All rights reserved