Compare commits
3 commits
534e0b728e
...
9512825678
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9512825678 | ||
|
|
c0bd5edf16 | ||
|
|
346c04150b |
3 changed files with 10 additions and 4 deletions
1
be-graphes-model/.gitignore
vendored
1
be-graphes-model/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/target/
|
||||
*.class
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -235,6 +234,8 @@ public class Path {
|
|||
* kilometers-per-hour).
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
|
|
@ -242,6 +243,7 @@ public class Path {
|
|||
*
|
||||
>>>>>>> 052958ee6eb4821ebbb9c903780d467d62617fd2
|
||||
>>>>>>> 661162456a46270c315c09521ce09f85f0020150
|
||||
>>>>>>> 534e0b728e13a532d629312ec48c8c6185679721
|
||||
*/
|
||||
public double getTravelTime(double speed) {
|
||||
double TotalTime = 0;
|
||||
|
|
@ -260,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue