org.cpsolver.coursett

## Class Constants

- java.lang.Object
- - org.cpsolver.ifs.Constants
  - - org.cpsolver.coursett.Constants

-     public class Constants
      extends Constants

  Course Timetabling common constants.
  Version:
    CourseTT 1.3 (University Course Timetabling)
    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
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DAY_CODE_ALL` All days
    `static int` | `DAY_CODE_WEEK` All week days
    `static int[]` | `DAY_CODES` Day codes to combine several days into one int
    `static String[]` | `DAY_NAMES_SHORT` Day names in short format M, T, W, Th, F, Sa, Su
    `static int` | `DAY_SLOTS_FIRST` Number of slots per day
    `static int` | `DAY_SLOTS_LAST` Number of slots per day
    `static int` | `FIRST_SLOT_TIME_MIN` Start time of the first slot in minutes (from midnight)
    `static int` | `NR_DAYS` Number of days
    `static int` | `NR_DAYS_WEEK` Number of days of week (excludes weekend)
    `static int` | `SLOT_LENGTH_MIN` Length of a single slot in minutes
    `static int` | `SLOTS_PER_DAY` Number of slots per day
    `static int` | `SLOTS_PER_DAY_NO_EVENINGS` Number of slots per day w/o evening hours
    `static String` | `sPreferenceDiscouraged` Preference: discouraged
    `static int` | `sPreferenceLevelDiscouraged` Preference level: discouraged
    `static int` | `sPreferenceLevelNeutral` Preference level: neutral
    `static int` | `sPreferenceLevelPreferred` Preference level: preferred
    `static int` | `sPreferenceLevelProhibited` Preference level: prohibited
    `static int` | `sPreferenceLevelRequired` Preference level: required
    `static int` | `sPreferenceLevelStronglyDiscouraged` Preference level: strongly discouraged
    `static int` | `sPreferenceLevelStronglyPreferred` Preference level: strongly preferred
    `static String` | `sPreferenceNeutral` Preference: neutral
    `static String` | `sPreferencePreferred` Preference: preferred
    `static String` | `sPreferenceProhibited` Preference: prohibited
    `static String` | `sPreferenceRequired` Preference: required
    `static String` | `sPreferenceStronglyDiscouraged` Preference: strongly discouraged
    `static String` | `sPreferenceStronglyPreferred` Preference: strongly preferred

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Constants()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `preference2preferenceLevel(String prologPref)` Convert preference to preference level
    `static String` | `preferenceLevel2preference(int intPref)` Convert preference level to preference
    `static int` | `time2slot(int hour, int min)` Convert time (hour:minute) to time slot

    - ### Methods inherited from class org.cpsolver.ifs.Constants

      `getBuildNumber, getReleaseDate, getVersion`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SLOTS_PER_DAY

          public static final int SLOTS_PER_DAY

      Number of slots per day
      See Also:
        Constant Field Values

    - #### DAY_CODES

          public static int[] DAY_CODES

      Day codes to combine several days into one int

    - #### DAY_CODE_ALL

          public static int DAY_CODE_ALL

      All days

    - #### DAY_CODE_WEEK

          public static int DAY_CODE_WEEK

      All week days

    - #### SLOT_LENGTH_MIN

          public static int SLOT_LENGTH_MIN

      Length of a single slot in minutes

    - #### FIRST_SLOT_TIME_MIN

          public static int FIRST_SLOT_TIME_MIN

      Start time of the first slot in minutes (from midnight)

    - #### DAY_SLOTS_FIRST

          public static int DAY_SLOTS_FIRST

      Number of slots per day

    - #### DAY_SLOTS_LAST

          public static int DAY_SLOTS_LAST

      Number of slots per day

    - #### SLOTS_PER_DAY_NO_EVENINGS

          public static int SLOTS_PER_DAY_NO_EVENINGS

      Number of slots per day w/o evening hours

    - #### DAY_NAMES_SHORT

          public static String[] DAY_NAMES_SHORT

      Day names in short format M, T, W, Th, F, Sa, Su

    - #### NR_DAYS

          public static int NR_DAYS

      Number of days

    - #### NR_DAYS_WEEK

          public static int NR_DAYS_WEEK

      Number of days of week (excludes weekend)

    - #### sPreferenceProhibited

          public static final String sPreferenceProhibited

      Preference: prohibited
      See Also:
        Constant Field Values

    - #### sPreferenceRequired

          public static final String sPreferenceRequired

      Preference: required
      See Also:
        Constant Field Values

    - #### sPreferenceStronglyDiscouraged

          public static final String sPreferenceStronglyDiscouraged

      Preference: strongly discouraged
      See Also:
        Constant Field Values

    - #### sPreferenceDiscouraged

          public static final String sPreferenceDiscouraged

      Preference: discouraged
      See Also:
        Constant Field Values

    - #### sPreferencePreferred

          public static final String sPreferencePreferred

      Preference: preferred
      See Also:
        Constant Field Values

    - #### sPreferenceStronglyPreferred

          public static final String sPreferenceStronglyPreferred

      Preference: strongly preferred
      See Also:
        Constant Field Values

    - #### sPreferenceNeutral

          public static final String sPreferenceNeutral

      Preference: neutral
      See Also:
        Constant Field Values

    - #### sPreferenceLevelProhibited

          public static int sPreferenceLevelProhibited

      Preference level: prohibited

    - #### sPreferenceLevelRequired

          public static int sPreferenceLevelRequired

      Preference level: required

    - #### sPreferenceLevelStronglyDiscouraged

          public static int sPreferenceLevelStronglyDiscouraged

      Preference level: strongly discouraged

    - #### sPreferenceLevelDiscouraged

          public static int sPreferenceLevelDiscouraged

      Preference level: discouraged

    - #### sPreferenceLevelPreferred

          public static int sPreferenceLevelPreferred

      Preference level: preferred

    - #### sPreferenceLevelStronglyPreferred

          public static int sPreferenceLevelStronglyPreferred

      Preference level: strongly preferred

    - #### sPreferenceLevelNeutral

          public static int sPreferenceLevelNeutral

      Preference level: neutral

  - ### Constructor Detail

    - #### Constants

          public Constants()

  - ### Method Detail

    - #### preference2preferenceLevel

          public static int preference2preferenceLevel(String prologPref)

      Convert preference to preference level
      Parameters:
        `prologPref` - prolog preference (R for required, P for prohibited, -2 strongly preferred, ... 2 strongly discouraged)
      Returns:
        integer preference

    - #### preferenceLevel2preference

          public static String preferenceLevel2preference(int intPref)

      Convert preference level to preference
      Parameters:
        `intPref` - integer preference
      Returns:
        prolog preference (R for required, P for prohibited, -2 strongly preferred, ... 2 strongly discouraged)

    - #### time2slot

          public static int time2slot(int hour,
                                      int min)

      Convert time (hour:minute) to time slot
      Parameters:
        `hour` - hours
        `min` - minutes
      Returns:
        time slot