Skip to content

Commit

Permalink
Updating instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
cssartori committed May 16, 2020
1 parent abfefe7 commit 42f8f7e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 13 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,26 @@ The project uses Open Street Maps (OSM) from [Geofabrik](http://download.geofabr

The project is thought to be open source, so that anyone interested can contribute to its development, and ideally contribute to the large VRP community. It is developed in `C++` to easily integrate with the OSRM tool. However, the code is currently chaotic (at best!) and I still have to find the time to organize and comment things further.

So far, it should compile once all required packages are installed. The `scripts` can generate the configuration files and the instances of the PDPTW that the tool was primarily developed for. More information about the instances can be found [here](https://github.com/cssartori/pdptw-instances)
## Compiling

So far, the code should compile once all required packages are installed. Other than the basic `C++` compiler (compatible with `C++14`), it is necessary to compile from source and install OSRM, which is easily done by following their guide for *Building from Source*. Once all these dependencies are installed, it is enough to run `make` from the OVIG folder.

## Running

To run the instance generator, one should have a *configuration* text file ready. Then, it is just necessary to call:

```sh
./main -c conf.txt
```

Assuming your configuration file is `conf.txt`. For other options, you may run

```sh
./main -h
```

# Configuration files

To correctly generate an instance a *configuration file* is required, which contains the characteristics desired for the resulting instance. An example is available at `configurations/bar-n100-1.txt`, which may be used to generate an instance in Barcelona containing 100 locations (plus the depot).

The `scripts` can generate the configuration files and the instances for the PDPTW that the tool was primarily developed for. More information about the instances can be found [here](https://github.com/cssartori/pdptw-instances)
17 changes: 17 additions & 0 deletions configurations/bar-n100-1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NAME: bar-n100-1
SIZE: 101
DISTRIBUTION: cluster-random
CLUSTERS: 7
DENSITY: 1.5
NODE-FILE: ../addresses/barcelona/barcelona.txt
TIME-WINDOW: 120
SERVICE-TIME: 5
DEPOT: random
ROUTE-TIME: 240
CAPACITY: 300
SEED: 374
OSRM-FILE: ../../OSM/spain-data/spain-latest.osrm
TYPE: PDPTW
LOCATION: Barcelona
COMMENT: Sartori and Buriol (2019)
EOF
13 changes: 1 addition & 12 deletions scripts/gen_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,25 +256,14 @@ def generate_configurations(cities, distributions, horizons, time_windows, capac

seed = 2
cgens = set()
# while len(cgens) < 216:
# seed+=1
# if seed % 100 == 0:
# print seed
# cgens.clear()
# random.seed(seed)
# stat,clst = generate_configurations(cities, distributions, horizons, time_windows, capacities, depots, NUM_INST_SIZE)

random.seed(seed)
stat,clst = generate_configurations(cities, distributions, horizons, time_windows, capacities, depots, NUM_INST_SIZE)


#write_configuration_table(clst)
write_configuration_stats(stat, seed)
#write_all_config_files(clst)

# print len(cgens)
# print seed
# print len(clst)
write_all_config_files(clst)



Expand Down

0 comments on commit 42f8f7e

Please sign in to comment.