org.yawlfoundation.yawl.resourcing.allocators
Class RandomChoice

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.AbstractSelector
      extended by org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
          extended by org.yawlfoundation.yawl.resourcing.allocators.RandomChoice

public class RandomChoice
extends AbstractAllocator

Performs allocation based on a random selection from a set Create Date: 23/08/2007. Last Date: 12/11/2007

Version:
2.0
Author:
Michael Adams (BPM Group, QUT Australia)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
AbstractAllocator.EventPair
 
Field Summary
 
Fields inherited from class org.yawlfoundation.yawl.resourcing.AbstractSelector
_canonicalName, _description, _displayName, _name, _params
 
Constructor Summary
RandomChoice()
           
 
Method Summary
 Participant performAllocation(Set<Participant> participants, WorkItemRecord wir)
          randomly selects a single participant from the list provided
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.allocators.AbstractAllocator
getAvgDurations, getAvgDurations, getCost, getCostMap, getLoggedEvents, participantSetToMap, toXML, unmarshal
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.AbstractSelector
addKey, addParam, addParams, getCanonicalName, getClassName, getDescription, getDisplayName, getInformation, getKeys, getName, getParamKeys, getParams, getParamValue, reconstitute, setCanonicalName, setDescription, setDisplayName, setKeyValue, setName, setParams, toString, unmarshalParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RandomChoice

public RandomChoice()
Method Detail

performAllocation

public Participant performAllocation(Set<Participant> participants,
                                     WorkItemRecord wir)
randomly selects a single participant from the list provided

Specified by:
performAllocation in class AbstractAllocator
Parameters:
participants - a distribution set of participants
wir - the work item to allocate
Returns:
a single participant, or null if participants is null or empty


Copyright © 2004-2012 The YAWL Foundation.