org.cpsolver.ifs.example.tt

## Class Activity

- java.lang.Object
- - org.cpsolver.ifs.model.Variable<Activity,Location>
  - - org.cpsolver.ifs.example.tt.Activity

- All Implemented Interfaces:
    Comparable<Activity>

      public class Activity
      extends Variable<Activity,Location>

  Activity (variable). It encodes a name, length
  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
    `Activity(int length, String id, String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDiscouragedSlot(int slot)`
    `void` | `addDiscouragedSlot(int day, int hour)`
    `void` | `addProhibitedSlot(int slot)`
    `void` | `addProhibitedSlot(int day, int hour)`
    `void` | `addResourceGroup(List<Resource> resources)`
    `void` | `addResourceGroup(Resource resource)`
    `void` | `addResourceGroup(Resource[] resources)`
    `List<Location>` | `computeValues()`
    `String` | `getActivityId()`
    `Set<Integer>` | `getDiscouragedSlots()`
    `int` | `getLength()`
    `String` | `getName()` Variable's name -- for printing purposes
    `Set<Integer>` | `getProhibitedSlots()`
    `List<Resource>` | `getResourceGroup(int idx)`
    `List<List<Resource>>` | `getResourceGroups()`
    `void` | `init()`
    `boolean` | `isDiscouragedSlot(int slot)`
    `boolean` | `isDiscouragedSlot(int day, int hour)`
    `boolean` | `isProhibited(int day, int hour, int length)`
    `boolean` | `isProhibitedSlot(int slot)`
    `boolean` | `isProhibitedSlot(int day, int hour)`

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

      `addContstraint, addVariableListener, assign, compareTo, constraints, constraintVariables, equals, 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, toString, unassign, values, values, variableAssigned, variableUnassigned`

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

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

- - ### Constructor Detail

    - #### Activity

          public Activity(int length,
                          String id,
                          String name)

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from class: `Variable`
      Variable's name -- for printing purposes
      Overrides:
        `getName` in class `Variable<Activity,Location>`
      Returns:
        variable name

    - #### getActivityId

          public String getActivityId()

    - #### getLength

          public int getLength()

    - #### addResourceGroup

          public void addResourceGroup(List<Resource> resources)

    - #### addResourceGroup

          public void addResourceGroup(Resource[] resources)

    - #### addResourceGroup

          public void addResourceGroup(Resource resource)

    - #### getResourceGroup

          public List<Resource> getResourceGroup(int idx)

    - #### getResourceGroups

          public List<List<Resource>> getResourceGroups()

    - #### getProhibitedSlots

          public Set<Integer> getProhibitedSlots()

    - #### getDiscouragedSlots

          public Set<Integer> getDiscouragedSlots()

    - #### addProhibitedSlot

          public void addProhibitedSlot(int day,
                                        int hour)

    - #### addDiscouragedSlot

          public void addDiscouragedSlot(int day,
                                         int hour)

    - #### isProhibitedSlot

          public boolean isProhibitedSlot(int day,
                                          int hour)

    - #### isDiscouragedSlot

          public boolean isDiscouragedSlot(int day,
                                           int hour)

    - #### addProhibitedSlot

          public void addProhibitedSlot(int slot)

    - #### addDiscouragedSlot

          public void addDiscouragedSlot(int slot)

    - #### isProhibitedSlot

          public boolean isProhibitedSlot(int slot)

    - #### isDiscouragedSlot

          public boolean isDiscouragedSlot(int slot)

    - #### isProhibited

          public boolean isProhibited(int day,
                                      int hour,
                                      int length)

    - #### init

          public void init()

    - #### computeValues

          public List<Location> computeValues()