|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Model net.sf.cpsolver.ifs.example.jobshop.JobShopModel
public class JobShopModel
Job Shop model.
It contains the number of available time slots and all machines and jobs.
It can also load the model from a file and save the solution.
Input file format:
<number of jobs> <number of machines>
10 10
4 88 8 68 6 94 5 99 1 67 2 89 9 77 7 99 0 86 3 92
5 72 3 50 6 69 4 75 2 94 8 66 0 92 1 82 7 94 9 63
9 83 8 61 0 83 1 65 6 64 5 85 7 78 4 85 2 55 3 77
7 94 2 68 1 61 4 99 3 54 6 75 5 66 0 76 9 63 8 67
3 69 4 88 9 82 8 95 0 99 2 67 6 95 5 68 7 67 1 86
1 99 4 81 5 64 6 66 8 80 2 80 7 69 9 62 3 79 0 88
7 50 1 86 4 97 3 96 0 95 8 97 2 66 5 99 6 52 9 71
4 98 6 73 3 82 2 51 1 71 5 94 7 85 0 62 8 95 9 79
0 94 6 71 3 81 7 85 1 66 2 90 4 76 5 58 8 93 9 97
3 50 0 59 1 82 8 67 7 56 9 96 6 58 4 81 5 59 2 96
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.model.Model |
---|
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sDoubleFormat, sPercentageFormat, sTimeFormat |
Constructor Summary | |
---|---|
JobShopModel(int nrMachines,
int nrJobs)
Constructor |
Method Summary | |
---|---|
int |
countJobs()
Count number of jobs in the model |
int |
countMachines()
Count number of machines in the model |
int |
getFinishingTime()
Get finishing time of the current (partial) solution |
Hashtable |
getInfo()
Get information table |
Job |
getJob(int jobNumber)
Get job of the given number |
Machine |
getMachine(int machineNumber)
Get machine of the given numbner |
int |
getTotalNumberOfSlots()
Get total number of slots |
static JobShopModel |
loadModel(String file)
Loads the model from the given file |
void |
save(String file)
Save the solution into the given file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JobShopModel(int nrMachines, int nrJobs)
nrMachines
- number of machinesnrJobs
- number of jobsMethod Detail |
---|
public int getTotalNumberOfSlots()
public Machine getMachine(int machineNumber)
public int countMachines()
public Job getJob(int jobNumber)
public int countJobs()
public static JobShopModel loadModel(String file) throws IOException
IOException
public int getFinishingTime()
public Hashtable getInfo()
getInfo
in class Model
public void save(String file) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |