001/* Interface for directors that use a super-dense model of time. 002 003 Copyright (c) 2009-2011 The Regents of the University of California. 004 All rights reserved. 005 Permission is hereby granted, without written agreement and without 006 license or royalty fees, to use, copy, modify, and distribute this 007 software and its documentation for any purpose, provided that the above 008 copyright notice and the following two paragraphs appear in all copies 009 of this software. 010 011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 015 SUCH DAMAGE. 016 017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 022 ENHANCEMENTS, OR MODIFICATIONS. 023 024 PT_COPYRIGHT_VERSION_2 025 COPYRIGHTENDKEY 026 027 */ 028package ptolemy.actor; 029 030import ptolemy.kernel.util.IllegalActionException; 031 032////////////////////////////////////////////////////////////////////////// 033//// SuperdenseTimeDirector 034 035/** 036 This is an interface for directors that use a superdense model of time. 037 Actors can determine the index, also called the microstep, 038 of current time by calling getIndex(). 039 <p> 040 Superdense time is defined by Haiyang Zheng as: 041 <blockquote> 042 <p>"The interactions between CT and DE subsystems and between DE 043 subsystems themselves are captured by discontinuities in 044 continuous-time signals and simultaneous discrete events in 045 discrete-event signals."</p> 046 047 <p>"In order to precisely represent them in compute execution 048 results, a two-dimension domain, called "superdense time," is used 049 as the domain for defining signals. This domain allows a signal to 050 have multiple values at the same time point while keeping the values 051 ordered."</p> 052 </blockquote> 053 <p>See: Haiyang Zheng. 054<a href="https://ptolemy.berkeley.edu/projects/chess/pubs/303.html#in_browser" target="_top"><i>Operational Semantics of Hybrid Systems</i></a>, PhD thesis, 055 University of California, Berkeley, May, 2007.</p> 056 057 @author Edward A. Lee 058 @version $Id$ 059 @since Ptolemy II 8.0 060 @Pt.ProposedRating Yellow (eal) 061 @Pt.AcceptedRating Red (eal) 062 */ 063public interface SuperdenseTimeDirector { 064 /** Return a superdense time index for the current time. 065 * @return A superdense time object. 066 * @see #setIndex(int) 067 */ 068 public int getIndex(); 069 070 /** Set the superdense time index. This should only be 071 * called by an enclosing director. 072 * @param index The index of the superdense time object. 073 * Events that occur at the same time have different indicies. 074 * @exception IllegalActionException If the specified index is invalid. 075 * @see #getIndex() 076 */ 077 public void setIndex(int index) throws IllegalActionException; 078}