s2mflow 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- s2mflow-0.1.0/.github/workflows/release.yml +117 -0
- s2mflow-0.1.0/.gitignore +25 -0
- s2mflow-0.1.0/CHANGELOG.md +22 -0
- s2mflow-0.1.0/CITATION.cff +13 -0
- s2mflow-0.1.0/Cargo.lock +491 -0
- s2mflow-0.1.0/Cargo.toml +16 -0
- s2mflow-0.1.0/LICENSE +21 -0
- s2mflow-0.1.0/PKG-INFO +113 -0
- s2mflow-0.1.0/README.md +91 -0
- s2mflow-0.1.0/poetry.lock +34 -0
- s2mflow-0.1.0/pyproject.toml +45 -0
- s2mflow-0.1.0/s2mflow/__init__.py +29 -0
- s2mflow-0.1.0/s2mflow/py.typed +0 -0
- s2mflow-0.1.0/s2mflow/s2mflow.pyi +173 -0
- s2mflow-0.1.0/src/lib.rs +219 -0
- s2mflow-0.1.0/src/logic/generator.rs +238 -0
- s2mflow-0.1.0/src/logic/mod.rs +1 -0
- s2mflow-0.1.0/src/models.rs +71 -0
- s2mflow-0.1.0/src/utils.rs +305 -0
- s2mflow-0.1.0/tests/.gitkeep +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
# 1. Build for Linux
|
|
10
|
+
linux:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
target: [x86_64, aarch64]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up QEMU
|
|
19
|
+
if: matrix.target == 'aarch64'
|
|
20
|
+
uses: docker/setup-qemu-action@v3
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.13'
|
|
26
|
+
|
|
27
|
+
- name: Build wheels
|
|
28
|
+
uses: PyO3/maturin-action@v1
|
|
29
|
+
with:
|
|
30
|
+
target: ${{ matrix.target }}
|
|
31
|
+
args: --release --out dist ${{ matrix.target == 'aarch64' && '-i 3.13' || '' }}
|
|
32
|
+
manylinux: 2_28
|
|
33
|
+
|
|
34
|
+
- name: Upload wheels
|
|
35
|
+
uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: wheels-linux-${{ matrix.target }}
|
|
38
|
+
path: dist
|
|
39
|
+
|
|
40
|
+
# 2. Build for Windows
|
|
41
|
+
windows:
|
|
42
|
+
runs-on: windows-latest
|
|
43
|
+
strategy:
|
|
44
|
+
matrix:
|
|
45
|
+
target: [x64]
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
- name: Set up Python
|
|
49
|
+
uses: actions/setup-python@v5
|
|
50
|
+
with:
|
|
51
|
+
python-version: '3.13'
|
|
52
|
+
- name: Build wheels
|
|
53
|
+
uses: PyO3/maturin-action@v1
|
|
54
|
+
with:
|
|
55
|
+
target: ${{ matrix.target }}
|
|
56
|
+
args: --release --out dist
|
|
57
|
+
- name: Upload wheels
|
|
58
|
+
uses: actions/upload-artifact@v4
|
|
59
|
+
with:
|
|
60
|
+
name: wheels-windows-${{ matrix.target }}
|
|
61
|
+
path: dist
|
|
62
|
+
|
|
63
|
+
# 3. Build for macOS
|
|
64
|
+
macos:
|
|
65
|
+
runs-on: macos-latest
|
|
66
|
+
strategy:
|
|
67
|
+
matrix:
|
|
68
|
+
target: [x86_64, aarch64]
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@v5
|
|
73
|
+
with:
|
|
74
|
+
python-version: '3.13'
|
|
75
|
+
- name: Build wheels
|
|
76
|
+
uses: PyO3/maturin-action@v1
|
|
77
|
+
with:
|
|
78
|
+
target: ${{ matrix.target }}
|
|
79
|
+
args: --release --out dist
|
|
80
|
+
- name: Upload wheels
|
|
81
|
+
uses: actions/upload-artifact@v4
|
|
82
|
+
with:
|
|
83
|
+
name: wheels-macos-${{ matrix.target }}
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
# 4. Build the Source Distribution (sdist)
|
|
87
|
+
sdist:
|
|
88
|
+
runs-on: ubuntu-latest
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v4
|
|
91
|
+
- name: Build sdist
|
|
92
|
+
uses: PyO3/maturin-action@v1
|
|
93
|
+
with:
|
|
94
|
+
command: sdist
|
|
95
|
+
args: --out dist
|
|
96
|
+
- name: Upload sdist
|
|
97
|
+
uses: actions/upload-artifact@v4
|
|
98
|
+
with:
|
|
99
|
+
name: wheels-sdist
|
|
100
|
+
path: dist
|
|
101
|
+
|
|
102
|
+
# 5. Publish to PyPI
|
|
103
|
+
publish:
|
|
104
|
+
name: Publish to PyPI
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
environment: pypi
|
|
107
|
+
permissions:
|
|
108
|
+
id-token: write
|
|
109
|
+
needs: [linux, windows, macos, sdist]
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/download-artifact@v4
|
|
112
|
+
with:
|
|
113
|
+
pattern: wheels-*
|
|
114
|
+
path: dist
|
|
115
|
+
merge-multiple: true
|
|
116
|
+
- name: Publish package distributions to PyPI
|
|
117
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
s2mflow-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
target/
|
|
3
|
+
Cargo.lock
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
*.so
|
|
10
|
+
*.pyd
|
|
11
|
+
*.pdb
|
|
12
|
+
*.pds
|
|
13
|
+
*.dylib
|
|
14
|
+
.venv/
|
|
15
|
+
dist/
|
|
16
|
+
|
|
17
|
+
# IDEs
|
|
18
|
+
.idea/
|
|
19
|
+
.vscode/
|
|
20
|
+
.DS_Store
|
|
21
|
+
|
|
22
|
+
.env/
|
|
23
|
+
.pytest_cache/
|
|
24
|
+
.mypy_cache/
|
|
25
|
+
.ruff_cache/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-03-28
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Core Rust Engine**: Implementation for multicommodity flow instance generation.
|
|
14
|
+
- **Python Bindings**: Integration using PyO3 and Maturin.
|
|
15
|
+
- **Instance Loading**: Support for reading single-commodity `.min` files and multicommodity `.mcfmin` (introduced format) files.
|
|
16
|
+
- **Instance Writing**: Support for writing multicommodity files to `.mcfmin` format.
|
|
17
|
+
- **Utils**: Support for identifying incoming and outgoing edges.
|
|
18
|
+
- **Partitioning Strategies**:
|
|
19
|
+
- `split_supplies_uniform`.
|
|
20
|
+
- `split_supplies_spread`.
|
|
21
|
+
- **CI/CD Pipeline**: Automated multi-platform builds (Linux, Windows, maxOS) via GitHub Actions.
|
|
22
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
authors:
|
|
4
|
+
- family-names: "Broesamle"
|
|
5
|
+
given-names: "Felix P."
|
|
6
|
+
affiliation: "Discrete Optimization and Logistics, Institute for Operations Research, Karlsruhe Institute of Technology"
|
|
7
|
+
- family-names: "Nickel"
|
|
8
|
+
given-names: "Stefan"
|
|
9
|
+
affiliation: "Discrete Optimization and Logistics, Institute for Operations Research, Karlsruhe Institute of Technology"
|
|
10
|
+
title: "s2mflow: A Meta-generator for Multicommodity Flow Instances"
|
|
11
|
+
version: 0.1.0
|
|
12
|
+
date-released: 2026-03-28
|
|
13
|
+
url: "https://github.com/FelixBroesamle/s2mflow"
|
s2mflow-0.1.0/Cargo.lock
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "anyhow"
|
|
7
|
+
version = "1.0.102"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bitflags"
|
|
13
|
+
version = "2.11.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "cfg-if"
|
|
19
|
+
version = "1.0.4"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "chacha20"
|
|
25
|
+
version = "0.10.0"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"cfg-if",
|
|
30
|
+
"cpufeatures",
|
|
31
|
+
"rand_core",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[[package]]
|
|
35
|
+
name = "cpufeatures"
|
|
36
|
+
version = "0.3.0"
|
|
37
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
38
|
+
checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
|
|
39
|
+
dependencies = [
|
|
40
|
+
"libc",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[[package]]
|
|
44
|
+
name = "equivalent"
|
|
45
|
+
version = "1.0.2"
|
|
46
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
47
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
48
|
+
|
|
49
|
+
[[package]]
|
|
50
|
+
name = "foldhash"
|
|
51
|
+
version = "0.1.5"
|
|
52
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
53
|
+
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
|
54
|
+
|
|
55
|
+
[[package]]
|
|
56
|
+
name = "getrandom"
|
|
57
|
+
version = "0.4.2"
|
|
58
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
+
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
|
|
60
|
+
dependencies = [
|
|
61
|
+
"cfg-if",
|
|
62
|
+
"libc",
|
|
63
|
+
"r-efi",
|
|
64
|
+
"rand_core",
|
|
65
|
+
"wasip2",
|
|
66
|
+
"wasip3",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "hashbrown"
|
|
71
|
+
version = "0.15.5"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
|
74
|
+
dependencies = [
|
|
75
|
+
"foldhash",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "hashbrown"
|
|
80
|
+
version = "0.16.1"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
|
83
|
+
|
|
84
|
+
[[package]]
|
|
85
|
+
name = "heck"
|
|
86
|
+
version = "0.5.0"
|
|
87
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
88
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
89
|
+
|
|
90
|
+
[[package]]
|
|
91
|
+
name = "id-arena"
|
|
92
|
+
version = "2.3.0"
|
|
93
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
94
|
+
checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
|
|
95
|
+
|
|
96
|
+
[[package]]
|
|
97
|
+
name = "indexmap"
|
|
98
|
+
version = "2.13.0"
|
|
99
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
+
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
|
|
101
|
+
dependencies = [
|
|
102
|
+
"equivalent",
|
|
103
|
+
"hashbrown 0.16.1",
|
|
104
|
+
"serde",
|
|
105
|
+
"serde_core",
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
[[package]]
|
|
109
|
+
name = "itoa"
|
|
110
|
+
version = "1.0.18"
|
|
111
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
113
|
+
|
|
114
|
+
[[package]]
|
|
115
|
+
name = "leb128fmt"
|
|
116
|
+
version = "0.1.0"
|
|
117
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
+
checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
|
|
119
|
+
|
|
120
|
+
[[package]]
|
|
121
|
+
name = "libc"
|
|
122
|
+
version = "0.2.183"
|
|
123
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
+
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
|
|
125
|
+
|
|
126
|
+
[[package]]
|
|
127
|
+
name = "log"
|
|
128
|
+
version = "0.4.29"
|
|
129
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
131
|
+
|
|
132
|
+
[[package]]
|
|
133
|
+
name = "memchr"
|
|
134
|
+
version = "2.8.0"
|
|
135
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
136
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
137
|
+
|
|
138
|
+
[[package]]
|
|
139
|
+
name = "once_cell"
|
|
140
|
+
version = "1.21.4"
|
|
141
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
142
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
143
|
+
|
|
144
|
+
[[package]]
|
|
145
|
+
name = "portable-atomic"
|
|
146
|
+
version = "1.13.1"
|
|
147
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
148
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
149
|
+
|
|
150
|
+
[[package]]
|
|
151
|
+
name = "prettyplease"
|
|
152
|
+
version = "0.2.37"
|
|
153
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
154
|
+
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
|
|
155
|
+
dependencies = [
|
|
156
|
+
"proc-macro2",
|
|
157
|
+
"syn",
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "proc-macro2"
|
|
162
|
+
version = "1.0.106"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
165
|
+
dependencies = [
|
|
166
|
+
"unicode-ident",
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
[[package]]
|
|
170
|
+
name = "pyo3"
|
|
171
|
+
version = "0.28.2"
|
|
172
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
+
checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
|
|
174
|
+
dependencies = [
|
|
175
|
+
"libc",
|
|
176
|
+
"once_cell",
|
|
177
|
+
"portable-atomic",
|
|
178
|
+
"pyo3-build-config",
|
|
179
|
+
"pyo3-ffi",
|
|
180
|
+
"pyo3-macros",
|
|
181
|
+
]
|
|
182
|
+
|
|
183
|
+
[[package]]
|
|
184
|
+
name = "pyo3-build-config"
|
|
185
|
+
version = "0.28.2"
|
|
186
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
187
|
+
checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
|
|
188
|
+
dependencies = [
|
|
189
|
+
"target-lexicon",
|
|
190
|
+
]
|
|
191
|
+
|
|
192
|
+
[[package]]
|
|
193
|
+
name = "pyo3-ffi"
|
|
194
|
+
version = "0.28.2"
|
|
195
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
196
|
+
checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
|
|
197
|
+
dependencies = [
|
|
198
|
+
"libc",
|
|
199
|
+
"pyo3-build-config",
|
|
200
|
+
]
|
|
201
|
+
|
|
202
|
+
[[package]]
|
|
203
|
+
name = "pyo3-macros"
|
|
204
|
+
version = "0.28.2"
|
|
205
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
206
|
+
checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
|
|
207
|
+
dependencies = [
|
|
208
|
+
"proc-macro2",
|
|
209
|
+
"pyo3-macros-backend",
|
|
210
|
+
"quote",
|
|
211
|
+
"syn",
|
|
212
|
+
]
|
|
213
|
+
|
|
214
|
+
[[package]]
|
|
215
|
+
name = "pyo3-macros-backend"
|
|
216
|
+
version = "0.28.2"
|
|
217
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
218
|
+
checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
|
|
219
|
+
dependencies = [
|
|
220
|
+
"heck",
|
|
221
|
+
"proc-macro2",
|
|
222
|
+
"pyo3-build-config",
|
|
223
|
+
"quote",
|
|
224
|
+
"syn",
|
|
225
|
+
]
|
|
226
|
+
|
|
227
|
+
[[package]]
|
|
228
|
+
name = "quote"
|
|
229
|
+
version = "1.0.45"
|
|
230
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
231
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
232
|
+
dependencies = [
|
|
233
|
+
"proc-macro2",
|
|
234
|
+
]
|
|
235
|
+
|
|
236
|
+
[[package]]
|
|
237
|
+
name = "r-efi"
|
|
238
|
+
version = "6.0.0"
|
|
239
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
240
|
+
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
241
|
+
|
|
242
|
+
[[package]]
|
|
243
|
+
name = "rand"
|
|
244
|
+
version = "0.10.0"
|
|
245
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
246
|
+
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8"
|
|
247
|
+
dependencies = [
|
|
248
|
+
"chacha20",
|
|
249
|
+
"getrandom",
|
|
250
|
+
"rand_core",
|
|
251
|
+
]
|
|
252
|
+
|
|
253
|
+
[[package]]
|
|
254
|
+
name = "rand_core"
|
|
255
|
+
version = "0.10.0"
|
|
256
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
257
|
+
checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba"
|
|
258
|
+
|
|
259
|
+
[[package]]
|
|
260
|
+
name = "s2mflow"
|
|
261
|
+
version = "0.1.0"
|
|
262
|
+
dependencies = [
|
|
263
|
+
"pyo3",
|
|
264
|
+
"rand",
|
|
265
|
+
"serde",
|
|
266
|
+
"serde_json",
|
|
267
|
+
]
|
|
268
|
+
|
|
269
|
+
[[package]]
|
|
270
|
+
name = "semver"
|
|
271
|
+
version = "1.0.27"
|
|
272
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
273
|
+
checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
|
|
274
|
+
|
|
275
|
+
[[package]]
|
|
276
|
+
name = "serde"
|
|
277
|
+
version = "1.0.228"
|
|
278
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
279
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
280
|
+
dependencies = [
|
|
281
|
+
"serde_core",
|
|
282
|
+
"serde_derive",
|
|
283
|
+
]
|
|
284
|
+
|
|
285
|
+
[[package]]
|
|
286
|
+
name = "serde_core"
|
|
287
|
+
version = "1.0.228"
|
|
288
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
289
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
290
|
+
dependencies = [
|
|
291
|
+
"serde_derive",
|
|
292
|
+
]
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "serde_derive"
|
|
296
|
+
version = "1.0.228"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
299
|
+
dependencies = [
|
|
300
|
+
"proc-macro2",
|
|
301
|
+
"quote",
|
|
302
|
+
"syn",
|
|
303
|
+
]
|
|
304
|
+
|
|
305
|
+
[[package]]
|
|
306
|
+
name = "serde_json"
|
|
307
|
+
version = "1.0.149"
|
|
308
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
309
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
310
|
+
dependencies = [
|
|
311
|
+
"itoa",
|
|
312
|
+
"memchr",
|
|
313
|
+
"serde",
|
|
314
|
+
"serde_core",
|
|
315
|
+
"zmij",
|
|
316
|
+
]
|
|
317
|
+
|
|
318
|
+
[[package]]
|
|
319
|
+
name = "syn"
|
|
320
|
+
version = "2.0.117"
|
|
321
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
322
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
323
|
+
dependencies = [
|
|
324
|
+
"proc-macro2",
|
|
325
|
+
"quote",
|
|
326
|
+
"unicode-ident",
|
|
327
|
+
]
|
|
328
|
+
|
|
329
|
+
[[package]]
|
|
330
|
+
name = "target-lexicon"
|
|
331
|
+
version = "0.13.5"
|
|
332
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
333
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
334
|
+
|
|
335
|
+
[[package]]
|
|
336
|
+
name = "unicode-ident"
|
|
337
|
+
version = "1.0.24"
|
|
338
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
339
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
340
|
+
|
|
341
|
+
[[package]]
|
|
342
|
+
name = "unicode-xid"
|
|
343
|
+
version = "0.2.6"
|
|
344
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
345
|
+
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
|
346
|
+
|
|
347
|
+
[[package]]
|
|
348
|
+
name = "wasip2"
|
|
349
|
+
version = "1.0.2+wasi-0.2.9"
|
|
350
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
351
|
+
checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
|
|
352
|
+
dependencies = [
|
|
353
|
+
"wit-bindgen",
|
|
354
|
+
]
|
|
355
|
+
|
|
356
|
+
[[package]]
|
|
357
|
+
name = "wasip3"
|
|
358
|
+
version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
|
|
359
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
360
|
+
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
|
|
361
|
+
dependencies = [
|
|
362
|
+
"wit-bindgen",
|
|
363
|
+
]
|
|
364
|
+
|
|
365
|
+
[[package]]
|
|
366
|
+
name = "wasm-encoder"
|
|
367
|
+
version = "0.244.0"
|
|
368
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
369
|
+
checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
|
|
370
|
+
dependencies = [
|
|
371
|
+
"leb128fmt",
|
|
372
|
+
"wasmparser",
|
|
373
|
+
]
|
|
374
|
+
|
|
375
|
+
[[package]]
|
|
376
|
+
name = "wasm-metadata"
|
|
377
|
+
version = "0.244.0"
|
|
378
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
379
|
+
checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
|
|
380
|
+
dependencies = [
|
|
381
|
+
"anyhow",
|
|
382
|
+
"indexmap",
|
|
383
|
+
"wasm-encoder",
|
|
384
|
+
"wasmparser",
|
|
385
|
+
]
|
|
386
|
+
|
|
387
|
+
[[package]]
|
|
388
|
+
name = "wasmparser"
|
|
389
|
+
version = "0.244.0"
|
|
390
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
391
|
+
checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
|
|
392
|
+
dependencies = [
|
|
393
|
+
"bitflags",
|
|
394
|
+
"hashbrown 0.15.5",
|
|
395
|
+
"indexmap",
|
|
396
|
+
"semver",
|
|
397
|
+
]
|
|
398
|
+
|
|
399
|
+
[[package]]
|
|
400
|
+
name = "wit-bindgen"
|
|
401
|
+
version = "0.51.0"
|
|
402
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
403
|
+
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
|
|
404
|
+
dependencies = [
|
|
405
|
+
"wit-bindgen-rust-macro",
|
|
406
|
+
]
|
|
407
|
+
|
|
408
|
+
[[package]]
|
|
409
|
+
name = "wit-bindgen-core"
|
|
410
|
+
version = "0.51.0"
|
|
411
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
412
|
+
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
|
|
413
|
+
dependencies = [
|
|
414
|
+
"anyhow",
|
|
415
|
+
"heck",
|
|
416
|
+
"wit-parser",
|
|
417
|
+
]
|
|
418
|
+
|
|
419
|
+
[[package]]
|
|
420
|
+
name = "wit-bindgen-rust"
|
|
421
|
+
version = "0.51.0"
|
|
422
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
423
|
+
checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
|
|
424
|
+
dependencies = [
|
|
425
|
+
"anyhow",
|
|
426
|
+
"heck",
|
|
427
|
+
"indexmap",
|
|
428
|
+
"prettyplease",
|
|
429
|
+
"syn",
|
|
430
|
+
"wasm-metadata",
|
|
431
|
+
"wit-bindgen-core",
|
|
432
|
+
"wit-component",
|
|
433
|
+
]
|
|
434
|
+
|
|
435
|
+
[[package]]
|
|
436
|
+
name = "wit-bindgen-rust-macro"
|
|
437
|
+
version = "0.51.0"
|
|
438
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
439
|
+
checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
|
|
440
|
+
dependencies = [
|
|
441
|
+
"anyhow",
|
|
442
|
+
"prettyplease",
|
|
443
|
+
"proc-macro2",
|
|
444
|
+
"quote",
|
|
445
|
+
"syn",
|
|
446
|
+
"wit-bindgen-core",
|
|
447
|
+
"wit-bindgen-rust",
|
|
448
|
+
]
|
|
449
|
+
|
|
450
|
+
[[package]]
|
|
451
|
+
name = "wit-component"
|
|
452
|
+
version = "0.244.0"
|
|
453
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
454
|
+
checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
|
|
455
|
+
dependencies = [
|
|
456
|
+
"anyhow",
|
|
457
|
+
"bitflags",
|
|
458
|
+
"indexmap",
|
|
459
|
+
"log",
|
|
460
|
+
"serde",
|
|
461
|
+
"serde_derive",
|
|
462
|
+
"serde_json",
|
|
463
|
+
"wasm-encoder",
|
|
464
|
+
"wasm-metadata",
|
|
465
|
+
"wasmparser",
|
|
466
|
+
"wit-parser",
|
|
467
|
+
]
|
|
468
|
+
|
|
469
|
+
[[package]]
|
|
470
|
+
name = "wit-parser"
|
|
471
|
+
version = "0.244.0"
|
|
472
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
473
|
+
checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
|
|
474
|
+
dependencies = [
|
|
475
|
+
"anyhow",
|
|
476
|
+
"id-arena",
|
|
477
|
+
"indexmap",
|
|
478
|
+
"log",
|
|
479
|
+
"semver",
|
|
480
|
+
"serde",
|
|
481
|
+
"serde_derive",
|
|
482
|
+
"serde_json",
|
|
483
|
+
"unicode-xid",
|
|
484
|
+
"wasmparser",
|
|
485
|
+
]
|
|
486
|
+
|
|
487
|
+
[[package]]
|
|
488
|
+
name = "zmij"
|
|
489
|
+
version = "1.0.21"
|
|
490
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
491
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
s2mflow-0.1.0/Cargo.toml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "s2mflow"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
description = "Meta-generator: generating multicommodity flow instances from single-commodity flow instances."
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
[lib]
|
|
9
|
+
name = "s2mflow"
|
|
10
|
+
crate-type = ["cdylib"]
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
pyo3 = { version = "0.28.2", features = ["extension-module"] }
|
|
14
|
+
rand = "0.10.0"
|
|
15
|
+
serde = { version = "1.0.228", features = ["derive"] }
|
|
16
|
+
serde_json = "1.0.149"
|
s2mflow-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Discrete Optimization and Logistics, Karlsruhe Institute of Technology (KIT), Felix P. Broesamle and Stefan Nickel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|