Examples of CTDirector


Examples of ptolemy.domains.ct.kernel.CTDirector

     *
     *  @param integrator The integrator of that calls this method.
     *  @return The next step size suggested by the given integrator.
     */
    public double integratorPredictedStepSize(CTBaseIntegrator integrator) {
        CTDirector director = (CTDirector) getContainer();
        double error = (integrator.getAuxVariables())[3];
        double h = director.getCurrentStepSize();
        double tolerance = director.getErrorTolerance();
        double newh = 5.0 * h;

        if (error > director.getValueResolution()) {
            newh = h
                    * Math.max(0.5, 0.8 * Math.pow((tolerance / error),
                            1.0 / _order));
        }

View Full Code Here

Examples of ptolemy.domains.ct.kernel.CTDirector

     *  by the last 1/4 of the current step size.
     *  @exception IllegalActionException If thrown in the super class or the
     *  model time can not be set.
     */
    protected void _advanceModelTime() throws IllegalActionException {
        CTDirector director = (CTDirector) getContainer();
        // NOTE: why is the current model time changed here?
        // Some state transition actors may be some functions
        // defined on the current time, such as the CurrentTime actor.
        Time iterationBeginTime = director.getIterationBeginTime();
        double currentStepSize = director.getCurrentStepSize();
        director.setModelTime(iterationBeginTime.add(currentStepSize
                * _timeInc[_getRoundCount()]));
    }
View Full Code Here

Examples of ptolemy.domains.ct.kernel.CTDirector

    /** If the parameter changed is the stopTime, then update the
     *  stopTime parameter of the director.
     */
    public void attributeChanged(Attribute attribute)
            throws IllegalActionException {
        CTDirector director = (CTDirector) getDirector();

        if ((director != null) && (director.stopTime != null)
                && (stopTime != null)) {
            // This is a hack, we should really use controls=directorparamter
            // in the applet
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.