Commit 3cef03ee authored by rosemaryng's avatar rosemaryng
Browse files

Fixed bug with station rate and temporary created new Queue() function for compatibility

parent bb9f8fe7
......@@ -160,8 +160,9 @@ public class Queue extends InputSection {
* @param drop True if the queue should rejects new jobs when it is full,
* false otherwise.
* @param getStrategy Queue get strategy: if null FCFS strategy is used.
* @param putStrategies Queue put strategy per class: if null Tail strategy is used.
* @param putStrategies Queue put strategy per class: if null Tail strategy is used
*/
//TODO rose: putstrategy null is not indicated?
public Queue(int size, int maxRunning, boolean serverPreemptive, boolean drop, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
//auto = false, otherwise when a JOB message is received,
//the corresponding Job object is automatically added to
......@@ -279,6 +280,10 @@ public class Queue extends InputSection {
}
}
public Queue(Integer size, String[] dropStrategies, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
this(size.intValue(), -1, false, dropStrategies, getStrategy, putStrategies);
}
/**
* Creates a new instance of finite Queue with reneging. This is the newest constructor that supports
* different drop strategies and reneging strategies. Other constructors are left for compatibility.
......@@ -292,16 +297,17 @@ public class Queue extends InputSection {
*/
public Queue(Integer size, Integer maxRunning, Boolean serverPreemptive, String[] dropStrategies, QueueGetStrategy getStrategy,
QueuePutStrategy[] putStrategies, Impatience[] impatienceStrategies) {
this(size, maxRunning, serverPreemptive, dropStrategies, getStrategy, putStrategies);
// Called method with decoded drop Strategies
this(size, maxRunning, serverPreemptive, dropStrategies, getStrategy, putStrategies);
// Add impatience strategies for each class
impatienceStrategyPerStationClass = impatienceStrategies;
}
public Queue(Integer size, String[] dropStrategies, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
this(size.intValue(), -1, false, dropStrategies, getStrategy, putStrategies);
}
public Queue(Integer size, String[] dropStrategies, QueueGetStrategy getStrategy,
QueuePutStrategy[] putStrategies, Impatience[] impatienceStrategies) {
this(size, -1, false, dropStrategies, getStrategy, putStrategies, impatienceStrategies);
}
/**
* Turns on the "redirecting queue" behaviour.
......
......@@ -87,7 +87,7 @@ import org.xml.sax.SAXNotSupportedException;
public class SimLoader {
//used for debug purposes
private static final boolean DEBUG = false;
private static final boolean DEBUG = true;
//represents the entire XML document. it is the root
//of the document tree, and provides the primary access to the document's data
......
......@@ -49,6 +49,7 @@ import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import jmt.engine.simEngine.Simulation;
import jmt.framework.data.LabelValue;
import jmt.framework.data.MacroReplacer;
import jmt.framework.gui.layouts.SpringUtilities;
......@@ -485,7 +486,7 @@ public class MeasurePanel extends WizardPanel implements CommonConstants {
return classesCombos.getRenderer();
}
} else {
return super.getCellRenderer(row, column);
return super.getCellRenderer(row, column);
}
}
......@@ -601,8 +602,8 @@ public class MeasurePanel extends WizardPanel implements CommonConstants {
|| type.equals(SimulationDefinition.MEASURE_S_RP)
|| type.equals(SimulationDefinition.MEASURE_S_X)
|| type.equals(SimulationDefinition.MEASURE_S_DR)
|| type.equals(SimulationDefinition.MEASURE_RR)
|| type.equals(SimulationDefinition.MEASURE_BR)
|| type.equals(SimulationDefinition.MEASURE_S_RR)
|| type.equals(SimulationDefinition.MEASURE_S_BR)
|| type.equals(SimulationDefinition.MEASURE_S_P)) {
return new Measure(getStationMeasureType(type), "", classKey);
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment