update
Browse files
README.md
CHANGED
@@ -8,7 +8,7 @@ tags:
|
|
8 |
- Vehicle Routing Problem
|
9 |
---
|
10 |
|
11 |
-
![](./images/GREEDRL-Logo-Original-640.png)
|
12 |
|
13 |
|
14 |
# ✊GreedRL
|
@@ -22,8 +22,7 @@ The entire architecture is divided into three layers:
|
|
22 |
* **High-performance Env framework**
|
23 |
|
24 |
The constraints and optimization objectives for the problems to be solved are defined in the Reinforcement Learning(RL) Environment(Env).
|
25 |
-
Based on performance and ease of use considerations, the Env framework provides two implementations:one based on **pytorch** and one based on **CUDA C++**.
|
26 |
-
|
27 |
To facilitate the definition of problems for developers, the framework abstracts multiple variables to represent the environment's state, which are automatically generated after being declared by the user. When defining constraints and optimization objectives, developers can directly refer to the declared variables.
|
28 |
Currently, various VRP variants such as CVRP, VRPTW and PDPTW, as well as problems such as Batching, are supported.
|
29 |
|
@@ -37,12 +36,12 @@ Currently, various VRP variants such as CVRP, VRPTW and PDPTW, as well as proble
|
|
37 |
|
38 |
In order to achieve the ultimate performance, the framework implements some high-performance operators specifically for Combinatorial Optimization(CO) problems to replace pytorch operators, such as the Masked Addition Attention and Masked Softmax Sampling."
|
39 |
|
40 |
-
![](./images/GREEDRL-Framwork.png)
|
41 |
|
42 |
## Network design
|
43 |
The neural network adopts the Seq2Seq architecture commonly used in Natural Language Processing(NLP), with the Transformer used in the Encoding part and RNN used in the decoding part, as shown in the diagram below.
|
44 |
|
45 |
-
![](./images/GREEDRL-Network.png)
|
46 |
|
47 |
## Modeling examples
|
48 |
|
@@ -253,7 +252,7 @@ For the CVRP, we assume that the demand of each node is a discrete number in {1,
|
|
253 |
|
254 |
2. Start training
|
255 |
```python
|
256 |
-
cd
|
257 |
|
258 |
python train.py --model_filename cvrp_5000.pt --problem_size 5000
|
259 |
```
|
@@ -263,7 +262,7 @@ python train.py --model_filename cvrp_5000.pt --problem_size 5000
|
|
263 |
We provide some pretrained models for different CVRP problem sizes, such as `cvrp_100`, `cvrp_1000`, `cvrp_2000` and `cvrp_5000`, that you can directly use for inference.
|
264 |
|
265 |
```python
|
266 |
-
cd
|
267 |
|
268 |
python solve.py --device cuda --model_name cvrp_5000.pt --problem_size 5000
|
269 |
```
|
|
|
8 |
- Vehicle Routing Problem
|
9 |
---
|
10 |
|
11 |
+
![](./images/GREEDRL-Logo-Original-640.png)
|
12 |
|
13 |
|
14 |
# ✊GreedRL
|
|
|
22 |
* **High-performance Env framework**
|
23 |
|
24 |
The constraints and optimization objectives for the problems to be solved are defined in the Reinforcement Learning(RL) Environment(Env).
|
25 |
+
Based on performance and ease of use considerations, the Env framework provides two implementations:one based on **pytorch** and one based on **CUDA C++**.
|
|
|
26 |
To facilitate the definition of problems for developers, the framework abstracts multiple variables to represent the environment's state, which are automatically generated after being declared by the user. When defining constraints and optimization objectives, developers can directly refer to the declared variables.
|
27 |
Currently, various VRP variants such as CVRP, VRPTW and PDPTW, as well as problems such as Batching, are supported.
|
28 |
|
|
|
36 |
|
37 |
In order to achieve the ultimate performance, the framework implements some high-performance operators specifically for Combinatorial Optimization(CO) problems to replace pytorch operators, such as the Masked Addition Attention and Masked Softmax Sampling."
|
38 |
|
39 |
+
![](./images/GREEDRL-Framwork.png)
|
40 |
|
41 |
## Network design
|
42 |
The neural network adopts the Seq2Seq architecture commonly used in Natural Language Processing(NLP), with the Transformer used in the Encoding part and RNN used in the decoding part, as shown in the diagram below.
|
43 |
|
44 |
+
![](./images/GREEDRL-Network.png)
|
45 |
|
46 |
## Modeling examples
|
47 |
|
|
|
252 |
|
253 |
2. Start training
|
254 |
```python
|
255 |
+
cd example/cvrp
|
256 |
|
257 |
python train.py --model_filename cvrp_5000.pt --problem_size 5000
|
258 |
```
|
|
|
262 |
We provide some pretrained models for different CVRP problem sizes, such as `cvrp_100`, `cvrp_1000`, `cvrp_2000` and `cvrp_5000`, that you can directly use for inference.
|
263 |
|
264 |
```python
|
265 |
+
cd example/cvrp
|
266 |
|
267 |
python solve.py --device cuda --model_name cvrp_5000.pt --problem_size 5000
|
268 |
```
|