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

[Engine] Fixed bug with mixing metrics rate for balking and reneging [integration done]

parent 3cef03ee
......@@ -306,7 +306,6 @@ public class Queue extends InputSection {
public Queue(Integer size, String[] dropStrategies, QueueGetStrategy getStrategy,
QueuePutStrategy[] putStrategies, Impatience[] impatienceStrategies) {
this(size, -1, false, dropStrategies, getStrategy, putStrategies, impatienceStrategies);
}
/**
......
......@@ -656,6 +656,7 @@ public class LinkedJobInfoList implements JobInfoList {
* @see jmt.engine.QueueNet.JobInfoList#analyzeDropRate(jmt.engine.QueueNet.JobClass, jmt.engine.dataAnalysis.InverseMeasure)
*/
public void analyzeBalkingRate(JobClass jobClass, InverseMeasure measurement) {
System.out.println("called analyse balking rate " + jobClass.getName() + measurement);
if (jobClass != null) {
if (balkingRatePerClass == null) {
balkingRatePerClass = new InverseMeasure[numberOfJobClasses];
......@@ -818,7 +819,9 @@ public class LinkedJobInfoList implements JobInfoList {
}
protected void updateBalkingRate(JobInfo jobInfo) {
// System.out.println("update balking rate in LinkedJobInfoList " + balkingRatePerClass);
if (balkingRatePerClass != null) {
System.out.println("did we ever get in");
JobClass jobClass = jobInfo.getJob().getJobClass();
int c = jobClass.getId();
Measure m = balkingRatePerClass[c];
......@@ -827,6 +830,8 @@ public class LinkedJobInfoList implements JobInfoList {
}
}
if (balkingRate != null) {
System.out.println("did we ever get in");
balkingRate.update(getTime() - getLastJobBalkingTime(), 1.0);
}
}
......
......@@ -108,6 +108,10 @@ public abstract class EngineUtils {
return SimConstants.THROUGHPUT;
} else if (type.equals(SimulationDefinition.MEASURE_DR)) {
return SimConstants.DROP_RATE;
} else if (type.equals(SimulationDefinition.MEASURE_RR)) {
return SimConstants.RENEGING_RATE;
} else if (type.equals(SimulationDefinition.MEASURE_BR)) {
return SimConstants.BALKING_RATE;
} else if (type.equals(SimulationDefinition.MEASURE_S_CN)) {
return SimConstants.SYSTEM_NUMBER_OF_JOBS;
} else if (type.equals(SimulationDefinition.MEASURE_S_RP)) {
......
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