|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--haifa.shopsim.algorithms.AbstractAlgorithm | +--haifa.shopsim.algorithms.DWFluidAlgorithm
This class is not still ready. It runs the simulation, but does not terminate.
Field Summary | |
(package private) int |
bottleMachine
The index of the bottleneck machine. |
(package private) int[] |
bottleNeckOperations
An array of buffer numbers (according to kitted) that states the operations of the botleneck machine. |
(package private) int |
currentPart
The part during which the algorithm is found. |
(package private) int |
cycleIndex
|
static java.lang.String |
EXPLANATION
|
(package private) boolean |
firstTimePartTwo
|
(package private) java.util.HashMap |
kittedRoutesMap
Keys are Operation objects and values are Integers 1,...,NumOps |
(package private) int[] |
machineIndexes
An array that has an index for each machine (the index for the bottlenck don't mean nothin. and the index says on which step from the nonBottleneckOperations the machine is working. |
(package private) java.util.HashMap |
maxUpstreamMap
Keys are operaton objects and values are Integers. |
(package private) int[][] |
nonBottleNeckOperations
An array of arrays, having I (num of machines) arrays. |
(package private) boolean[] |
nonBottleNotFinishedCycle
An array of booleans where the spot corresponding to machine i is true if the machine still hasn't completed all of it's steps with the bottlecycle. |
(package private) int |
numCycles
|
(package private) int |
numK
The number of buffers in the route. |
protected static int |
PART_ALARM
This part should only occur at a few (low prob) instances of the problem. |
protected static int |
PART_ONE
This part is the creation of the safety stocks. |
protected static int |
PART_THREE
This part is the empting of the system after the bottleneck machine has finsihed. |
protected static int |
PART_TWO
This part is the "body" of the algorithm, work in cycles. |
protected static int |
PART_ZERO
This means that the algorithm still hasn't started. |
private java.util.Random |
random
|
(package private) boolean[] |
restingMachines
An array of booleans having true for each machine that is resting. |
(package private) java.util.HashMap |
reverseKittedRoutesMap
Keys are Integers and values are Operation objects. |
(package private) double |
SAFETY_CONSTANT
Safety stocks are calucated as SAFETY_CONSTANT * log(Number in route). |
(package private) int[] |
safetyStocks
The number of safety stocks to be put in every buffer. |
Fields inherited from class haifa.shopsim.algorithms.AbstractAlgorithm |
log, shopData, shopSimulation, shopState |
Constructor Summary | |
DWFluidAlgorithm()
|
|
DWFluidAlgorithm(ShopData shopData_)
|
Method Summary | |
protected void |
calcNeededSafetyStocks()
Must be called after numK is already set. |
protected void |
doPartZero()
|
private int |
downStreamOfOperation(Operation op)
Returns the number of jobs on the route of operation that are past it (have completed it). |
java.lang.String |
explanationString()
Returns a string telling a little bit about what the algorithm does. |
java.lang.String |
getAlgorithmName()
Returns a name of the algorithm. |
boolean |
isDeterministic()
Returns true if the algorithm is determinsitic. |
protected void |
locateBottleNeck()
Find the bottleneck machine. |
void |
reset()
Does nothing, (may be overridden). |
protected void |
setBottleNeckOperations()
|
protected void |
setNonBottleNeckOperations()
|
protected void |
setUpKittedMaps()
Sets up the kitted hash map (concatantation of the routes). |
static java.lang.String |
StaticGetAlgorithmName()
|
private boolean |
timeToMoveToPartThree()
|
ShopCommand |
whatNow(int machineNumber)
Works by separtaing the timeline of the system to four parts and a special part that. |
(package private) ShopCommand |
whatNowPartAlarm(int machineNumber)
|
protected ShopCommand |
whatNowPartOne(int machineNumber)
|
(package private) ShopCommand |
whatNowPartThree(int machineNumber)
|
(package private) ShopCommand |
whatNowPartTwo(int machineNumber)
|
Methods inherited from class haifa.shopsim.algorithms.AbstractAlgorithm |
quitCalled, setEnabled, setLog, setShopData, setShopSimulationObject, setShopStateObject, toString |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String EXPLANATION
protected static final int PART_ZERO
protected static final int PART_ONE
protected static final int PART_TWO
protected static final int PART_THREE
protected static final int PART_ALARM
double SAFETY_CONSTANT
java.util.HashMap kittedRoutesMap
java.util.HashMap reverseKittedRoutesMap
int numK
int bottleMachine
int[] bottleNeckOperations
int[][] nonBottleNeckOperations
int[] safetyStocks
int currentPart
java.util.HashMap maxUpstreamMap
boolean[] restingMachines
int cycleIndex
int[] machineIndexes
boolean[] nonBottleNotFinishedCycle
int numCycles
boolean firstTimePartTwo
private java.util.Random random
Constructor Detail |
public DWFluidAlgorithm()
public DWFluidAlgorithm(ShopData shopData_)
Method Detail |
public void reset()
AbstractAlgorithm
reset
in class AbstractAlgorithm
protected void setUpKittedMaps()
protected void locateBottleNeck()
protected void setBottleNeckOperations()
protected void setNonBottleNeckOperations()
protected void calcNeededSafetyStocks()
public ShopCommand whatNow(int machineNumber)
protected void doPartZero()
protected ShopCommand whatNowPartOne(int machineNumber)
private int downStreamOfOperation(Operation op)
ShopCommand whatNowPartTwo(int machineNumber)
private boolean timeToMoveToPartThree()
ShopCommand whatNowPartThree(int machineNumber)
ShopCommand whatNowPartAlarm(int machineNumber)
public boolean isDeterministic()
ShopAlgorithm
public java.lang.String explanationString()
ShopAlgorithm
explanationString
in class AbstractAlgorithm
public static java.lang.String StaticGetAlgorithmName()
public java.lang.String getAlgorithmName()
ShopAlgorithm
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |