You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-7Lines changed: 42 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,31 +90,66 @@ For setting up a local test enviorment with database support, please refer to th
90
90
You can start using our examples:
91
91
92
92
*[Clone this repository](#clone-this-repository)
93
+
*[Use our sandbox in your browser (Docker required)](#use-our-sandbox-in-your-browser-docker-required)
93
94
94
95
95
-
## Prerequisites
96
+
## Clone this repository
97
+
Clone this repository and import it in your favourite IDE.
98
+
99
+
### Prerequisites
96
100
97
101
* Python installed
98
102
* Please check **requirements.txt**
99
103
* Working Docker environment for local TourOptimizer instance
100
104
101
105
102
-
## Clone this repository
103
-
Clone this repository and import it in your favourite IDE.
104
-
105
-
106
-
## Install necessary files
106
+
### Install necessary files
107
107
You can call (from the main folder):
108
108
109
109
```bash
110
110
python setup.py install
111
111
```
112
112
113
-
## Run the examples
113
+
###Run the examples
114
114
115
115
Run a file from the **examples** subfolders.
116
116
117
117
118
+
## Use our sandbox in your browser (Docker required)
119
+
If you want to get started without the hassle of installing Java, Maven and an IDE, we provide a sandbox. The sandbox is based on [code-server](https://github.com/cdr/code-server) and can be used inside your browser, and the interface itself is based on Visual Code. The sandbox is available via DockerHub ([here](https://hub.docker.com/r/dnaevolutions/jopt_py_example_server)). You have to host the sandbox in your Docker environment (Please provide at least 2-4Gb of Ram and 2 Cores). You can pull the sandbox from our DockerHub account (The Dockerfile for creating the sandbox is included in this repository). The latest version of our examples is cloned by default on launching the Docker container, and you can start testing JOpt-REST right away.
120
+
121
+
122
+
### Starting the sandbox and persist your changes
123
+
You must mount a volume to which the examples of this project are downloaded on the container's startup. After re-launching the container, the latest version of our examples is only cloned if the folder is not already existing, keeping your files safe from being overridden.
124
+
125
+
Launching a sandbox and mount your current directory ('$PWD') or any other directory you want:
After starting the container, you can open [http://localhost:8043/](http://localhost:8033) with your browser and login with the password:
134
+
135
+
```
136
+
jopt
137
+
```
138
+
139
+
### Common problems: ###
140
+
141
+
- If you see the an error like this:
142
+
143
+
```
144
+
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8081): Max retries exceeded with url: /healthStatus (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc7c86ac1d0>: Failed to establish a new connection: [Errno 111] Connection refused'))
145
+
```
146
+
147
+
You are trying to connect to a local JOpt server but have not adjusted the endpoint. Remember, the sandbox is a docker container and you need to connect to it via the endpoint `http://host.docker.internal:8081` instead of ~`http://localhost:8081`~. You can run `tour_optimizer_example_from_docker.py` from the package `examples.optimize` where `Endpoints.LOCAL_SWAGGER_TOUROPTIMIZER_FROM_DOCKER_URL` is used instead of `Endpoints.LOCAL_SWAGGER_TOUROPTIMIZER_URL`.
148
+
149
+
150
+
---
151
+
152
+
118
153
## Why use JOpt products from DNA Evolutions?
119
154
JOpt is a flexible routing optimization engine written in Java, allowing to solve tour-optimization problems that are highly restricted. For example, regarding time windows, skills, and even mandatory constraints can be applied.
0 commit comments