Class CollectLatticeOntologySolverDetails

  • All Implemented Interfaces:
    java.lang.Cloneable, Testable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class CollectLatticeOntologySolverDetails
    extends Attribute
    implements Testable
    Model attribute that collects the details of the lattice ontology solver resolution on the constraints collected and produces string outputs. This attribute is meant mainly for testing the LatticeOntologySolver.
    Ptolemy II 10.0
    Charles Shelton, Beth Latronico
    Red (cshelton)
    Red (cshelton)
    • Field Detail

      • solverName

        public StringParameter solverName
        Name of the LatticeOntologySolver to collect information from. If this is does not refer to a solver existing in the model, an exception is thrown when the actor fires.
      • trainedInitialSolverConstraints

        public StringAttribute trainedInitialSolverConstraints
        The string attribute holding the value of the initial solver constraints for the LatticeOntologySolver.
      • trainedResolvedSolverConstraints

        public StringAttribute trainedResolvedSolverConstraints
        The string attribute holding the value of the resolved solver constraints for the LatticeOntologySolver.
      • unacceptableTerms

        public StringAttribute unacceptableTerms
        The string attribute holding the list of terms that resolved to unacceptable concepts for the LatticeOntologySolver. For information only; not checked in the test() method.
    • Constructor Detail

      • CollectLatticeOntologySolverDetails

        public CollectLatticeOntologySolverDetails​(CompositeEntity container,
                                                   java.lang.String name)
                                            throws IllegalActionException,
        Construct the CollectLatticeOntologySolverDetails attribute with the given container and name.
        container - The container.
        name - The name of this attribute.
        IllegalActionException - If the entity cannot be contained by the proposed container.
        NameDuplicationException - If the container already has an actor with this name.
    • Method Detail

      • test

        public void test()
                  throws IllegalActionException
        Test whether the details received from the LatticeOntologySolver matches the stored values in the actor.
        Specified by:
        test in interface Testable
        IllegalActionException - If the test fails and the results are different.
      • train

        public void train()
                   throws IllegalActionException
        Collect the solver details from the LatticeOntologySolver and store the values received in the actor for future tests.
        Specified by:
        train in interface Testable
        IllegalActionException - If solverName does not refer to a solver in the model, or if the solver throws it when getting constraints.