EdgeSim
EdgeSim copied to clipboard
A bug in updating distance between user and base station
At file EdgeSim/blob/master/src/main/java/cn/edu/tju/simulation/user/MobilityModel.java, last few lines in function public void checkLocationToAdjustNetwork(double x , double y)
, the distance is calculated as between the point of the current base station (after updating) and the point of current user (after updating), which should be this.location.getLocation().getX()
and this.location.getLocation().getY()
instead of x
and y
.
// update distance
this.distance = Point2D.distance(this.wirelessNetwork.getLocation().getX(), this.wirelessNetwork.getLocation().getY(), x, y);