SAR<em>bayes</em>: SORAL Documentation
(SARBayes) Main Related Pages Class List Hierarchy Methods Files

Washburn Class Reference

#include <Alloc-W.h>

Inheritance diagram for Washburn:

Inheritance graph
[legend]
Collaboration diagram for Washburn:

Collaboration graph
[legend]
List of all members.

Detailed Description

The Washburn allocation class.

Washburn:

Implements the Washburn allocation algorithm.

Author : David Albrecht


Public Member Functions

 Washburn (const int p_no_resources, const int p_no_areas, const Array2D &p_effectiveness, const valarray< double > p_available, const valarray< double > p_POC)

Protected Types

enum  { ROOT = 0, NULL_NODE = -1 }

Protected Member Functions

void calcAllocation ()
 Calculate the allocation using the Washburn algorithm.

ActiveAreafirstArea (void) const
 Returns the area number of the first area in this allocation.

ActiveAreanextArea (const int currentArea) const
 Given an area number, returns the next area that has something assigned to it.

AreaAssignmentfirstArea (const int resource) const
 Returns the area number of the first area in this allocation.

AreaAssignmentnextArea (const int resource, const int currentArea) const
 Given an area number, returns the next area that has something assigned to it.

ResourceAssignmentfirstRes (const int area) const
 Given an area, it returns the first resource assigned to that area.

ResourceAssignmentnextRes (const int area, const int currentResource) const
 Given a resource and an area, it returns the next ResourceAssignment for that area.


Friends

class AreaIterator
 So that the AreaIterator can access the first & next functions.

class ResourceIterator
 So that the ResourceIterator can access the first & next functions.

class ActiveAreasIterator
 So that the ActiveAreasIterator can access the first & next functions.

class Node


Member Function Documentation

void Washburn::calcAllocation void   )  [protected, virtual]
 

Calculate the allocation using the Washburn algorithm.

calcAllocationWashburn()

Uses the Washburn algorithm to calculate the optimal assignment of resources to the set of areas.

This set of assignments is stored in myAssignments.

Author: David Albrecht (DWA)

Implements Allocation.

AreaAssignment * Washburn::firstArea const int  resource  )  const [protected, virtual]
 

Returns the area number of the first area in this allocation.

firstArea()

Returns the first AreaAssignment (an area and a time) that a given resource was assigned to.

If the resource does not exist in this allocation a NULL is returned.

Author: David Albrecht (DWA)

Implements Allocation.

ActiveArea * Washburn::firstArea void   )  const [protected, virtual]
 

Returns the area number of the first area in this allocation.

firstArea()

Returns the area number of the first area in this allocation.

If the allocation is empty, returns -1

Author: David Albrecht (DWA)

Implements Allocation.

ResourceAssignment * Washburn::firstRes const int  area  )  const [protected, virtual]
 

Given an area, it returns the first resource assigned to that area.

firstRes()

Given an area, it returns the first resource assigned to that area (returned as a ResourceAssignment with the resource and time).

If there are no resources, it returns a NULL.

Author: David Albrecht (DWA)

Implements Allocation.

AreaAssignment * Washburn::nextArea const int  resource,
const int  currentArea
const [protected, virtual]
 

Given an area number, returns the next area that has something assigned to it.

nextArea()

Given a resource and an area, returns the next area (and time) that has this resource assigned to.

If there are no more areas or the resource is not assigned to any more areas it returns NULL.

Author: David Albrecht (DWA)

Implements Allocation.

ActiveArea * Washburn::nextArea const int  currentArea  )  const [protected, virtual]
 

Given an area number, returns the next area that has something assigned to it.

nextArea()

Given an area number, returns the next area that has something assigned to it in this set of allocations.

If there is no other area with an allocation of resources greater than 0, the function returns -1.

Author: David Albrecht (DWA)

Implements Allocation.

ResourceAssignment * Washburn::nextRes const int  area,
const int  currentResource
const [protected, virtual]
 

Given a resource and an area, it returns the next ResourceAssignment for that area.

nextRes()

Given a resource and an area, it returns the next resource assigned to that area (as a ResourceAssignment).

If there are no next resources, it returns a NULL.

Author: David Albrecht (DWA)

Implements Allocation.


The documentation for this class was generated from the following files:
Generated on Tue Jul 29 03:09:45 2003 for SORAL by dOxygen 1.3.2
(SARBayes) Main Related Pages Class List Hierarchy Methods Files