ifs.example.jobshop
Class JobShopModel

java.lang.Object
  extended by ifs.model.Model
      extended by ifs.example.jobshop.JobShopModel

public class JobShopModel
extends Model

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:


Output file firmat:

Version:
1.0
Author:
Tomáš Müller

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 ifs.model.Model
addConstraint, addModelListener, addVariable, afterAssigned, afterUnassigned, assignedVariables, beforeAssigned, beforeUnassigned, bestUnassignedVariables, conflictConstraints, conflictValues, constraints, countConstraints, countVariables, getBestPerturbations, getBestUnassignedVariables, getModelListeners, getTotalValue, init, modelListenerOfType, perturbVariables, removeConstraint, removeModelListener, removeVariable, restoreBest, saveBest, toString, unassignedHardConstraints, unassignedVariables, variables, variablesWithoutInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobShopModel

public JobShopModel(int nrMachines,
                    int nrJobs)
Constructor

Parameters:
nrMachines - number of machines
nrJobs - number of jobs
Method Detail

getTotalNumberOfSlots

public int getTotalNumberOfSlots()
Get total number of slots


getMachine

public Machine getMachine(int machineNumber)
Get machine of the given numbner


countMachines

public int countMachines()
Count number of machines in the model


getJob

public Job getJob(int jobNumber)
Get job of the given number


countJobs

public int countJobs()
Count number of jobs in the model


loadModel

public static JobShopModel loadModel(String file)
                              throws IOException
Loads the model from the given file

Throws:
IOException

getFinishingTime

public int getFinishingTime()
Get finishing time of the current (partial) solution


getInfo

public Hashtable getInfo()
Get information table

Overrides:
getInfo in class Model

save

public void save(String file)
          throws IOException
Save the solution into the given file

Throws:
IOException


Copyright © 2005 Tomáš Müller