Package ptolemy.domains.sdf.optimize
Class OptimalScheduleFinder
- java.lang.Object
-
- ptolemy.domains.sdf.optimize.OptimalScheduleFinder
-
public class OptimalScheduleFinder extends java.lang.Object
Class 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
,OptimizingSDFScheduler
andBufferingProfile
for 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 class
OptimalScheduleFinder._Actor
A model of an actor.protected static class
OptimalScheduleFinder._Channel
the 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 class
OptimalScheduleFinder._ListOfActors
A list of actors, derived from LinkedList.protected static class
OptimalScheduleFinder._ListOfChannels
A list of channels, based on LinkedList.protected static class
OptimalScheduleFinder._ListOfPorts
A list of ports, based on LinkedList.protected static class
OptimalScheduleFinder._Port
A port of an actor, connected to a channel.protected static class
OptimalScheduleFinder._SetOfStates
A set of states, based on HashSet.protected static class
OptimalScheduleFinder._SortedSetOfStates
A sorted set of states.protected static class
OptimalScheduleFinder._State
State models a global state of the SDF graph and remembers the actor that was fired to reach it.protected static class
OptimalScheduleFinder._StateComparator
An abstract super class for Comparators to maintain a sorted list of states.protected static class
OptimalScheduleFinder._StateComparatorLowestValue
A Comparator to maintain a sorted list of states, sorted on their value.protected static class
OptimalScheduleFinder._StateComparatorMaximumProgress
A Comparator to maintain a sorted list of states, sorted on their progress to the final state.protected static class
OptimalScheduleFinder._TwoWayHashMap
A 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.Schedule
makeSchedule(java.util.Map firingVector)
Make a schedule using an exhaustive BFS-like optimizing algorithm.Schedule
makeScheduleGreedy(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 IllegalActionException
Instantiate the analysis model from the core model.- Parameters:
firingVector
- contains repetition vector information- Throws:
IllegalActionException
- if model information inconsistent
-
-