Package ptolemy.domains.sdf.optimize
Class OptimalScheduleFinder
- java.lang.Object
 - 
- ptolemy.domains.sdf.optimize.OptimalScheduleFinder
 
 
- 
public class OptimalScheduleFinder extends java.lang.ObjectClass comments
An OptimalScheduleFinder encapsulates an algorithm to find an optimized schedule. In particular it implements a simple state space exploration algorithm to find a minimum buffer size schedule.See
OptimizingSDFDirector,OptimizingSDFSchedulerandBufferingProfilefor more information.- Since:
 - Ptolemy II 10.0
 - Version:
 - $Id$
 - Author:
 - Marc Geilen
 - See Also:
 OptimizingSDFDirector,OptimizingSDFScheduler,BufferingProfile- Pt.AcceptedRating:
 - Red ()
 - Pt.ProposedRating:
 - Red (mgeilen)
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classOptimalScheduleFinder._ActorA model of an actor.protected static classOptimalScheduleFinder._Channelthe state of the channel in the channel array has one integer at stateIndex indicating the number of tokens in the channel and another integer at stateIndex+1 indicating how many consumer are still to read the token I need to remember per receiver how many tokens there are for that receiver.protected static classOptimalScheduleFinder._ListOfActorsA list of actors, derived from LinkedList.protected static classOptimalScheduleFinder._ListOfChannelsA list of channels, based on LinkedList.protected static classOptimalScheduleFinder._ListOfPortsA list of ports, based on LinkedList.protected static classOptimalScheduleFinder._PortA port of an actor, connected to a channel.protected static classOptimalScheduleFinder._SetOfStatesA set of states, based on HashSet.protected static classOptimalScheduleFinder._SortedSetOfStatesA sorted set of states.protected static classOptimalScheduleFinder._StateState models a global state of the SDF graph and remembers the actor that was fired to reach it.protected static classOptimalScheduleFinder._StateComparatorAn abstract super class for Comparators to maintain a sorted list of states.protected static classOptimalScheduleFinder._StateComparatorLowestValueA Comparator to maintain a sorted list of states, sorted on their value.protected static classOptimalScheduleFinder._StateComparatorMaximumProgressA Comparator to maintain a sorted list of states, sorted on their progress to the final state.protected static classOptimalScheduleFinder._TwoWayHashMapA two-way hash map provides fast lookup in both directions of a bijective function between objects. 
- 
Constructor Summary
Constructors Constructor Description OptimalScheduleFinder(OptimizingSDFScheduler scheduler, OptimizingSDFDirector.OptimizationCriteria criterion)Construct an instance of the OptimalScheduleFinder. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_instantiateAnalysisModel(java.util.Map firingVector)Instantiate the analysis model from the core model.SchedulemakeSchedule(java.util.Map firingVector)Make a schedule using an exhaustive BFS-like optimizing algorithm.SchedulemakeScheduleGreedy(java.util.Map firingVector)Make a schedule using a greedy (non-optimizing algorithm). 
 - 
 
- 
- 
Constructor Detail
- 
OptimalScheduleFinder
public OptimalScheduleFinder(OptimizingSDFScheduler scheduler, OptimizingSDFDirector.OptimizationCriteria criterion)
Construct an instance of the OptimalScheduleFinder. Creates an object associated with the OptimizingSDFSchedule scheduler and using the optimization criterion criterion to find an optimized schedule.- Parameters:
 scheduler- schedulercriterion- optimization criterion
 
 - 
 
- 
Method Detail
- 
makeScheduleGreedy
public Schedule makeScheduleGreedy(java.util.Map firingVector)
Make a schedule using a greedy (non-optimizing algorithm).- Parameters:
 firingVector- repetition vector- Returns:
 - the computed schedule
 
 
- 
makeSchedule
public Schedule makeSchedule(java.util.Map firingVector)
Make a schedule using an exhaustive BFS-like optimizing algorithm.- Parameters:
 firingVector- repetition vector- Returns:
 - the computed schedule
 
 
- 
_instantiateAnalysisModel
protected void _instantiateAnalysisModel(java.util.Map firingVector) throws IllegalActionExceptionInstantiate the analysis model from the core model.- Parameters:
 firingVector- contains repetition vector information- Throws:
 IllegalActionException- if model information inconsistent
 
 - 
 
 -