Reservation Table A
tableB
public Table tableB
Reservation Table B
twoTasks
public boolean twoTasks
Is true when the program
is analyzing two tasks
else false
titlePanel
private Panel titlePanel
The starting title screen
tip
private TableInputPanel tip
The Reservation Table Input panel. It allows the user to enter the reservation table information such as number of resources and time slots.
mainPanel
private Panel mainPanel
The center panel in the application. This panel uses CardLayout to switch between different panels. For example, when the user presses the Reservation Table Input button the TableInputPanel is displayed in the mainPanel position.
mainLayout
private CardLayout mainLayout
The layout manager for the mainPanel.
mainLayout
public Panel northPanel
A panel that is located at the top of the application. It displays the current task pattern and allows the user to enter a new task pattern when the application is in two task mode.
patternLabel
private Label patternLabel
Displays the words: "Enter task pattern."
currPatternLabel
private Label currPatternLabel
Displays the current task pattern.
patternTextField
private TextField patternTextField
A TextField object that allows the user to change the current task pattern.
patternButton
private Button patternButton
When this button is pressed it processes the string in the patternTextField and updates the current task pattern.
pattern
private String pattern
The current task pattern.
southPanel
private Panel southPanel
A panel located at the bottom of the application that holds a group of buttons.
iButton
private Button iButton
Pressing this button will bring up the Reservation Table Input panel where the user can create or modify a reservation table.
sdButton
private Button sdButton
Pressing this button will calculate the state diagram for the current reservation table and displays it.
qButton
private Button qButton
Pressing this button will quit the application.
hButton
private Button hButton
Pressing this button will bring up the Help panel.
stButton
private stButton
Pressing this button will calculate certain statistics about the current pipeline and display them. The statistics include PCV, MAL, Forbidden Latencies, Greedy Cycle, etc.
states
private Vector states
A vector of State objects. Keeps track of all the states for the current reservation table input.
greedyPath
private Vector greedyPath
A vector of Edge objects. These objects form the greedy cycle.
statsPanel
private TextPanel statsPanel
This is where the pipeline statistics are displayed.
helpPanel
private TextPanel helpPanel
A panel that displays instructions on how to use this application
ps
private boolean ps
A variable that is used to
keep track of what is currently being displayed in the mainPanel.
If the Pipeline Statistics
panel is being displayed then ps is true else ps is false.
Initialization. The application
is created and the components such as panels and buttons are laid out.
Setup the Help Panel.
setPatternEnabled
public void setPatternEnabled(boolean value)
If value=true then the panel
located at the top of the application is enabled
else the panel is disabled.
createNorthPanel
public void createNorthPanel()
Layout out all the components that appear at the top of the application.
createTitlePanel
public void createTitlePanel()
Setup the title panel. The panel that appears in the center of the application with the words "Reservation Table Analyzer" shown at the center of the panel.
createMainPanel
public void createMainPanel()
Setup the panel that is located at the center of the application. Add all the necessary components to the panel.
createSouthPanel
public void createSouthPanel()
Layout out all the componetns that is suppose to appear at the bottom of the application.
actionPerformed
public void actionPerformed(ActionEvent e)
This method is used to handle some of the user events in the program. Whenever the user presses one of the buttons located at the bottom this method is called and performs the appropriate task.
updatePattern
public void updatePattern(String input)
When the application is in two task mode, the user can change the current task pattern by entering a new pattern in the TextField object located at the top of the application. The method processes the string entered by the user and makes sure that it is a valid pattern before updating current task pattern.
findStates
public boolean findStates()
Finds all possible states for a given reservation table input.
printStates
public void printStates()
Prints out each state information onto the Java Console.
findGreedyCycle
public boolean findGreedyCycle()
Finds the greedy cycle for a given reservation table input.
printGreedyCycle
public void printGreedyCycle()
Prints out the greedy cycle for a given reservation table input.
printPCV
public void printPCV()
Prints out the PCV for reservation table A and table B onto a TextPanel object if the tables exists.
printForbiddenLatency
public boolean findGreedyCycle()
Prints out the forbiddeb latency for reservation table A and table B onto a TextPanel object if the tables exists.
printMALT
public void printMALT
Prints out the MAL and throughput onto a TextPanel object for a given reservation table input.
printStats
public void printStats()
Prints out pipeline statistics
for a given reservation table input.