m
This commit is contained in:
commit
4700131542
3 changed files with 26 additions and 2 deletions
1
be-graphes-model/.gitignore
vendored
1
be-graphes-model/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/target/
|
||||
*.class
|
||||
|
|
|
@ -200,11 +200,17 @@ public class Path {
|
|||
*
|
||||
*/
|
||||
public boolean isValid() {
|
||||
<<<<<<< HEAD
|
||||
boolean valid=true;
|
||||
for (int i=0; i<arcs.size()-1;i++){
|
||||
if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){
|
||||
valid=false;
|
||||
|
||||
=======
|
||||
for (int i=0; i<arcs.size()-1;i++){
|
||||
if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){
|
||||
return false;
|
||||
>>>>>>> 9512825678cb119a068d94f8af261d356638dbdd
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
|
@ -234,6 +240,20 @@ public class Path {
|
|||
* @return Time (in seconds) required to travel this path at the given speed (in
|
||||
* kilometers-per-hour).
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
*
|
||||
*
|
||||
>>>>>>> 052958ee6eb4821ebbb9c903780d467d62617fd2
|
||||
>>>>>>> 661162456a46270c315c09521ce09f85f0020150
|
||||
>>>>>>> 534e0b728e13a532d629312ec48c8c6185679721
|
||||
>>>>>>> 9512825678cb119a068d94f8af261d356638dbdd
|
||||
*/
|
||||
public double getTravelTime(double speed) {
|
||||
double TotalTime = 0;
|
||||
|
@ -252,8 +272,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