Package ptolemy.actor

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


                // 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

        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

    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

            } 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

            getDirector().fireAt(this, currentTime);
        } else {
            double meanTimeValue = ((DoubleToken) meanTime.getToken())
                    .doubleValue();
            double exp = -Math.log((1 - Math.random())) * meanTimeValue;
            Director director = getDirector();
            _nextFiringTime = director.getModelTime().add(exp);
            director.fireAt(this, _nextFiringTime);
        }
    }
View Full Code Here

        if (_boundaryCrossed) {
            double meanTimeValue = ((DoubleToken) meanTime.getToken())
                    .doubleValue();
            double exp = -Math.log((1 - Math.random())) * meanTimeValue;
            Director director = getDirector();
            _nextFiringTime = director.getModelTime().add(exp);
            director.fireAt(this, _nextFiringTime);
        }

        return super.postfire();
    }
View Full Code Here

     *  If the input does not have a token, suspend firing and return.
     *  @exception IllegalActionException If there is no director.
     */
    public void fire() throws IllegalActionException {
        super.fire();
        Director director = getDirector();

        if (director == null) {
            throw new IllegalActionException(this, "No director!");
        }

View Full Code Here

                Subscriber subscriber = (Subscriber) subscribers.next();
                subscriber.input.liberalLink(_relation);
            }
        }

        Director director = getDirector();
        if (director != null) {
            director.invalidateSchedule();
            director.invalidateResolvedTypes();
        }
        _updatedLinks = true;
    }
View Full Code Here

                // The Publisher._updateLinks() may have already linked us.
                input.liberalLink(relation);
            }
            _relations.add(relation);
        }
        Director director = getDirector();
        if (director != null) {
            director.invalidateSchedule();
            director.invalidateResolvedTypes();
        }
        _updatedLinks = true;
    }
View Full Code Here

TOP

Related Classes of ptolemy.actor.Director

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.