Commit 6c3defb2 authored by rosemaryng's avatar rosemaryng
Browse files

[Retry Full] Added new constant and definition for FINITE_RETRIAL for retry full case

parent 6a9ef72d
......@@ -91,6 +91,8 @@ public class Queue extends InputSection {
public static final String FINITE_DROP = "drop";
public static final String FINITE_BLOCK = "BAS blocking";
public static final String FINITE_WAITING = "waiting queue";
public static final String FINITE_RETRIAL = "retry full";
private int size;
private int maxRunning;
......@@ -259,7 +261,7 @@ public class Queue extends InputSection {
*
* @param size Queue size (-1 = infinite queue).
* @param dropStrategies Drop strategy per class: FINITE_DROP || FINITE_BLOCK
* || FINITE_WAITING.
* || FINITE_WAITING || FINITE_RETRIAL.
* @param getStrategy Queue get strategy: if null FCFS strategy is used.
* @param putStrategies Queue put strategy per class: if null Tail strategy is used.
*/
......@@ -290,7 +292,7 @@ public class Queue extends InputSection {
*
* @param size Queue size (-1 = infinite queue).
* @param dropStrategies Drop strategy per class: FINITE_DROP || FINITE_BLOCK
* || FINITE_WAITING.
* || FINITE_WAITING || FINITE_RETRIAL.
* @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 impatienceStrategies Impatience strategies unique to each station and class.
......
......@@ -54,6 +54,7 @@ public class Storage extends InputSection {
public static final String FINITE_DROP = "drop";
public static final String FINITE_BLOCK = "BAS blocking";
public static final String FINITE_WAITING = "waiting queue";
public static final String FINITE_RETRIAL = "retry full";
private int totalCapacity;
private int[] capacities;
......@@ -100,7 +101,7 @@ public class Storage extends InputSection {
} else if (dropRules[i].equals(FINITE_BLOCK)) {
drop[i] = false;
block[i] = true;
} else if (dropRules[i].equals(FINITE_WAITING)) {
} else if (dropRules[i].equals(FINITE_WAITING) || dropRules[i].equals(FINITE_RETRIAL)) { //TODO rose: confirm
drop[i] = false;
block[i] = false;
} else {
......
......@@ -249,6 +249,7 @@ public interface CommonConstants {
public static final String FINITE_DROP = "Drop";
public static final String FINITE_BLOCK = "BAS Blocking";
public static final String FINITE_WAITING = "Waiting Queue";
public static final String FINITE_RETRIAL = "Retry Full";
public static final String CLASSES_DESCRIPTION = HTML_START + HTML_FONT_TITLE + "Classes Characteristics" + HTML_FONT_TIT_END + HTML_FONT_NORM
+ "Define type (Open or Closed), name and parameters for each customer class."
......
......@@ -1405,7 +1405,7 @@ public class CommonModel implements CommonConstants, ClassDefinition, StationDef
* Returns drop rule associated with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @return FINITE_DROP || FINITE_BLOCK || FINITE_WAITING
* @return FINITE_DROP || FINITE_BLOCK || FINITE_WAITING || FINITE_RETRIAL
*/
@Override
public String getDropRule(Object stationKey, Object classKey) {
......@@ -1420,7 +1420,7 @@ public class CommonModel implements CommonConstants, ClassDefinition, StationDef
* Sets drop rule associated with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @param dropRule: FINITE_DROP || FINITE_BLOCK || FINITE_WAITING
* @param dropRule: FINITE_DROP || FINITE_BLOCK || FINITE_WAITING || FINITE_RETRIAL
*/
@Override
public void setDropRule(Object stationKey, Object classKey, String dropRule) {
......
......@@ -320,7 +320,7 @@ public interface StationDefinition {
* Returns drop rule associated with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @return FINITE_DROP || FINITE_BLOCK || FINITE_WAITING
* @return FINITE_DROP || FINITE_BLOCK || FINITE_WAITING || FINITE_RETRIAL
*/
public String getDropRule(Object stationKey, Object classKey);
......@@ -328,7 +328,7 @@ public interface StationDefinition {
* Sets drop rule associated with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @param dropRule: FINITE_DROP || FINITE_BLOCK || FINITE_WAITING
* @param dropRule: FINITE_DROP || FINITE_BLOCK || FINITE_WAITING || FINITE_RETRIAL
*/
public void setDropRule(Object stationKey, Object classKey, String dropRule);
......
......@@ -710,6 +710,7 @@ public class DefaultsEditor extends JDialog implements CommonConstants {
dropRules.put(CommonConstants.FINITE_DROP, CommonConstants.FINITE_DROP);
dropRules.put(CommonConstants.FINITE_BLOCK, CommonConstants.FINITE_BLOCK);
dropRules.put(CommonConstants.FINITE_WAITING, CommonConstants.FINITE_WAITING);
dropRules.put(CommonConstants.FINITE_RETRIAL, CommonConstants.FINITE_RETRIAL);
addInputCombo(text, property, cont, dropRules);
}
......
......@@ -83,7 +83,7 @@ public class InputSectionPanel extends WizardPanel implements CommonConstants {
/**
* Used to define drop rules
*/
protected static final Object[] dropRules = { FINITE_DROP, FINITE_BLOCK, FINITE_WAITING };
protected static final Object[] dropRules = { FINITE_DROP, FINITE_BLOCK, FINITE_WAITING, FINITE_RETRIAL};
/**
* Used to define impatience strategies
*/
......
......@@ -75,7 +75,7 @@ public class InputSectionPanelLPS extends WizardPanel implements CommonConstants
/**
* Used to define drop rules
*/
protected static final Object[] dropRules = { FINITE_DROP, FINITE_BLOCK, FINITE_WAITING };
protected static final Object[] dropRules = { FINITE_DROP, FINITE_BLOCK, FINITE_WAITING, FINITE_RETRIAL };
private boolean isInitComplete;
......
......@@ -64,7 +64,7 @@ public class StorageSectionPanel extends WizardPanel implements CommonConstants
private static final long serialVersionUID = 1L;
private static final Object[] queuePolicies = { QUEUE_STRATEGY_FCFS, QUEUE_STRATEGY_LCFS, QUEUE_STRATEGY_RAND };
private static final Object[] dropRules = { FINITE_DROP, FINITE_BLOCK, FINITE_WAITING };
private static final Object[] dropRules = { FINITE_DROP, FINITE_BLOCK, FINITE_WAITING, FINITE_RETRIAL};
private boolean isInitComplete;
......
......@@ -115,6 +115,7 @@ public class XMLReader implements XMLConstantNames, CommonConstants {
temp.put("drop", FINITE_DROP);
temp.put("BAS blocking", FINITE_BLOCK);
temp.put("waiting queue", FINITE_WAITING);
temp.put("retry full", FINITE_RETRIAL);
DROP_RULES_MAPPING = Collections.unmodifiableMap(temp);
}
......
......@@ -127,6 +127,7 @@ public class XMLWriter implements CommonConstants, XMLConstantNames {
temp.put(FINITE_DROP, "drop");
temp.put(FINITE_BLOCK, "BAS blocking");
temp.put(FINITE_WAITING, "waiting queue");
temp.put(FINITE_RETRIAL, "retry full");
DROP_RULES_MAPPING = Collections.unmodifiableMap(temp);
}
......
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