EdgeSim icon indicating copy to clipboard operation
EdgeSim copied to clipboard

A bug in updating distance between user and base station

Open silviafeiwang opened this issue 4 years ago • 0 comments

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);

silviafeiwang avatar Jul 14 '20 00:07 silviafeiwang