Hi Christopher, I followed the changes you suggested and the errors were gone, but the TimedPlotter showed no output, so as the Display block, although the execution was taking place. Am i making any mistake somewhere? or is it a possible bug?. Did something like this happen with you when u tried running the model after making the mentioned changes?
Regards, Rajarshi "Christopher Brooks" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/02/2007 10:06 AM To [EMAIL PROTECTED] cc ptolemy-hackers@bennett.EECS.Berkeley.EDU Subject Re: Question:IllegalActionException. Hi Rajarshi, It looks like HyVisual is not working very well. To replicate: -copy ptolemy/hsif/demo/SwimmingPool/HSIF.dtd to the current directory -create a file HSIF.xml with your model below -run $PTII/bin/vergil -hyvisual HSIF.xml -The model appears. Connect a ContinuousClock to the input, a TimedPlotter to the output -Run the model I get: java.lang.RuntimeException: ptolemy.kernel.util.IllegalActionException: Cannot find port or variable with the name: State.y.initialState in .H.NOT._Controller and .H.NOT._Controller.idt1id18id18.setActions at ptolemy.domains.fsm.kernel.AbstractActionsAttribute.typeConstraintList(AbstractActionsAttribute.java:324) at ptolemy.domains.fsm.kernel.FSMActor.typeConstraintList(FSMActor.java:974) To fix that I changed the setActions of one transition in the FSM from State.y.initialState=false to y=false and I changed the setActions of other transition in the FSM from State.y.initialState=true to y=true (I'm not sure if the above is right) To change these setActions I had to lookInside the Not ModalModel and then carefully drag apart the piece. We've known that we have needed an auto layout here. The next problem was a type issue. I changed the Continuous clock values parameter to {false, true} and inserted a BooleanToAnything actor: ConstClock -> Not (ModalModel) -> BooleanToAnything -> TimedPlotter The next problem was: ptolemy.kernel.util.IllegalActionException: Actor is not ready to fire. In the CT domain, all continuous actors should be ready to fire at all times. Does the actor only operate on sequence of tokens? in .H.BooleanToAnything The problem here is that the inner most refinement of the state labelled "State" is not connected The next problem: ptolemy.kernel.util.IllegalActionException: The ID NOTx is undefined. Here, the problem is that "NOTx" needs to be changed to "!x" So, it seems like there are a number of bugs. I've checked this in to the nightly build as a test case to be fixed, but I make not promises as to when it will be fixed. The HSIF conversion uses XSLT and it a little trick. For example in the first problem, I can see where the initialState variable is set, but changing it to isInitialState does not solve the problem. _Christopher -------- Hi Christopher, I just tried running the model in Ptolemy II 6.0.1, but ended up with the same error. My HSIF model is as follows: <?xml version='1.0' encoding='UTF-8' standalone='no'?> <!DOCTYPE DNHA SYSTEM "HSIF.dtd"> <DNHA name="NOT_BLOCK"> <HybridAutomaton name="NOT" parameterAccuracy="0.001000"> <BooleanVariable _id="idv1" ref="idr2 idr4" name="x" kind="Input" defaultValue="false"/> <BooleanVariable _id="idv2" ref="idr1 idr3" name="y" kind="Controlled" defaultValue="false"/> <Location _id="id18" src="idt1 idt2" dst="idt1 idt2" name="State" initial="true"/> <Transition _id="idt1" src_end_="id18" dst_end_="id18"> <Action> <VarRef _id="idr1" var="idv2" unOp="NOP"/> <Expr> <LExpr> <RExpr> <AExpr> <MExpr> <Const value="false" unOp="NOP"/> </MExpr> </AExpr> </RExpr> </LExpr> </Expr> </Action> <Expr> <LExpr> <RExpr> <AExpr> <MExpr> <VarRef _id="idr2" var="idv1" unOp="NOP"/> </MExpr> </AExpr> </RExpr> </LExpr> </Expr> </Transition> <Transition _id="idt2" src_end_="id18" dst_end_="id18"> <Action> <Expr> <LExpr> <RExpr> <AExpr> <MExpr> <Const value="true" unOp="NOP"/> </MExpr> </AExpr> </RExpr> </LExpr> </Expr> <VarRef _id="idr3" var="idv2" unOp="NOP"/> </Action> <Expr> <LExpr> <RExpr> <AExpr> <MExpr> <VarRef _id="idr4" var="idv1" unOp="NOT"/> </MExpr> </AExpr> </RExpr> </LExpr> </Expr> </Transition> </HybridAutomaton> </DNHA> The example HSIF models (poolExample_hsif and exampleFile_hsif) given with the HSIF installation from : - http://www.isis.vanderbilt.edu/projects/mobies/downloads.asp?req=Downloads/ HSIF_Release_4.1.8.zip also suffer the same error. Also, some models which were getting executed properly in HyVisual 5.0.1 are giving errors when tried to run in HyVisual 6.0.1. Regards, Rajarshi. "Christopher Brooks" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/30/2007 09:25 PM To [EMAIL PROTECTED] cc ptolemy-hackers@bennett.EECS.Berkeley.EDU Subject Re: Question:IllegalActionException. Hi Rajarshi, That sounds like a scoping problem of some sort. Can you try it in Ptolemy II 6.0.1 and if it fails, then post a small example? _Christopher -------- Hello all, When i try running a simulation of my HSIF model written as xml file in HyVisual 5.0.1, I get the following Exception: ptolemy.kernel.util.IllegalActionException: Cannot find port or variable with the name : S1.y.initialState in .NOT_BLOCK.NOT._Controller and .NOT_BLOCK.NOT._Controller.idt1ids1ids1.setActions. Can anyone please tell me what is/are the reasons for this Exception? 'y' is a local variable defined as Boolean data type and is set as action when the jump condition on the transition idt1ids1ids1 is true. Operating System : Windows 2000 Java version: 1.4.2 HyVisual version: 5.0.1 ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]