org.cpsolver.ifs.example.jobshop

## Class Location

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

- All Implemented Interfaces:
    Comparable<Location>, AssignmentComparable<Location,Operation,Location>

      public class Location
      extends Value<Operation,Location>

  Location of an operation.
  Each location has its start 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/.

- - ### Field Summary

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

      `iValue`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Location(Operation op, int startTime)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `after(Location anotherLocation)` Returns true if after the given location
    `boolean` | `before(Location anotherLocation)` Returns true if before the given location
    `int` | `getFinishingTime()` Get finishing time of the location (start time + operation processing time)
    `String` | `getName()` Name -- start time
    `int` | `getStartTime()` Get start time of the location
    `boolean` | `overlap(Location anotherLocation)` Returns true if overlap with the given location
    `double` | `toDouble()` Start time of the location
    `String` | `toString()` String representation (operation name = start time)

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

      `compareTo, compareTo, conflicts, conflicts, equals, getDescription, getExtra, getId, hashCode, isConsistent, setExtra, setVariable, toDouble, valueEquals, valueEquals, variable`

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

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

- - ### Constructor Detail

    - #### Location

          public Location(Operation op,
                          int startTime)

      Constructor
      Parameters:
        `op` - parent operation
        `startTime` - start time

  - ### Method Detail

    - #### getStartTime

          public int getStartTime()

      Get start time of the location
      Returns:
        start time of the location

    - #### getFinishingTime

          public int getFinishingTime()

      Get finishing time of the location (start time + operation processing time)
      Returns:
        finishing time of the location

    - #### toDouble

          public double toDouble()

      Start time of the location
      Overrides:
        `toDouble` in class `Value<Operation,Location>`
      Returns:
        this value's contribution to the solution value

    - #### toString

          public String toString()

      String representation (operation name = start time)
      Overrides:
        `toString` in class `Value<Operation,Location>`

    - #### getName

          public String getName()

      Name -- start time
      Overrides:
        `getName` in class `Value<Operation,Location>`
      Returns:
        value name

    - #### overlap

          public boolean overlap(Location anotherLocation)

      Returns true if overlap with the given location
      Parameters:
        `anotherLocation` - given location
      Returns:
        true if overlap with the given location

    - #### before

          public boolean before(Location anotherLocation)

      Returns true if before the given location
      Parameters:
        `anotherLocation` - given location
      Returns:
        true if before the given location

    - #### after

          public boolean after(Location anotherLocation)

      Returns true if after the given location
      Parameters:
        `anotherLocation` - given location
      Returns:
        true if after the given location