001    /**
002     * planningtool - A Planning Tool with Critiquing Support.
003     * 
004     * Copyright (C) 2006 olale
005    
006     * This program is free software; you can redistribute it and/or
007     * modify it under the terms of the GNU General Public License
008     * as published by the Free Software Foundation; either version 2
009     * of the License, or (at your option) any later version.
010    
011     * This program is distributed in the hope that it will be useful,
012     * but WITHOUT ANY WARRANTY; without even the implied warranty of
013     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014     * GNU General Public License for more details.
015    
016     * You should have received a copy of the GNU General Public License
017     * along with this program; if not, write to the Free Software
018     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
019    
020     * Contact information: 
021     * E-mail: olale@ida.liu.se
022     *         olale@lysator.liu.se
023     */
024    package se.liu.ida.critiquer.simulation;
025    
026    import java.io.Serializable;
027    import java.util.Calendar;
028    
029    public interface SimulationElement extends Serializable {
030    
031            /**
032             * 
033             * this method is called when the simulation is initiated.
034             * 
035             */
036            public void initSimulation(SimulationEngine engine);
037    
038            /**
039             * Called by the simulation engine when the time is increased in the
040             * simulation. The time amount must be positive and is measured in minutes.
041             * 
042             * @param step
043             *            in minutes forward
044             */
045            public void stepForward(int step);
046    
047            /**
048             * Called by the simulation engine when the time is decreased in the
049             * simulation. The time amount must be negative and is measured in minutes.
050             * 
051             * @param step
052             *            in minutes backwards
053             */
054            public void stepBackward(int step);
055            
056            /**
057             * Called by the simulation engine when it is useful to step to a fix point in time instead of incrementally 
058             * 
059             * @param time
060             */
061            public void stepTo(Calendar time);
062    
063    }