net.sf.cpsolver.ifs.example.tt
Class Activity
java.lang.Object
net.sf.cpsolver.ifs.model.Variable<Activity,Location>
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/.
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<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.