haifa.shopsim
Class ShopCommand

java.lang.Object
  |
  +--haifa.shopsim.ShopCommand

public class ShopCommand
extends java.lang.Object

This is a command generated by a scheduling algorithm to a job shop. It tells the shop what to do next. Machines are identified using the machine String. This string may have a numeric character value siginifing the machine. The Job to do on the current machine is also a String. This string has the unique job id.


Field Summary
(package private)  int code
          The type of command, schedule, quit, etc...
static int CODE_QUIT
          when code has this value it means that the command is to quit the work of the job shop.
static int CODE_REST
           
static int CODE_SCHEDULE
          when code has this value it means that this is a scheduling command.
(package private)  java.lang.String job
          The job that should be performed on this machine.
(package private)  java.lang.String machine
          The machine that should do this command.
 Operation op
           
 
Constructor Summary
ShopCommand(java.lang.String machine_, int code_)
           
ShopCommand(java.lang.String machine_, Operation op_, int code_)
           
ShopCommand(java.lang.String machine_, java.lang.String job_, int code_)
          Constructs a shop command.
 
Method Summary
 boolean isQuit()
          Ask if the command is a quit command.
 boolean isRest()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

code

int code
The type of command, schedule, quit, etc...

CODE_SCHEDULE

public static final int CODE_SCHEDULE
when code has this value it means that this is a scheduling command.

CODE_QUIT

public static final int CODE_QUIT
when code has this value it means that the command is to quit the work of the job shop.

CODE_REST

public static final int CODE_REST

machine

java.lang.String machine
The machine that should do this command.

job

java.lang.String job
The job that should be performed on this machine. This may be of the form (r,o,t) route, operation, type

op

public Operation op
Constructor Detail

ShopCommand

public ShopCommand(java.lang.String machine_,
                   java.lang.String job_,
                   int code_)
Constructs a shop command.

ShopCommand

public ShopCommand(java.lang.String machine_,
                   Operation op_,
                   int code_)

ShopCommand

public ShopCommand(java.lang.String machine_,
                   int code_)
Method Detail

isQuit

public boolean isQuit()
Ask if the command is a quit command.

isRest

public boolean isRest()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object