Closed deeptir18 closed 7 years ago
Hi Deepti,
I don't think I follow the logic here -- why does the SenderGang have to have knowledge about the loss rate (and location of the loss) in the network? I think StochasticLoss should be a network element just like Delay (https://github.com/tcpexmachina/remy/blob/master/src/delay.hh) or Link (https://github.com/tcpexmachina/remy/blob/master/src/link.hh). It should be a member of the Network (https://github.com/tcpexmachina/remy/blob/master/src/network.hh), receive packets, and then pass (some of) them on to the next network element via a tick
method, called in Network::tick() (https://github.com/tcpexmachina/remy/blob/master/src/network.cc#L36) with the other network elements.
That way we can put it anywhere in the network we want (e.g. before or after the bottleneck queue) and the sender doesn't know if it's there or not.
-Added a new object that simulates stochastic packet loss, dropping packets randomly in the receiver (just has a bernoulli distribution) -Added an input parameter to set the rate at which packets are dropped (the probability of the bernoulli distribution) -Added another input parameter to add a delay penalty in the utility calculation, when a packet loss is seen, of the form:
I had to change a couple of object constructors to make this work, and I modified: