Revision 8523 trunk/extensions/extGraph_predes/src/com/iver/cit/gvsig/graph/core/GvNode.java
GvNode.java | ||
---|---|---|
138 | 138 |
this.status = status; |
139 | 139 |
} |
140 | 140 |
|
141 |
public void calculateStimation(GvNode finalNode) { |
|
141 |
public void calculateStimation(GvNode finalNode, double newCost) {
|
|
142 | 142 |
double DeltaX = ((finalNode.getX() - x)/1000.0)*((finalNode.getX() - x)/1000.0); |
143 | 143 |
double DeltaY = ((finalNode.getY() - y)/1000.0)*((finalNode.getY() - y)/1000.0); |
144 | 144 |
double distLineaRecta = Math.sqrt(DeltaX + DeltaY); // En Km |
145 |
stimation = (distLineaRecta* 30.0); // Segundos que tardamos en recorrer esos Km a 120 Km/hora |
|
145 |
stimation = newCost + (distLineaRecta* 30.0); // Segundos que tardamos en recorrer esos Km a 120 Km/hora
|
|
146 | 146 |
|
147 | 147 |
|
148 | 148 |
} |
Also available in: Unified diff