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
+58-9Lines changed: 58 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# RelSys (**Rel**ocation **Sys**tem)
2
2
RelSys is a tool for evaluating a system of queues where arriving customers can be relocated to an alternative queue if none of the servers in the preferred queue are idle.
3
-
The source code is written in C++, but we have developed a module for the users preferring Python (Linux).
3
+
We have developed two interfaces for RelSys: A Python module (Linux) and a command-line interface (Windows/Linux).
4
4
5
5
# Table of contents
6
6
@@ -9,6 +9,7 @@ The source code is written in C++, but we have developed a module for the users
9
9
* Output types
10
10
2. How to use
11
11
* Python (Linux)
12
+
* Command-line interface (Windows/Linux)
12
13
* C++
13
14
3. How to cite
14
15
4. Licence
@@ -21,10 +22,10 @@ Consider a number of parallel queues where the capacity of the queue equals the
21
22
22
23
## Input parameters
23
24
24
-
RelSys has five types of input parameters for the model:
25
+
RelSys uses five types of input parameters:
25
26
26
-
* An arrival rate vector. Each element corresponds to a customer type.
27
-
* A service time vector. Each element corresponds to a customer type.
27
+
* An arrival rate vector, where each element corresponds to a customer type.
28
+
* A service time vector, where each element corresponds to a customer type.
28
29
* A relocation probability matrix. Rows correspond to customer types and columns to queues.
29
30
* A capacity vector. Each element corresponds to a queue.
30
31
* A preferrence vector. Each element indicates the preferred queue of each customer type.
@@ -38,15 +39,17 @@ RelSys has six output types:
38
39
* Shortage probabilities.
39
40
* Availability probabilities.
40
41
* Expected occupancy.
41
-
* Expected fraction of capacity occupied.
42
+
* Expected fraction of occupied capacity.
43
+
44
+
All outputs, except for the *expected occupancy* and *expected fraction of occupied capacity*, can be evaluated from two customer perspectives: The perspective of the customers preferring the queues, and the perspective of all customers arriving to the queues.
42
45
43
46
# How to use
44
47
45
-
RelSysis available for Python users on Linux, and for C++ users on all operating systems.
48
+
Below are guides on how to use both interfaces of RelSys, which is available as a Python module for Linux and a command-line interface for Windows and Linux.
46
49
47
50
## Python (Linux)
48
51
49
-
We have created a RelSys module for Python with `pybind11`. Head to the directory `Python/Linux/`, or run `wget https://github.com/areenberg/RelSys/blob/development/Python/Linux/relsys.cpython-310-x86_64-linux-gnu.so` to download the SO-file for the module.
52
+
We have created a Python module for Linux with `pybind11`. Head to the directory `Python/Linux/`, or run `wget https://github.com/areenberg/RelSys/blob/development/Python/Linux/relsys.cpython-310-x86_64-linux-gnu.so` to download the SO-file for the module.
50
53
51
54
Start by importing the module,
52
55
@@ -175,11 +178,57 @@ for queueIdx in range(4):
175
178
176
179
## Command-line Interface (Windows/Linux)
177
180
178
-
Coming soon.
181
+
We have created a Command-Line Interface (CLI) for Windows and Linux, which is similar to the Python module in terms of features, inputs, and outputs. The CLI utilizes files to import the input parameters and export the results, ensuring a seamless integration. Windows users can head to the directory `Command-line Interface/Windows/`, or use `wget https://github.com/areenberg/RelSys/blob/master/Command-line%20Interface/Windows/relsys.exe` to download the EXE-file for the CLI. Similarly, Linux users can head to `Command-line Interface/Linux/` or use `wget https://github.com/areenberg/RelSys/blob/master/Command-line%20Interface/Linux/relsys.exe`.
182
+
183
+
The syntax for the CLI is `relsys [options]`. Use the `-help` flag to view all available options.
184
+
185
+
```
186
+
relsys -help
187
+
```
188
+
189
+
Create a space-separated file for each of the input parameter types. For instance,
190
+
191
+
*arrivalRates.txt*
192
+
```
193
+
0.8 2.5 0.6 2.8
194
+
```
195
+
196
+
*serviceTimes.txt*
197
+
```
198
+
10 5 10 8
199
+
```
200
+
201
+
*capacity.txt*
202
+
```
203
+
15 20 10 30
204
+
```
205
+
206
+
*relocProbs.txt*
207
+
```
208
+
0.0 0.4 0.1 0.5
209
+
0.3 0.0 0.5 0.0
210
+
0.0 0.5 0.0 0.5
211
+
0.2 0.3 0.5 0.0
212
+
```
213
+
214
+
*preferred.txt*
215
+
```
216
+
0 1 2 3
217
+
```
218
+
219
+
Evaluate the model using simulation, and save the result in a semicolon-separated file named `results.csv`.
If you are a Windows user, you may encounter an issue where the Microsoft Defender SmartScreen blocks the EXE-file when you attempt to run the application. In this case, you will need to turn off SmartScreen to run the application. Alternatively, you can compile the EXE-file by downloading the source code from the `RelSys/` directory, removing the `PythonWrapper.cpp` file, and running the command `g++ -O3 *.cpp -o relsys.exe`. This will enable you to run the application without any issues caused by SmartScreen.
179
228
180
229
## C++
181
230
182
-
The approach in C++ is very similar to that of Python. The directory `RelSys/` contains the complete source code for RelSys. Start by heading there. Create a `main.cpp` file.
231
+
The following guide will show you how to use the C++ source code for evaluating a model. The directory `RelSys/` contains the complete source code for RelSys. Start by heading there. Create a `main.cpp` file.
0 commit comments