/** A class used to keep track of constants within the program @author Erika Harrison @version 1.0 24-06-02 */ public class Constants { //values used to identify the different servers, by the simulation class public static final int SERVER_ENTER = 0; public static final int SERVER_T1 = 1; public static final int SERVER_T2 = 2; public static final int SERVER_SCHED = 3; public static final int SERVER_OSAP = 4; public static final int NUM_SERVERS = 5; //number of students to go through the system public static final int NUM_TIMES = 450; //point at which the statistics start calculating data public static final int START_STATS = 50; //different probability values public static final long SEEDA = 11; public static final long SEEDT = 21; public static final long SEEDS = 31; public static final long SEEDL = 41; public static final long SEED_DECISION = 51; public static final double MEANA = 10; public static final double MEANT = 20; public static final double MEANS = 10; public static final double MEANL = 20; public static final int P = 90; //used for debugging purposes public static final boolean DEBUG = false; //used to randomly generate true/false values for the Student and for //the 2 tuition lines private static RandomInterface generateTrueFalse; private static int probability; public static void setRandom(long seed, int prob) { generateTrueFalse = DataFactory.makeRandom(seed); probability = prob; } public static boolean toOSAP() { return (generateTrueFalse.nextUniformInt(1, 100) <= probability); } public static boolean toT1() { return (generateTrueFalse.nextUniformInt(1, 100) <= 50); } }