Examples of Director


Examples of ptolemy.actor.Director

        // If a transition was taken, then request a refiring at the current time
        // in case the destination state is a transient state.
        if (_enabledTransition != null) {
            CompositeActor container = (CompositeActor) getContainer();
            Director executiveDirector = container.getExecutiveDirector();
            if (executiveDirector != null) {
                if (_debugging) {
                    _debug("ModalDirector: Request refiring by "
                            + executiveDirector.getFullName() + " at "
                            + getModelTime());
                }
                executiveDirector.fireAt(container, getModelTime());
            }
        }

        return postfireResult && !_stopRequested;
    }
View Full Code Here

Examples of ptolemy.actor.Director

                        .isStepSizeAccurate()) {
                    return false;
                }
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousStepSizeController) {
                    if (!((ContinuousStepSizeController) director)
                            .isStepSizeAccurate()) {
                        return false;
                    }
View Full Code Here

Examples of ptolemy.actor.Director

            _debug("HybridModalDirector: Called prefire().");
        }
        _resetAllReceivers();
        Nameable container = getContainer();
        if (container instanceof Actor) {
            Director executiveDirector = ((Actor) container)
                    .getExecutiveDirector();
            if (executiveDirector != null) {
                Time outTime = executiveDirector.getModelTime();
                setModelTime(outTime);
                if (_debugging) {
                    _debug("HybridModalDirector: Setting local current time to: "
                            + outTime);
                }
View Full Code Here

Examples of ptolemy.actor.Director

                if (candidate < result) {
                    result = candidate;
                }
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousStepSizeController) {
                    double candidate = ((ContinuousStepSizeController) director)
                            .refinedStepSize();
                    if (candidate < result) {
                        result = candidate;
View Full Code Here

Examples of ptolemy.actor.Director

            if (actor instanceof ContinuousStatefulComponent) {
                ((ContinuousStatefulComponent) actor)
                        .rollBackToCommittedState();
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousDirector) {
                    ((ContinuousDirector) director).rollBackToCommittedState();
                }
            }
        }
View Full Code Here

Examples of ptolemy.actor.Director

                if (candidate < result) {
                    result = candidate;
                }
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousStepSizeController) {
                    double candidate = ((ContinuousStepSizeController) director)
                            .suggestedStepSize();
                    if (candidate < result) {
                        result = candidate;
View Full Code Here

Examples of ptolemy.actor.Director

                // On the first pass, the container will be the immediate
                // container, whose director is this one, so update the
                // container first.
                container = container.getContainer();
                if (container instanceof Actor) {
                    Director director = ((Actor) container).getDirector();
                    if (director instanceof ContinuousDirector) {
                        _enclosingContinuousDirector = (ContinuousDirector) director;
                        break;
                    }
                }
View Full Code Here

Examples of ptolemy.actor.Director

        if (attribute == numerator) {
            // Set this composite to opaque.
            _opaque = true;

            // Request for initialization.
            Director dir = getDirector();

            if (dir != null) {
                dir.requestInitialization(this);
            }
        } else if (attribute == denominator) {
            // Check that a_0 is not 0.0
            ArrayToken aToken = (ArrayToken) (denominator.getToken());

            if (((DoubleToken) aToken.getElement(0)).doubleValue() == 0.0) {
                throw new IllegalActionException(this,
                        "The denominator coefficient cannot start with 0.");
            }

            // Set this composite to opaque.
            _opaque = true;

            // Request for initialization.
            Director dir = getDirector();

            if (dir != null) {
                dir.requestInitialization(this);
            }
        } else {
            super.attributeChanged(attribute);
        }
    }
View Full Code Here

Examples of ptolemy.actor.Director

    private void _requestInitialization() {
        // Set this composite to opaque.
        _opaque = true;

        // Request for initialization.
        Director dir = getDirector();

        if (dir != null) {
            dir.requestInitialization(this);
        }
    }
View Full Code Here

Examples of ptolemy.actor.Director

            } catch (Exception error) {
                throw new IllegalActionException("Invalid URL");
            }
        }

        Director director = getDirector();

        if (director != null) {
            director.fireAt(this, new Time(director));
        } else {
            throw new IllegalActionException(this, "No director");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.