haifa.shopsim.algorithms
Class FIAalgorithm
java.lang.Object
|
+--haifa.shopsim.algorithms.AbstractAlgorithm
|
+--haifa.shopsim.algorithms.FIAalgorithm
- All Implemented Interfaces:
- ShopAlgorithm
- Direct Known Subclasses:
- MakespanFIAalgorithm
- abstract class FIAalgorithm
- extends AbstractAlgorithm
This is the FluidImmitationAlgorithm(FIA). It uses the following
abstract entities:
- realLifeFunction - This is a value of the shop (per buffer) at a certain
time.
- immitatedFunction - This is the value of the fluid solution (maybe fluid
optimal) at a certan time (per buffer).
- lagFunction - This is the value of the lag (by how much the real
life function differs from the immitatedFunction.
- breakTie - This function is called when two operations on a machine have the same lagFunction value, in that case,
the function decides which operation is to be scehduled.
The whatNow(machine) method simply looks at all of lagFunctions for
all buffers of machine. And schedules the buffer that is most lagging
(and also has a job).
Dervied subclasses of this class should select proper functions
(as listed above).
Method Summary |
protected abstract Operation |
breakTie(Operation one,
Operation two)
When two operations have the same lagFunction value, this method decides which is the one that is to be scheduled. |
protected abstract double |
immitatedValue(Operation op)
Returns the value of the fluid solution that is being immitated
for a specific buffer. |
boolean |
isDeterministic()
Returns true, this is a determinsitic algorithm. |
protected abstract double |
lagFunction(Operation op)
Determines by how much the Operation op is lagging behind
the immitated solution. |
protected abstract double |
realLifeFunction(Operation op)
Returns the value of a function of the JobShopState. |
ShopCommand |
whatNow(int machineNumber)
Returns a ShopCommand class which has the directions on the next immidiate
action to do for the specific machine.
This method looks at the shop state objects and decides what the machine should do. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
FIAalgorithm
public FIAalgorithm()
FIAalgorithm
public FIAalgorithm(ShopData shopData_,
ShopState shopState_,
java.io.PrintWriter log_)
FIAalgorithm
public FIAalgorithm(ShopData shopData_,
ShopState shopState_)
FIAalgorithm
public FIAalgorithm(ShopData shopData_)
isDeterministic
public boolean isDeterministic()
- Returns true, this is a determinsitic algorithm.
whatNow
public ShopCommand whatNow(int machineNumber)
- Description copied from interface:
ShopAlgorithm
- Returns a ShopCommand class which has the directions on the next immidiate
action to do for the specific machine.
This method looks at the shop state objects and decides what the machine should do.
lagFunction
protected abstract double lagFunction(Operation op)
- Determines by how much the Operation op is lagging behind
the immitated solution.
immitatedValue
protected abstract double immitatedValue(Operation op)
- Returns the value of the fluid solution that is being immitated
for a specific buffer.
realLifeFunction
protected abstract double realLifeFunction(Operation op)
- Returns the value of a function of the JobShopState.
breakTie
protected abstract Operation breakTie(Operation one,
Operation two)
- When two operations have the same lagFunction value, this method decides which is the one that is to be scheduled.