I haven't decided how to handle the shared-object problem, but I'm leaning toward the 
Parameter + ObjectToken (or Parameter + accessor object) approach.  However, I can't 
figure out how to update the value of a parameter from within a refinement.  In the 
attached example, I'd like to set the value of the parameter "a" to the current time 
(mod 10) on some transitions, and leave it alone on others.  However, I receive an 
IllegalActionException when the model tries to resolve types (in 
preinitializeAndResolveTypes), complaining that the type-checker "Cannot find port or 
variable with the name: a".  (The same error arises if I try to set the value of "a" 
using an expression actor in a refinement.)  Does this mean that parameters are 
immutable (at least in modal models)?

Thanks,

Andy Z.
-----
Andrew Zimdars
Modeling, Simulation, and Information Sciences (Org. ABCS)
Advanced Technology Center, Lockheed Martin Space Systems Co.
Bldg. 153, Col. 2J4
1111 Lockheed Martin Way, Sunnyvale, CA  94089

w: 408/742.2111 m: 510/915.0662

Attachment: modalModelTest.moml
Description: modalModelTest.moml

Reply via email to