net.sf.cpsolver.ifs.example.tt
Class Activity
java.lang.Object
net.sf.cpsolver.ifs.model.Variable
net.sf.cpsolver.ifs.example.tt.Activity
- All Implemented Interfaces:
- Comparable
public class Activity
- extends Variable
Activity (variable).
It encodes a name, length
- Version:
- IFS 1.1 (Iterative Forward Search)
Copyright (C) 2006 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic
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 2.1 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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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 |
Activity
public Activity(int length,
String id,
String name)
getName
public String getName()
- Description copied from class:
Variable
- Variable's name -- for printing purposes
- Overrides:
getName
in class Variable
getActivityId
public String getActivityId()
getLength
public int getLength()
addResourceGroup
public void addResourceGroup(Vector resources)
addResourceGroup
public void addResourceGroup(Resource[] resources)
addResourceGroup
public void addResourceGroup(Resource resource)
getResourceGroup
public Vector getResourceGroup(int idx)
getResourceGroups
public Vector getResourceGroups()
getProhibitedSlots
public Set getProhibitedSlots()
getDiscouragedSlots
public Set 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 Vector computeValues()