mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
modify examples according to issue #24, i.e. if output-folder does not
exist, it is created.
This commit is contained in:
parent
8950d49e5a
commit
03e95c74a9
6 changed files with 66 additions and 4 deletions
|
|
@ -20,6 +20,8 @@
|
|||
******************************************************************************/
|
||||
package examples;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import readers.SolomonReader;
|
||||
import algorithms.GreedySchrimpfFactory;
|
||||
import algorithms.SchrimpfFactory;
|
||||
|
|
@ -35,7 +37,16 @@ public class CompareAlgorithmExample {
|
|||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
* 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");
|
||||
}
|
||||
/*
|
||||
* Build the problem.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue