mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
replace code for creating output folder with
Examples.createOutputFolder()
This commit is contained in:
parent
3a160f85fe
commit
bb98df01f1
24 changed files with 55 additions and 203 deletions
|
|
@ -42,9 +42,7 @@ import jsprit.core.problem.vehicle.VehicleTypeImpl;
|
|||
import jsprit.core.util.Coordinate;
|
||||
import jsprit.core.util.CrowFlyCosts;
|
||||
import jsprit.core.util.Solutions;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import jsprit.util.Examples;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -207,8 +205,8 @@ public class BicycleMessenger {
|
|||
* @throws IOException
|
||||
*/
|
||||
public static void main(String[] args) throws IOException {
|
||||
createOutputFolder();//for output generated below
|
||||
Logger.getRootLogger().setLevel(Level.INFO);
|
||||
Examples.createOutputFolder();
|
||||
|
||||
//build the problem
|
||||
VehicleRoutingProblem.Builder problemBuilder = VehicleRoutingProblem.Builder.newInstance();
|
||||
problemBuilder.setFleetSize(FleetSize.FINITE);
|
||||
|
|
@ -288,19 +286,6 @@ public class BicycleMessenger {
|
|||
}
|
||||
}
|
||||
|
||||
private static void createOutputFolder() {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
File dir = new File("output");
|
||||
// if the directory does not exist, create it
|
||||
if (!dir.exists()){
|
||||
System.out.println("creating directory ./output");
|
||||
boolean result = dir.mkdir();
|
||||
if(result) System.out.println("./output created");
|
||||
}
|
||||
}
|
||||
|
||||
static Map<String,Double> getNearestMessengers(VehicleRoutingTransportCosts routingCosts, Collection<Job> envelopes, Collection<Vehicle> messengers) {
|
||||
Map<String,Double> nearestMessengers = new HashMap<String, Double>();
|
||||
for(Job envelope : envelopes){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue