LTE Wideband CQI in a MAC scheduler

211 views
Skip to first unread message

ahmed ahmedin

unread,
Jul 6, 2014, 6:44:17 PM7/6/14
to ns-3-...@googlegroups.com
Hello,
I am new to NS3 and I was trying to implement part of my work on LTE via NS3. What I am trying to do is to modify the implemented proportional fair scheduler. My modification require the knowledge of the wbCqi . I followed the steps used in the tta-ff-mac-scheduler to obtain the wbCqi and the achievableWbRate and used it in the pf-ff-mac-scheduler. I am receiving an error that I can not solve. Here is the code, I am adding it inside the loop that goes over all the RBGs.

// add wb CQI
std::set <uint16_t>::iterator itw;
std::map <uint16_t,uint8_t>::iterator itWbCqi;
 for (itw=m_flowStatsDl.begin (); itw!=m_flowStatsDl.end (); itw++)
            {
               itWbCqi = m_p10CqiRxed.find ((*itw));
               uint8_t wbCqi = 0;
              if (itWbCqi != m_p10CqiRxed.end ())
                {
                  wbCqi = (*itWbCqi).second;
                }
              else
                {
                  wbCqi = 1; // lowest value fro trying a transmission
                }
                double achievableWbRate = 0.0;
                uint8_t wbMcs = 0; 
                for (uint8_t k = 0; k < nLayer; k++)
                        {
                          wbMcs = m_amc->GetMcsFromCqi (wbCqi);
                          achievableWbRate += ((m_amc->GetTbSizeFromMcs (wbMcs, rbgSize) / 8) / 0.001);   // = TB size / TTI
                        }
std::cout<<achievableWbRate<<"    ";
std::cin.ignore();
std::cin.get();
}
// end of WB CQI

Here is the error I got

../src/lte/model/pf-ff-mac-scheduler.cc: In member function ‘void ns3::PfFfMacScheduler::DoSchedDlTriggerReq(const ns3::FfMacSchedSapProvider::SchedDlTriggerReqParameters&)’:
../src/lte/model/pf-ff-mac-scheduler.cc:969:32: error: no match for ‘operator=’ in ‘itw = ((ns3::PfFfMacScheduler*)this)->ns3::PfFfMacScheduler::m_flowStatsDl.std::map<_Key, _Tp, _Compare, _Alloc>::begin [with _Key = short unsigned int, _Tp = ns3::pfsFlowPerf_t, _Compare = std::less<short unsigned int>, _Alloc = std::allocator<std::pair<const short unsigned int, ns3::pfsFlowPerf_t> >, std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const short unsigned int, ns3::pfsFlowPerf_t> >]()’
../src/lte/model/pf-ff-mac-scheduler.cc:969:32: note: candidate is:
/usr/include/c++/4.6/bits/stl_tree.h:227:12: note: std::_Rb_tree_const_iterator<short unsigned int>& std::_Rb_tree_const_iterator<short unsigned int>::operator=(const std::_Rb_tree_const_iterator<short unsigned int>&)
/usr/include/c++/4.6/bits/stl_tree.h:227:12: note:   no known conversion for argument 1 from ‘std::map<short unsigned int, ns3::pfsFlowPerf_t>::iterator {aka std::_Rb_tree_iterator<std::pair<const short unsigned int, ns3::pfsFlowPerf_t> >}’ to ‘const std::_Rb_tree_const_iterator<short unsigned int>&’

I think it probably says that the iterator itw is not the right type. I tried to define itw as the required map, however it gives me another error regarding the function m_p10CqiRxed.find 
Any help would be appreciated.
Best
Ahmed

Piotr Gawlowicz

unread,
Jul 15, 2014, 7:38:11 AM7/15/14
to ns-3-...@googlegroups.com
in TTA scheduler we have:

  /*
  * Set of UE statistics (per RNTI basis) in downlink
  */
  std::set <uint16_t> m_flowStatsDl;

and in PF scheduler :
  /*
  * Map of UE statistics (per RNTI basis) in downlink
  */
  std::map <uint16_t, pfsFlowPerf_t> m_flowStatsDl;

You need to update you iterator itw, because what you are doing is:


std::set <uint16_t>::iterator itw;
itw=m_flowStatsDl.begin (); //where std::map <uint16_t, pfsFlowPerf_t> m_flowStatsDl;

Best regards,
Piotr Gawłowicz
Reply all
Reply to author
Forward
0 new messages