Package ptolemy.actor

Examples of ptolemy.actor.Actor


     *  This effectively animates the execution.
     *  @param event The debug event.
     */
    public void event(DebugEvent event) {
        if (event instanceof FiringEvent) {
            Actor actor = ((FiringEvent) event).getActor();

            if (actor instanceof NamedObj) {
                NamedObj objToHighlight = (NamedObj) actor;

                // If the object is not contained by the associated
View Full Code Here


            CTSchedule schedule = (CTSchedule) getScheduler().getSchedule();
            Iterator actors = schedule.get(CTSchedule.DYNAMIC_ACTORS)
                    .actorIterator();

            while (actors.hasNext() && !_stopRequested) {
                Actor actor = (Actor) actors.next();

                if (_debugging && _verbose) {
                    _debug("Prefire dynamic actor: "
                            + ((Nameable) actor).getName());
                }

                boolean ready = actor.prefire();

                if (actor instanceof CTCompositeActor) {
                    ready = ready
                            && ((CTCompositeActor) actor)
                                    .prefireDynamicActors();
View Full Code Here

     @exception IllegalActionException If the current states can not
     *  be emitted.
     */
    public void emitCurrentStates() throws IllegalActionException {
        Case container = (Case) getContainer();
        Actor actor = container.getCurrentRefinement();
        if (actor instanceof CTDynamicActor) {
            ((CTDynamicActor) actor).emitCurrentStates();
        }
    }
View Full Code Here

    /** Restore the states of all the enabled refinements to the
     *  previously marked states.
     */
    public void goToMarkedState() throws IllegalActionException {
        Case container = (Case) getContainer();
        Actor actor = container.getCurrentRefinement();
        if (actor instanceof CTStatefulActor) {
            ((CTStatefulActor) actor).goToMarkedState();
        }
    }
View Full Code Here

    /** Return true if the enabled refinements may produce events.
     *  @return True if the enabled refinements may produce events.
     */
    public boolean hasCurrentEvent() {
        Case container = (Case) getContainer();
        Actor actor = container.getCurrentRefinement();
        if (actor instanceof CTEventGenerator) {
            return ((CTEventGenerator) actor).hasCurrentEvent();
        }
        return false;
    }
View Full Code Here

     *  the current step size.
     *  @return True if the current refinement has accurate output.
     */
    public boolean isOutputAccurate() {
        Case container = (Case) getContainer();
        Actor refinement = container.getCurrentRefinement();
        if (refinement instanceof CTStepSizeControlActor) {
            return ((CTStepSizeControlActor) refinement).isOutputAccurate();
        }
        return true;
    }
View Full Code Here

     @return True if all the refinements can resolve their states with the
     *  current step size.
     */
    public boolean isStateAccurate() {
        Case container = (Case) getContainer();
        Actor refinement = container.getCurrentRefinement();
        if (refinement instanceof CTStepSizeControlActor) {
            return ((CTStepSizeControlActor) refinement).isStateAccurate();
        }
        return true;
    }
View Full Code Here

    /** Make the current states of all the enabled refinements.
     */
    public void markState() {
        Case container = (Case) getContainer();
        Actor actor = container.getCurrentRefinement();
        if (actor instanceof CTStatefulActor) {
            ((CTStatefulActor) actor).markState();
        }
    }
View Full Code Here

     *  its prediction is Double.MAX_VALUE.
     *  @return The predicted next step size.
     */
    public double predictedStepSize() {
        Case container = (Case) getContainer();
        Actor refinement = container.getCurrentRefinement();
        if (refinement instanceof CTStepSizeControlActor) {
            return ((CTStepSizeControlActor) refinement).predictedStepSize();
        }
        return Double.MAX_VALUE;
    }
View Full Code Here

     @exception IllegalActionException If the local directors of refinements
     *  throw it.
     */
    public boolean prefireDynamicActors() throws IllegalActionException {
        Case container = (Case) getContainer();
        Actor refinement = container.getCurrentRefinement();
        if (refinement instanceof CTTransparentDirector) {
            return ((CTTransparentDirector) refinement).prefireDynamicActors();
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of ptolemy.actor.Actor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.