mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
bugfix #111
This commit is contained in:
parent
83e142faa5
commit
34abc1b737
1 changed files with 8 additions and 5 deletions
|
|
@ -128,7 +128,8 @@ public class Plotter {
|
||||||
if(activity.equals(Activity.DELIVERY)) return DELIVERY_COLOR;
|
if(activity.equals(Activity.DELIVERY)) return DELIVERY_COLOR;
|
||||||
if(activity.equals(Activity.SERVICE)) return SERVICE_COLOR;
|
if(activity.equals(Activity.SERVICE)) return SERVICE_COLOR;
|
||||||
if(activity.equals(Activity.START)) return START_COLOR;
|
if(activity.equals(Activity.START)) return START_COLOR;
|
||||||
return END_COLOR;
|
if(activity.equals(Activity.END)) return END_COLOR;
|
||||||
|
throw new IllegalStateException("activity at "+dataItem.toString()+" cannot be assigned to a color");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -219,7 +220,7 @@ public class Plotter {
|
||||||
* Constructs Plotter with problem and routes to render individual routes.
|
* Constructs Plotter with problem and routes to render individual routes.
|
||||||
*
|
*
|
||||||
* @param vrp
|
* @param vrp
|
||||||
* @param solution
|
* @param routes
|
||||||
*/
|
*/
|
||||||
public Plotter(VehicleRoutingProblem vrp, Collection<VehicleRoute> routes) {
|
public Plotter(VehicleRoutingProblem vrp, Collection<VehicleRoute> routes) {
|
||||||
super();
|
super();
|
||||||
|
|
@ -231,8 +232,8 @@ public class Plotter {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param show
|
* @param show
|
||||||
* @return
|
* @return plotter
|
||||||
* @deprecate always true
|
* @deprecated always true
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Plotter setShowFirstActivity(boolean show){
|
public Plotter setShowFirstActivity(boolean show){
|
||||||
|
|
@ -614,7 +615,9 @@ public class Plotter {
|
||||||
if(!v.getStartLocationId().equals(v.getEndLocationId())){
|
if(!v.getStartLocationId().equals(v.getEndLocationId())){
|
||||||
Coordinate endCoord = v.getEndLocationCoordinate();
|
Coordinate endCoord = v.getEndLocationCoordinate();
|
||||||
if(endCoord == null) throw new NoLocationFoundException();
|
if(endCoord == null) throw new NoLocationFoundException();
|
||||||
activities.add(endCoord.getX()*scalingFactor,endCoord.getY()*scalingFactor);
|
XYDataItem enditem = new XYDataItem(endCoord.getX()*scalingFactor,endCoord.getY()*scalingFactor);
|
||||||
|
markItem(enditem,Activity.END, null);
|
||||||
|
activities.add(enditem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(Job job : vrp.getJobs().values()){
|
for(Job job : vrp.getJobs().values()){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue