Examples of fireAt()


Examples of ptolemy.actor.Director.fireAt()

            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

Examples of ptolemy.actor.Director.fireAt()

    public void fireAt(Actor actor, Time time) throws IllegalActionException {
        Actor container = (Actor) getContainer();
        if (container != null) {
            Director executiveDirector = container.getExecutiveDirector();
            if (executiveDirector != null) {
                executiveDirector.fireAt(container, time);
            }
        }
    }

    /** Request a firing of the given actor at the current
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

                    // This shouldn't happen, but it will prevent us
                    // from enqueuing events in the past
                    firingTime = currentTime;
                }

                director.fireAt(_self, firingTime);
            } catch (IllegalActionException ex) {
                // Should never happen
                throw new InternalErrorException(ex.getMessage());
            }
        }
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

            reception.sender = sender;
            reception.receiver = receiver;
            reception.properties = properties;
            _receptions.put(timeDouble, reception);

            director.fireAt(this, time);
        }
    }

    ///////////////////////////////////////////////////////////////////
    ////                         private variables                 ////
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

                //Call fireAt to set the color back to white after the delay time.
                Director director = getDirector();
                double delayTime = ((DoubleToken) delay.getToken())
                        .doubleValue();
                Time time = director.getModelTime().add(delayTime);
                director.fireAt(this, time);
            } else if (getName().equals(routeTo) || (hops == 0)) {
                // Change the color of the icon to green.
                _circle2.fillColor.setToken("{0.0, 1.0, 0.0, 1.0}");

                CompositeEntity container = (CompositeEntity) getContainer();
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

                Double timeDouble = Double.valueOf(time.getDoubleValue());
                String[] labels = { "data", "destination", "routeTo", "hops" };
                RecordToken result = new RecordToken(labels, values);
                _receptions.put(timeDouble, result);

                director.fireAt(this, time);

                if (multi) {
                    Token[] values2 = { new DoubleToken(data),
                            new StringToken(destination), new StringToken(to2),
                            new IntToken(hops + 1) };
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

                    }

                    RecordToken result2 = new RecordToken(labels, values2);
                    _receptions.put(timeDouble, result2);

                    director.fireAt(this, time.add(delayTime));
                }

                //output.send(0, result);
            }
        } else {
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

        // following statements, the composite actor has no chance to be fired.

        if (_isEmbedded() && (_enclosingContinuousDirector() == null)) {
            Actor container = (Actor) getContainer();
            Director director = container.getExecutiveDirector();
            director.fireAt(container, _startTime);
        }
        // Set a breakpoint with index 0 for the stop time.
        // Note that do not use fireAt because that will set index to 1,
        // which may produce more than one output at the stop time.
        _breakpoints.insert(new SuperdenseTime(_stopTime, 0));
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

        // request a refiring at a future time,
        // the current time + suggested step size
        if (_currentStepSize == 0) {
            Actor container = (Actor) getContainer();
            Director enclosingDirector = container.getExecutiveDirector();
            enclosingDirector.fireAt(container, _currentTime);
        }

        return postfireResult;
    }
View Full Code Here

Examples of ptolemy.actor.Director.fireAt()

            // We have to defer the commit until current time of the environment
            // matches our local current time. Call fireAt() to ensure that the
            // enclosing director invokes prefire at the local current time.
            // This local current time should not exceed the least time on
            // the breakpoint table.
            enclosingDirector.fireAt((Actor) getContainer(), _currentTime);
            _commitIsPending = true;
            return true;
        } else {
            // NOTE: It is, in theory, impossible for local current time to
            // be less than the environment time because the prefire() method
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.