![]() | ||||||
#include <Alloc-W.h>
Inheritance diagram for Washburn:


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. | |
| ActiveArea * | firstArea (void) const |
| Returns the area number of the first area in this allocation. | |
| ActiveArea * | nextArea (const int currentArea) const |
| Given an area number, returns the next area that has something assigned to it. | |
| AreaAssignment * | firstArea (const int resource) const |
| Returns the area number of the first area in this allocation. | |
| AreaAssignment * | nextArea (const int resource, const int currentArea) const |
| Given an area number, returns the next area that has something assigned to it. | |
| ResourceAssignment * | firstRes (const int area) const |
| Given an area, it returns the first resource assigned to that area. | |
| ResourceAssignment * | nextRes (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 |
|
|
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. |
|
|
Returns the area number of the first area in this allocation. 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. |
|
|
Returns the area number of the first area in this allocation. Returns the area number of the first area in this allocation. If the allocation is empty, returns -1 Author: David Albrecht (DWA) Implements Allocation. |
|
|
Given an area, it returns the first resource assigned to that area. 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. |
|
||||||||||||
|
Given an area number, returns the next area that has something assigned to it. 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. |
|
|
Given an area number, returns the next area that has something assigned to it. 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. |
|
||||||||||||
|
Given a resource and an area, it returns the next ResourceAssignment for that area. 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. |
| (SARBayes) | Main | Related Pages | Class List | Hierarchy | Methods | Files |
|---|