In my code I use this to set the mobility :
mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
"Mode", StringValue ("Time"),
"Time", StringValue ("2s"),
"Speed", StringValue ("Constant:1.0"),
"Bounds", StringValue ("0|200|0|200"));
then you can set the speed with the 4th line.
V.
--
***************************
RABARIJAONA Verotiana Hanitriniala
Graduate School of Global Information and Telecommunication Studies (GITS)
Waseda University
Tokyo
Japan
***************************