21 #ifndef THOMPSON_SAMPLING_WIFI_MANAGER_H 22 #define THOMPSON_SAMPLING_WIFI_MANAGER_H 24 #include "ns3/random-variable-stream.h" 26 #include "ns3/wifi-remote-station-manager.h" 55 double rxSnr,
WifiMode txMode)
override;
59 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
override;
61 double ackSnr,
WifiMode ackMode,
double dataSnr,
62 uint16_t dataChannelWidth, uint8_t dataNss)
override;
64 uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus,
65 double rxSnr,
double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
override;
Smart pointer class similar to boost::intrusive_ptr.
Ptr< GammaRandomVariable > m_gammaRandomVariable
Variable used to sample beta-distributed random variables.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId(void)
Get the type ID.
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr) override
This method is a pure virtual method that must be implemented by the sub-class.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
void InitializeStation(WifiRemoteStation *station) const
Initializes station rate tables.
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override
This method is a pure virtual method that must be implemented by the sub-class.
double m_decay
Exponential decay coefficient, Hz.
hold a list of per-remote-station state.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model...
WifiRemoteStation * DoCreateStation() const override
void Decay(WifiRemoteStation *st, size_t i) const
Applies exponential decay to MCS statistics.
void UpdateNextMode(WifiRemoteStation *station) const
Draws a new MCS and related parameters to try next time for this station.
Thompson Sampling rate control algorithmThis class implements Thompson Sampling rate control algorith...
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
double SampleBetaVariable(uint64_t alpha, uint64_t beta) const
Sample beta random variable with given parameters.
TracedValue< uint64_t > m_currentRate
Trace rate changes.
ThompsonSamplingWifiManager()
uint16_t GetModeGuardInterval(WifiRemoteStation *st, WifiMode mode) const
Returns guard interval in nanoseconds for the given mode.
virtual ~ThompsonSamplingWifiManager()
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
a unique identifier for an interface.
hold per-remote-station state.
void DoReportAmpduTxStatus(WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...