Examples of TotallyOrderedSet


Examples of ptolemy.actor.util.TotallyOrderedSet

            _breakpoints.clear();
        } else {
            if (_debugging) {
                _debug(getFullName(), "creates a breakpoint table.");
            }
            _breakpoints = new TotallyOrderedSet(new GeneralComparator());
        }

        // Instantiate an ODE solver, using the class name given
        // by ODESolver parameter, which is a string parameter.
        String solverClassName;
View Full Code Here

Examples of ptolemy.actor.util.TotallyOrderedSet

    protected boolean _removeCurrentTimeFromBreakpointTable()
            throws IllegalActionException {
        // NOTE: We only remove elements from breakpoint table in this method
        // and the postfire() method of the CT director.
        boolean currentTimeIsABreakpoint = false;
        TotallyOrderedSet breakPoints = getBreakPoints();
        Time now = getModelTime();

        // If the current time is a breakpoint, remove it from table.
        if ((breakPoints != null) && !breakPoints.isEmpty()) {
            if (breakPoints.contains(now)) {
                // The current time is a break point.
                currentTimeIsABreakpoint = true;

                Time time = (Time) breakPoints.removeFirst();

                if (time.compareTo(now) < 0) {
                    // This should not happen for CTMultisolverDirector,
                    // but it is possible for CTEmbeddedDirector.
                    // When a CT refinement is made inactive for a long time
                    // and reentered, the previously stored breakpoints may
                    // be in the past... The same thing happens in the
                    // prefire() method of DE director.
                    breakPoints.removeAllLessThan(now);
                }

                if (_debugging) {
                    _debug("Remove " + now + " from the break-point list.");
                }
View Full Code Here

Examples of ptolemy.actor.util.TotallyOrderedSet

     *  of this step. Return the refined step size.
     */
    private double _refinedStepWRTBreakpoints() {
        double refinedStepSize = getCurrentStepSize();

        TotallyOrderedSet breakpoints = getBreakPoints();
        if ((breakpoints != null) && !breakpoints.isEmpty()) {
            if (_debugging && _verbose) {
                _debug("The first breakpoint in the breakpoint list is at "
                        + breakpoints.first());
            }

            // NOTE: the breakpoint table is not changed.
            Time nextBreakpoint = ((Time) breakpoints.first());
            double maximAllowedStepSize = nextBreakpoint.subtract(
                    getModelTime()).getDoubleValue();

            if (maximAllowedStepSize < refinedStepSize) {
                refinedStepSize = maximAllowedStepSize;
View Full Code Here

Examples of ptolemy.actor.util.TotallyOrderedSet

        // create a breakpoint table if necessary
        if (_debugging) {
            _debug(getFullName(), "create/clear break point table.");
        }

        TotallyOrderedSet breakpoints = getBreakPoints();

        if (breakpoints != null) {
            breakpoints.clear();
        } else {
            _breakpoints = new TotallyOrderedSet(new GeneralComparator());
        }
    }
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.