net.sf.cpsolver.ifs.example.tt
Class Activity

java.lang.Object
  extended by net.sf.cpsolver.ifs.model.Variable<Activity,Location>
      extended by net.sf.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.2 (Iterative Forward Search)
Copyright (C) 2006 - 2010 Tomas Muller
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 net.sf.cpsolver.ifs.model.Variable
iId, iValue
 
Constructor Summary
Activity(int length, String id, String name)
           
 
Method Summary
 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 net.sf.cpsolver.ifs.model.Variable
addContstraint, addVariableListener, assign, compareTo, constraints, constraintVariables, countAssignments, equals, getAssignment, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getId, getInitialAssignment, getModel, getVariableListeners, hardConstraints, hasAssignment, hashCode, hasInitialAssignment, hasValues, lastAssignmentIteration, lastUnassignmentIteration, removeContstraint, removeInitialValue, removeValue, removeVariableListener, setBestAssignment, setExtra, setInitialAssignment, setModel, setValues, softConstraints, toString, unassign, values
 
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>

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()


Copyright © 2014 UniTime LLC. All Rights Reserved.