public class BBPhBuf extends MarkovProcess<examples.jmarkov.BBPhBufSt,examples.jmarkov.BBPhBufEv>
MarkovProcess.Status| Constructor and Description |
|---|
BBPhBuf()
Used by GUI.
|
BBPhBuf(int numWorkers,
int numMachines,
ContPhaseVar[] processTimes,
double[][] vels,
int[] capBuffer)
Builds a Bucket brigades system.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
active(examples.jmarkov.BBPhBufSt x,
examples.jmarkov.BBPhBufEv e)
This Boolean function returns true if one events e is active
when the system is in state i, and false otherwise
|
Transitions<examples.jmarkov.BBPhBufSt> |
activeTransitions(examples.jmarkov.BBPhBufSt x,
examples.jmarkov.BBPhBufEv e)
The user MUST implement this Function in order to describe the
dynamics of the model.
|
java.lang.String |
description()
This method should be implemented by the subclass to give word
description of the model.
|
double |
getAbsorptionRate(int j,
int f)
The absortion rate from phase f when machine j is working.
|
int[] |
getReachablePhases(int j,
int k)
Returns the reachable phases when the machine j is processing
on phase k.
|
double |
getResetRate()
Returns the steady-state rate of occurrance of a Reset (i.e.,
throughput);
|
int[] |
getStartingPhases(int j)
Returns a list of starting phases for machine j
|
double |
getStartingProb(int j,
int k)
Gets the starting probability at machine j for this phase.
|
double |
getTransitionRate(int j,
int k1,
int k2)
Gets the transition rate for machine j, from phases f1 to f2.
|
static void |
main(java.lang.String[] a)
Test Program.
|
int |
printMOPs(java.io.PrintWriter out,
int width,
int decimals)
Prints a String description of all MOPs in steady state (it
reports mean and standard deviation).
|
double |
rate(examples.jmarkov.BBPhBufSt x,
examples.jmarkov.BBPhBufSt y,
examples.jmarkov.BBPhBufEv e)
This method calculates the rate of transition from i to j when
occurs the event ev.
|
Transitions<examples.jmarkov.BBPhBufSt> |
revive(Transition<examples.jmarkov.BBPhBufSt> tr,
int i)
If worker i can start working this returns all posiible new
states.
|
addMOP, allToString, canGo, clearMOPs, debug, debug, debug, denseMatrixToString, denseMatrixToString, eventRatesToString, eventsRatesToString, generate, getDebugLevel, getDebugReporter, getEventClass, getEventNames, getEventRate, getEvents, getEventsRates, getFinalRate, getGenerator, getMaxStates, getMOPIndex, getMOPNames, getMOPNames, getMOPsAvg, getMOPsAvg, getMOPsAvg, getMOPsMoment, getMOPsMoment, getMOPsMoment, getMtjGenerator, getMtjRates, getNumStates, getProgress, getRate, getRates, getRates, getStateClass, getStates, getStates, getStatus, getStatusMsg, getSteadyState, getSteadyStateSolver, getTransientSolver, go, goStep, hideGUI, isGenerated, killGUI, label, loadGUI, MOPsToString, MOPsToString, numMOPs, pause, printAll, printAll, printDenseMatrix, printDenseMatrix, printEventsRates, printEventsRates, printMOPs, printMOPs, printStates, printStates, reset, resetResults, setDebugLevel, setDebugReporter, setMaxStates, setMOPs, setSteadyStateSolver, setTransientSolver, showGUI, statesLableMaxWidth, statesToString, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitequalspublic BBPhBuf(int numWorkers,
int numMachines,
ContPhaseVar[] processTimes,
double[][] vels,
int[] capBuffer)
numWorkers - Number of workersnumMachines - Number of machinesprocessTimes - M- dimensional vector of distributions.vels - array of velocities (N x M)capBuffer - Buffer capacity. (size M-1)public BBPhBuf()
public int[] getStartingPhases(int j)
j - machine number.public int[] getReachablePhases(int j,
int k)
j - Machine numberk - Current Phasepublic double getStartingProb(int j,
int k)
j - Machinek - Phasepublic double getTransitionRate(int j,
int k1,
int k2)
j - Machine.k1 - origin phasek2 - destination phasepublic double getAbsorptionRate(int j,
int f)
j - machinef - Phasepublic boolean active(examples.jmarkov.BBPhBufSt x,
examples.jmarkov.BBPhBufEv e)
x - Current statee - Current Eventpublic Transitions<examples.jmarkov.BBPhBufSt> activeTransitions(examples.jmarkov.BBPhBufSt x, examples.jmarkov.BBPhBufEv e)
MarkovProcess
public abstract Transitions activeTransitions(MyState i, MyEvent e){
TransitionsSet trans = new TransitionsSet();
case (ARRIVAL)
if (i.size() < capacity)
trans.add(i.doArrival(), arrRate);
break;
case(DEPARTURE)
if (i.size() >=1)
trans.add(i.doDeparture, serviceRate);
break;
}
return trans;
}
activeTransitions in class MarkovProcess<examples.jmarkov.BBPhBufSt,examples.jmarkov.BBPhBufEv>x - The current State.e - The ocurring event.MarkovProcess.activeTransitions(State, Event)public double rate(examples.jmarkov.BBPhBufSt x,
examples.jmarkov.BBPhBufSt y,
examples.jmarkov.BBPhBufEv e)
x - initial state.y - final state.e - event.public Transitions<examples.jmarkov.BBPhBufSt> revive(Transition<examples.jmarkov.BBPhBufSt> tr, int i)
tr - Transition.i - workerpublic double getResetRate()
throws NotUnichainException
NotUnichainExceptionpublic java.lang.String description()
MarkovProcessdescription in interface JMarkovElementdescription in class MarkovProcess<examples.jmarkov.BBPhBufSt,examples.jmarkov.BBPhBufEv>JMarkovElement.label()public int printMOPs(java.io.PrintWriter out,
int width,
int decimals)
MarkovProcess
public void printMOPs(PrintWriter out, int width, int decimals) {
int namesWidth = super.printMOPs(out,width, decimals);
// your oun code here:
out.println(pad("Another MOP", namesWidth, false)
+ pad(Value, width, decimals);
}
printMOPs in class MarkovProcess<examples.jmarkov.BBPhBufSt,examples.jmarkov.BBPhBufEv>out - The printer where the MOPS will be printed.width - the columns widthdecimals - the number of decimals to use.MarkovProcess.printMOPs(PrintWriter),
MarkovProcess.printMOPs(PrintWriter, int, int)public static void main(java.lang.String[] a)
a -