Dear Chuck:

I would be happy to try to help out, but would probably need
to see the model to understand what it does (or doesn't do).
I suspect that you need a purely DE model, rather than a
hybrid CT/DE model, which might simplify things.

As for parameter scoping: Every parameter is visible
to everything below it in the hierarchy.  It is not
advisable, however, to change values of a parameter
above you in the hierarchy (it may be possible, but
I would have to look up the syntax, and would prefer
not to, since it will cause trouble later).  The
problem is that you may get unexpected nondeterminism
(where the result of an execution depends on arbitrary
decisions that the scheduler makes).  Changing parameter
values below the ModalModel is fine... The semantics
here is clean and well-defined.  You can do this
using transition actions on the ModalModel transitions.
If the parameter named y is inside a mode named x
then the transition action reads "y.x = new value".

Hope this helps.  Feel free to send me (or the list)
a model to look at.

Edward


At 01:22 PM 4/20/2006, Lutz, Charles D wrote:
Hi Ptolemy hackers,

Here’s the first post, likely of many to come. We are new Ptolemy users here, although personally I’ve followed the project for several years (but never got around to diving in!).

We’re trying to figure out a way to use Ptolemy as a general purpose M&S tool, and a modeling strategy for things like usage of resources. A scenario could be something like the self-checkout systems at supermarkets – typically there are 4 or so stations available. When all are in use, customers wait in line until one becomes available.

We might model each customer’s behavior with a state machine, but then we need a “global variable” for the number of available stations, which would be incremented and decremented by the (concurrent) instances of customers. A (waiting) customer can then transition to e.g. a “checkout” state when this variable > 0 and decrement it on
the way.

I’ve always had the impression that Ptolemy has a lot of depth, and now, getting into the details for real, that is an understatement! We are trying to get up to speed on how things work, so as we don’t know the theory yet, there could be problems with this approach, but we want to try something out, even if it just helps us understand the dynamics.

We have a simple model with which we’re trying to get a grasp on some basics.

At the top of the model, we have a MultipleInstanceComposite with a “MIC_out” port to a
Display. Also, there is a “stationsAvailable” parameter, assigned value 4.

Inside the MIC is a ContinuousClock connected to the “trigger” port of a ModalModel;
the MM has output ports “stations” and “bagging”, going to MIC_out.

Currently the only output actions are to write some test strings to the MM’s output ports.

Issues we’re having:
* Can’t seem to figure out how to get the concurrent FSMs to be able to see the top
   * level parameter (again, could be a bad idea, just trying it for now…)
* Using DEDirector, I got a complaint that something with a HSDirector can only * be used in a CTDomain; don’t know what HSDirector is, but I switched to CT
   * No output on Display…

We are continuing in the manuals, but wanted perhaps to get a bit of a reality check…

Thanks in advance for any input / tips / warnings / etc…

Chuck Lutz
Lockheed Martin
Systems of Systems - Modeling and Operations Analysis
BMC4I Modeling and Simulation
Moorestown, NJ
(856)638-7234 (office)
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]

“Everyone spoke of an information overload, but what there
was in fact was a non-information overload.”
– Richard Saul Wurman


------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal


----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to