Hi J.S,

Thanks I added your test case to the tree as
actor/lib/test/auto/RecordUpdater2.xml

The model has a RecordUpdater with three inputs.  

   Const  ---->||
   Const2 ---->||--->
   Const3 ---->|| 

The last input port of the RecordUpdater (associate with Const3) has a
type constraint that is set to int.  If I set the type constraint of
the third input to unknown and set the output of Const3 to int, then
the problem goes away.

There is a bug here, but I'm not sure of an easy fix.

I cleaned up the error message so we now get:

ptolemy.kernel.util.InvalidStateException: Port 
".RecordUpdater2.RecordUpdater.id" of type "int" in an InequalityTerm
is not settable. If the port is an input and has a type constraint,
try removing the type constraint and possibly placing it on the
output.
        at ptolemy.graph.InequalitySolver._addToClist(InequalitySolver.java:324)
        at 
ptolemy.graph.InequalitySolver.addInequality(InequalitySolver.java:107)
        at 
ptolemy.graph.InequalitySolver.addInequalities(InequalitySolver.java:93)
        at 
ptolemy.actor.TypedCompositeActor.resolveTypes(TypedCompositeActor.java:259)
        at ptolemy.actor.Manager.resolveTypes(Manager.java:993)
        at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:890)
        at ptolemy.actor.Manager.initialize(Manager.java:572)
        at ptolemy.actor.Manager.execute(Manager.java:320)
        at ptolemy.actor.Manager.run(Manager.java:1044)
        at ptolemy.actor.Manager$3.run(Manager.java:1085)

The error message is a too verbose, but it might help the next person.

Maybe someone else has an idea here?

_Christopher
--------
    Hi,
    
    I found a bug in RecordUpdate. When you add an input port and enforce a
    "Type" (e.g. string, int, etc.) it breaks with the following stack:
    
    ptolemy.kernel.util.InvalidStateException: Variable in an InequalityTerm
    is not settable.
        at ptolemy.graph.InequalitySolver._addToClist(InequalitySolver.java:308
   )
        at ptolemy.graph.InequalitySolver.addInequality(InequalitySolver.java:1
   06)
        at ptolemy.graph.InequalitySolver.addInequalities(InequalitySolver.java
   :92)
        at
    ptolemy.actor.TypedCompositeActor.resolveTypes(TypedCompositeActor.java:259
   )
        at ptolemy.actor.Manager.resolveTypes(Manager.java:989)
        at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:886)
        at ptolemy.actor.Manager.initialize(Manager.java:572)
        at ptolemy.actor.Manager.execute(Manager.java:320)
        at ptolemy.actor.Manager.run(Manager.java:1040)
        at ptolemy.actor.Manager$3.run(Manager.java:1081)
    
    The original test for RecordUpdater
    (ptolemy/actor/lib/test/auto/RecordUpdater.xml) wasn't able to find it
    because it did not enforce any type. The test file I send in attach. to
    this email is just a small modif. of it, trying to force an int input.
    
    Cheers,
    
    ++ js

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

Reply via email to