org.cpsolver.ifs.example.jobshop

## Class Operation

- java.lang.Object
- - org.cpsolver.ifs.model.Variable<Operation,Location>
  - - org.cpsolver.ifs.example.jobshop.Operation

- All Implemented Interfaces:
    Comparable<Operation>

      public class Operation
      extends Variable<Operation,Location>

  Operation.
  Each operation has its number, job, machine and processing time
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2006 - 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
  Author:
    Tomáš Müller

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.ifs.model.Variable

      `iId, iIndex, iValue`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Operation(Job job, Machine machine, int operationNumber, int processingTime)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)` Compares two operations -- job number and operation number must match
    `Job` | `getJob()` Get job
    `int` | `getJobNumber()` Get job number
    `Machine` | `getMachine()` Get machine
    `int` | `getMachineNumber()` Get machine number
    `int` | `getMaxStartTime()` Get maximal starting time
    `int` | `getMinStartTime()` Get minimal starting time
    `String` | `getName()` Operation's name (e.g., O[2,4] where 2 is the job number and 4 is the operation number
    `int` | `getOperationNumber()` Get operation number
    `Operation` | `getPrecedingOperation()` Get the preceding operation (if any)
    `int` | `getProcessingTime()` Get processing time
    `Operation` | `getSubsequentOperation()` Get the subsequent operation (if any)
    `void` | `init()` Initialozation -- fills the variable's domain
    `String` | `toString()` string representation -- for debuging and printing purposes

    - ### Methods inherited from class org.cpsolver.ifs.model.Variable

      `addContstraint, addVariableListener, assign, compareTo, constraints, constraintVariables, getAssignment, getAssignment, getAssignments, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getId, getIndex, getInitialAssignment, getLastIteration, getModel, getVariableListeners, hardConstraints, hasAssignment, hasAssignment, hashCode, hasInitialAssignment, hasValues, removeContstraint, removeInitialValue, removeValue, removeVariableListener, setAssignment, setBestAssignment, setExtra, setIndex, setInitialAssignment, setLastIteration, setModel, setValues, softConstraints, unassign, values, values, variableAssigned, variableUnassigned`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Operation

          public Operation(Job job,
                           Machine machine,
                           int operationNumber,
                           int processingTime)

      Constructor
      Parameters:
        `job` - job
        `machine` - machine
        `operationNumber` - operation number
        `processingTime` - processing time

  - ### Method Detail

    - #### getJob

          public Job getJob()

      Get job
      Returns:
        job

    - #### getJobNumber

          public int getJobNumber()

      Get job number
      Returns:
        job number

    - #### getOperationNumber

          public int getOperationNumber()

      Get operation number
      Returns:
        operation number

    - #### getMachine

          public Machine getMachine()

      Get machine
      Returns:
        machine

    - #### getMachineNumber

          public int getMachineNumber()

      Get machine number
      Returns:
        machine number

    - #### getProcessingTime

          public int getProcessingTime()

      Get processing time
      Returns:
        processing time

    - #### getPrecedingOperation

          public Operation getPrecedingOperation()

      Get the preceding operation (if any)
      Returns:
        preceding operation

    - #### getSubsequentOperation

          public Operation getSubsequentOperation()

      Get the subsequent operation (if any)
      Returns:
        subsequent operation

    - #### getMinStartTime

          public int getMinStartTime()

      Get minimal starting time
      Returns:
        minimal starting time

    - #### getMaxStartTime

          public int getMaxStartTime()

      Get maximal starting time
      Returns:
        maximal starting time

    - #### equals

          public boolean equals(Object o)

      Compares two operations -- job number and operation number must match
      Overrides:
        `equals` in class `Variable<Operation,Location>`

    - #### init

          public void init()

      Initialozation -- fills the variable's domain

    - #### toString

          public String toString()

      string representation -- for debuging and printing purposes
      Overrides:
        `toString` in class `Variable<Operation,Location>`

    - #### getName

          public String getName()

      Operation's name (e.g., O[2,4] where 2 is the job number and 4 is the operation number
      Overrides:
        `getName` in class `Variable<Operation,Location>`
      Returns:
        variable name