Commit 32ad5891 authored by Maciej Żurad's avatar Maciej Żurad
Browse files

Merge branch 'devel' into UAVDualPheromoneKHOPCACustom

parents e9edab88 e0332156
Pipeline #542 skipped
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,36.92,51.15,60.41,9.63,13.65,1.78,84.85,83.33,51.0,55.56,30.0,1160.27,3248.66,3174.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,34.0,53.53,63.91,9.98,15.71,2.22,80.81,73.33,44.0,57.78,25.0,1243.78,3925.81,4394.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,30.55,67.04,68.31,4.42,8.98,2.5,81.82,80.0,22.0,37.5,17.0,960.42,2688.35,3107.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,33.15,63.15,64.74,4.69,8.91,1.75,86.37,72.5,24.0,40.0,15.0,1265.64,2094.58,3436.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,37.84,25.98,59.28,54.0,80.02,1.65,90.54,89.59,305.0,92.04,165.0,1246.64,5528.46,7083.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,39.48,23.04,57.15,53.88,63.16,2.02,78.48,71.02,269.0,89.18,159.0,1190.7,6466.68,7149.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,37.12,27.71,59.96,54.31,77.41,1.71,89.05,84.08,284.0,93.27,183.0,1187.51,6318.36,8483.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,36.8,23.57,60.19,54.03,70.15,2.24,80.89,75.71,234.0,89.39,161.0,2795.55,6438.92,43179.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,37.79,23.75,59.02,53.32,70.65,1.92,84.05,81.43,202.0,94.9,109.0,3308.53,7728.41,32721.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,38.14,25.53,58.67,53.98,69.55,1.92,83.3,76.33,214.0,92.65,125.0,2881.92,7171.09,24918.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,37.36,22.73,59.37,53.41,66.27,1.86,85.72,81.43,202.0,91.02,115.0,3087.08,7131.56,21054.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,37.17,19.84,59.81,53.99,67.31,1.94,82.38,72.65,211.0,91.84,150.0,2723.57,7390.6,26256.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,39.06,20.33,57.7,52.96,65.0,2.16,77.74,72.45,199.0,91.43,133.0,2659.45,7627.27,28468.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,38.43,21.11,58.34,53.43,65.09,1.86,85.53,77.76,187.0,88.78,104.0,4782.24,12429.47,121305.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,38.12,18.45,58.47,52.99,60.05,1.88,84.05,76.94,222.0,86.73,109.0,2605.2,6497.7,22824.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,38.36,21.86,58.45,53.76,65.24,1.94,83.12,76.33,189.0,92.65,91.0,2927.15,8283.49,33653.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,36.95,23.35,59.84,53.86,70.01,2.0,81.26,77.55,213.0,92.65,140.0,3044.68,7160.2,27342.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,37.37,21.18,59.69,53.16,67.51,2.04,84.6,75.51,227.0,92.24,145.0,2752.21,6635.86,20982.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,38.74,20.79,58.0,53.48,68.31,2.02,81.63,78.16,188.0,92.24,88.0,2982.89,8453.26,29230.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,36.34,21.31,60.61,53.61,68.66,1.92,85.9,78.16,212.0,91.22,109.0,2935.89,6962.81,25178.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,35.35,25.24,61.68,54.29,74.52,1.94,85.16,77.14,220.0,92.04,122.0,3436.44,6377.05,26571.0,0.0
UAVs,Run,nbScannedCells,NbNeverScannedCells,NbCellsOlderThanThreshold,avgNbScans,stdNbScans,nbConnectedComponents,GiantConnectedComponent,nbUAVConnectedToBase,nbDetection,% of first time detection,nbMessagesSent,avgTargetTimeTracked - ms,avgTargetTime(UnTracked - ms,BestTargetTimeTracked - ms,avgPredictionAccurarcy - %
10,30,38.6,25.38,58.37,53.4,68.4,2.06,82.56,76.12,213.0,92.65,135.0,2720.82,7124.1,26623.0,0.0
......@@ -54,6 +54,27 @@ abstract public class AbstractTarget {
*/
protected int detectionCounter;
/**
* Visibility of the drone
* If the drone disappeared, it cannot be detected even if it's in range
*/
protected boolean visibility;
/**
* Is the target able to suddenly disappear?
*/
protected boolean disapperingTargetModel = false;
/**
* Target disappear probability
*/
protected double disappearProbability = 0.01;
/**
* Target disappear probability
*/
protected double reappearProbability = 0.01;
/**
* Time a target is tracked
*/
......@@ -72,6 +93,7 @@ abstract public class AbstractTarget {
private long maxTimeForShortlyLost = 500;
// //////////////////////////////////////////////////////////////////////
/**
......@@ -95,6 +117,8 @@ abstract public class AbstractTarget {
this.untrackedTime = new ArrayList<Long>();
predictedInformationList = new ArrayList<PredictedInformation>();
predictionSimilarityList = new ArrayList<Integer>();
this.visibility = true;
}
......@@ -148,7 +172,17 @@ abstract public class AbstractTarget {
/**
* The action of the local decision after the movement
*/
abstract protected void localActionBeforeMove();
protected void localActionBeforeMove() {
if (!disapperingTargetModel)
return;
if (visibility && rand.nextDouble() < disappearProbability)
visibility = false;
else if (!visibility && rand.nextDouble() < reappearProbability)
visibility = true;
}
/*********************************************
*
......@@ -547,4 +581,17 @@ abstract public class AbstractTarget {
this.isLost(0);
}
}
public boolean isVisible() {
return visibility;
}
public void setVisible(boolean visibility) {
this.visibility = visibility;
}
public void setDisapperingTargetModel(boolean disapperingTargetModel) {
this.disapperingTargetModel = disapperingTargetModel;
}
}
......@@ -253,16 +253,17 @@ public class TargetDiscreteMovement extends AbstractTarget {
*/
@Override
protected void localActionBeforeMove() {
double currentX = this.getAuto().getCurrentStatus()
.getCurrentPosition().getX();
double currentY = this.getAuto().getCurrentStatus()
.getCurrentPosition().getY();
if (nextPoint != null && nextPoint.getX() == currentX
&& currentY == nextPoint.getY()) {
this.currentPoint = nextPoint;
newDestination();
} else if (nextPoint == null)
newDestination();
super.localActionBeforeMove();
double currentX = this.getAuto().getCurrentStatus()
.getCurrentPosition().getX();
double currentY = this.getAuto().getCurrentStatus()
.getCurrentPosition().getY();
if (nextPoint != null && nextPoint.getX() == currentX
&& currentY == nextPoint.getY()) {
this.currentPoint = nextPoint;
newDestination();
} else if (nextPoint == null)
newDestination();
}
}
......@@ -281,27 +281,28 @@ public class TargetManhattanMovement extends AbstractTarget {
*/
@Override
protected void localActionBeforeMove() {
// React on corner points to select a new direction
double coordX = auto.getCurrentStatus().getPositionX();
double coordY = auto.getCurrentStatus().getPositionY();
if (coordX == nextCorner.getX() && coordY == nextCorner.getY()) {
int x = -1;
int y = -1;
if (coordX % manhattanGrid.getBoxWidth() == 0
&& coordY % manhattanGrid.getBoxHeight() == 0) {
x = (int) (coordX / manhattanGrid.getBoxWidth());
y = (int) (coordY / manhattanGrid.getBoxHeight());
}
String currentCorner = x + "," + y;
if (!currentCorner.equals(lastCorner)
&& manhattenHashMap.containsKey(currentCorner)) {
lastCorner = currentCorner;
newManhattanChoice(manhattenHashMap.get(currentCorner));
}
}
super.localActionBeforeMove();
// React on corner points to select a new direction
double coordX = auto.getCurrentStatus().getPositionX();
double coordY = auto.getCurrentStatus().getPositionY();
if (coordX == nextCorner.getX() && coordY == nextCorner.getY()) {
int x = -1;
int y = -1;
if (coordX % manhattanGrid.getBoxWidth() == 0
&& coordY % manhattanGrid.getBoxHeight() == 0) {
x = (int) (coordX / manhattanGrid.getBoxWidth());
y = (int) (coordY / manhattanGrid.getBoxHeight());
}
String currentCorner = x + "," + y;
if (!currentCorner.equals(lastCorner)
&& manhattenHashMap.containsKey(currentCorner)) {
lastCorner = currentCorner;
newManhattanChoice(manhattenHashMap.get(currentCorner));
}
}
}
/**
......
......@@ -116,10 +116,12 @@ public class TargetRandomMovement extends AbstractTarget {
*/
@Override
protected void localActionBeforeMove() {
if (this.isCurrentlyTracked())
newRandomChoice();
else if (getTime() == getDecisionFrequency())
newRandomChoice();
super.localActionBeforeMove();
if (this.isCurrentlyTracked())
newRandomChoice();
else if (getTime() == getDecisionFrequency())
newRandomChoice();
}
}
......@@ -28,7 +28,7 @@ public abstract class AbstractAutopilot {
protected AbstractSimulationArea area;
protected Random rand;
// //////////////////////////////////////////////////////////////////////
/**
......@@ -52,7 +52,7 @@ public abstract class AbstractAutopilot {
/*********************************************
*
* High-level methods of the autopilot to update the status
* High-level methods qof the autopilot to update the status
*
********************************************/
......@@ -247,10 +247,6 @@ public abstract class AbstractAutopilot {
return trajectory;
}
public void test() {
}
/**
* Returns the last point in the trajectory going from the current position
* to the given destination in nbSimulation Steps
......@@ -373,5 +369,5 @@ public abstract class AbstractAutopilot {
public AbstractSimulationArea getArea() {
return area;
}
}
......@@ -14,6 +14,8 @@ import org.uav.status.Status;
*/
public class TargetGraphRepresentation {
public enum TargetRepresentationType {TRACKED, UNTRACKED, INVISIBLE};
protected Node mainNode;
protected int id;
private int bodyLength;
......@@ -37,13 +39,20 @@ public class TargetGraphRepresentation {
* @param s
* an instance of {@link Status}
*/
public void refreshPositionOnGraph(Status s, boolean currentlyTracked) {
if (currentlyTracked)
mainNode.changeAttribute("ui.class", "important");
else
mainNode.changeAttribute("ui.class", "unimportant");
public void refreshPositionOnGraph(Status s, TargetRepresentationType type) {
switch(type) {
case TRACKED:
mainNode.changeAttribute("ui.class", "important");
break;
case UNTRACKED:
mainNode.changeAttribute("ui.class", "unimportant");
break;
case INVISIBLE:
mainNode.changeAttribute("ui.class", "invisible");
break;
}
double moveX = Math.cos(s.getHeadingValue()) * this.bodyLength;
double moveY = Math.sin(s.getHeadingValue()) * this.bodyLength;
......
......@@ -47,7 +47,7 @@ abstract public class AbstractUAV {
*/
private MovingDirection direction = null;
private Position lastPosition = null;
// //////////////////////////////////////////////////////////////////////
/**
......
......@@ -134,8 +134,11 @@ public class AbstractUAVFollowing extends AbstractUAVConnectedCoverage {
* If the target is in the coverage area and still not important
* (Not tracked)
*/
if (simulation.t[k].getFollowedByUAV() == null
&& coverageArea.isTargetInsideArea(targetPos.getX(), targetPos.getY())) {
boolean detected = coverageArea.isTargetInsideArea(targetPos.getX(),targetPos.getY());
boolean visible = simulation.t[k].isVisible();
if (simulation.t[k].getFollowedByUAV() == null && detected && visible) {
target = simulation.t[k];
/**
......@@ -185,22 +188,30 @@ public class AbstractUAVFollowing extends AbstractUAVConnectedCoverage {
* If the target is in the coverage area and still not important
* (Not tracked)
*/
if (coverageArea.isTargetInsideArea(targetPos.getX(), targetPos.getY())
&& simulation.t_g[k].getMainNode().getAttribute("ui.class") == "unimportant"
|| simulation.t_g[k].getMainNode().getAttribute("ui.class") == null) {
target = simulation.t[k];
/**
* Check if the observed target is different from the UAV's
* target
*/
if (target.getTargetId() != this.getObservedTarget().getTargetId()) {
/**
* Announce the neighbour UAV's
*/
this.sendTargetNotControllable(
new TargetInformation(target, TargetParameter.TargetNotControllable));
}
boolean detected = coverageArea.isTargetInsideArea(targetPos.getX(),targetPos.getY());
boolean visible = simulation.t[k].isVisible();
if (detected && visible &&
(simulation.t_g[k].getMainNode().getAttribute("ui.class") == "unimportant"
|| simulation.t_g[k].getMainNode().getAttribute("ui.class") == null)
)
{
target = simulation.t[k];
/**
* Check if the observed target is different from the UAV's
* target
*/
if (target.getTargetId() != this.getObservedTarget()
.getTargetId()) {
/**
* Announce the neighbour UAV's
*/
this.sendTargetNotControllable(new TargetInformation(
target, TargetParameter.TargetNotControllable));
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment