User Manual, Developers Guide and API Documentation

wns::scheduler::strategy::staticpriority::ProportionalFair Class Reference

Proportional Fair subscheduler.

#include <scheduler/strategy/staticpriority/ProportionalFair.hpp>

Inheritance diagram for wns::scheduler::strategy::staticpriority::ProportionalFair:

Inheritance graph
[legend]
Collaboration diagram for wns::scheduler::strategy::staticpriority::ProportionalFair:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair< float, UserIDUserPreference
 holds the userID and its corresponding preference weight, which is a float value

Public Member Functions

std::map< UserID, float > calculateBitsForConnections (const ConnectionSet &currentConnections)
 calculates the number of bits scheduled per frame for all connections
std::priority_queue
< UserPreference
calculateUserPreferences (UserSet activeUsers, bool txStrategy) const
 provides the preference parameter for every user in function of the past data rates they have reached
virtual
wns::scheduler::MapInfoCollectionPtr 
doStartSubScheduling (SchedulerStatePtr schedulerState, wns::scheduler::SchedulingMapPtr schedulingMap)
 The main work is done here. Called by StaticPriority master scheduler.
virtual
wns::scheduler::ConnectionID 
getNextConnection (SchedulerStatePtr schedulerState, std::priority_queue< UserPreference > preferences)
 gives the next cid to schedule according to the users preference values
virtual void initialize ()
 this method is used to initialize datastructures. Please overload/implement this for your derived class
 ProportionalFair (const wns::pyconfig::View &config)
void updatePastDataRates (std::map< UserID, float > bitsBeforeThisFrame, std::map< UserID, float > bitsAfterThisFrame, simTimeType phaseLength)
 updates pastDataRates=90*pastDataRates + 10*currentRate=(bitsThisFrame/phaseLength)
 ~ProportionalFair ()

Protected Member Functions

ConnectionVector getConnectionsForPrio (int currentPrio, const UserID user)
 Returns connections belonnging to current priority of this user.
wns::scheduler::ConnectionID getRandomConnection (ConnectionVector currentPrioConns)
 Return a random connection out of the connection vector.

Protected Attributes

UserSet allUsers
std::map< UserID, float > bitsForUsers
std::map< UserID, float > bitsThisFrame
int blockSize
 Number of packets to schedule of the same cid before proceeding to the next one.
float historyWeight
 exponential window sliding average; p_i=(1-h)*c_i + h*i_{i-1}
float maxRateOfSubchannel
std::map< UserID, float > pastDataRates
wns::distribution::UniformpreferenceVariationDistribution
 distribution for random numbers used to variate the preference a little bit
bool rateFairness
 indicates whether goal is rate (true) or resource (false) fairness
float scalingBetweenMaxTPandPFair
 used for the user preference calculation; 0.0=MaxThroughput; 1.0=ProportionalFair
std::map< UserID, wns::CandIsinrs


Detailed Description

Definition at line 34 of file ProportionalFair.hpp.


Member Typedef Documentation

Definition at line 44 of file ProportionalFair.hpp.


Constructor & Destructor Documentation

ProportionalFair::ProportionalFair ( const wns::pyconfig::View config  ) 

Definition at line 36 of file ProportionalFair.cpp.

ProportionalFair::~ProportionalFair (  ) 

Definition at line 58 of file ProportionalFair.cpp.


Member Function Documentation

std::map< UserID, float > ProportionalFair::calculateBitsForConnections ( const ConnectionSet currentConnections  ) 

Definition at line 170 of file ProportionalFair.cpp.

std::priority_queue< ProportionalFair::UserPreference > ProportionalFair::calculateUserPreferences ( UserSet  activeUsers,
bool  txStrategy 
) const

Definition at line 74 of file ProportionalFair.cpp.

wns::scheduler::MapInfoCollectionPtr ProportionalFair::doStartSubScheduling ( SchedulerStatePtr  schedulerState,
wns::scheduler::SchedulingMapPtr  schedulingMap 
) [virtual]

Parameters:
SchedulerState contains all the input parameters and current state of the scheduler.
SchedulingMap contains the (incomplete) result so far and will be updated by this method.

Implements wns::scheduler::strategy::staticpriority::SubStrategyInterface.

Definition at line 293 of file ProportionalFair.cpp.

ConnectionVector ProportionalFair::getConnectionsForPrio ( int  currentPrio,
const UserID  user 
) [protected]

Definition at line 228 of file ProportionalFair.cpp.

wns::scheduler::ConnectionID ProportionalFair::getNextConnection ( SchedulerStatePtr  schedulerState,
std::priority_queue< UserPreference preferences 
) [virtual]

Definition at line 201 of file ProportionalFair.cpp.

wns::scheduler::ConnectionID ProportionalFair::getRandomConnection ( ConnectionVector  currentPrioConns  )  [protected]

Definition at line 252 of file ProportionalFair.cpp.

void ProportionalFair::initialize (  )  [virtual]

void ProportionalFair::updatePastDataRates ( std::map< UserID, float >  bitsBeforeThisFrame,
std::map< UserID, float >  bitsAfterThisFrame,
simTimeType  phaseLength 
)

Definition at line 265 of file ProportionalFair.cpp.


Member Data Documentation

Definition at line 88 of file ProportionalFair.hpp.

Definition at line 89 of file ProportionalFair.hpp.

Definition at line 90 of file ProportionalFair.hpp.

Definition at line 80 of file ProportionalFair.hpp.

Definition at line 82 of file ProportionalFair.hpp.

Definition at line 87 of file ProportionalFair.hpp.

Definition at line 91 of file ProportionalFair.hpp.

Definition at line 94 of file ProportionalFair.hpp.

Definition at line 86 of file ProportionalFair.hpp.

Definition at line 84 of file ProportionalFair.hpp.

Definition at line 92 of file ProportionalFair.hpp.


The documentation for this class was generated from the following files:

Generated on Sun May 27 03:33:05 2012 for openWNS by  doxygen 1.5.5