This commit is contained in:
Bensouda Idriss 2023-03-28 16:02:21 +02:00
parent c0bd5edf16
commit 9512825678
3 changed files with 7 additions and 4 deletions

View file

@ -1 +1,2 @@
/target/
*.class

View file

@ -201,10 +201,9 @@ public class Path {
* @deprecated Need to be implemented.
*/
public boolean isValid() {
for (int i=0; i<arcs.size();i++){
for (int i=0; i<arcs.size()-1;i++){
if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){
return false;
}
}
return true;
@ -263,8 +262,11 @@ public class Path {
* @deprecated Need to be implemented.
*/
public double getMinimumTravelTime() {
// TODO:
return 0;
double minTime = 0;
for (Arc a : arcs){
minTime += a.getMinimumTravelTime();
}
return minTime;
}
}