@iyulab/u-routing 0.2.3 → 0.3.0
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.
- package/package.json +2 -2
- package/u_routing.d.ts +3 -3
- package/u_routing.js +1 -1
- package/u_routing_bg.js +67 -57
- package/u_routing_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"iyulab"
|
|
6
6
|
],
|
|
7
7
|
"description": "Vehicle routing optimization: TSP, CVRP, VRPTW with constructive heuristics, local search, GA, and ALNS.",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.3.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
"optimization",
|
|
31
31
|
"logistics"
|
|
32
32
|
]
|
|
33
|
-
}
|
|
33
|
+
}
|
package/u_routing.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Solve a capacitated VRP problem
|
|
5
|
+
* Solve a capacitated VRP problem.
|
|
6
6
|
*
|
|
7
7
|
* # Arguments
|
|
8
|
-
* * `
|
|
8
|
+
* * `problem` — A native JS object matching the VRP input schema.
|
|
9
9
|
*
|
|
10
10
|
* # Supported methods
|
|
11
11
|
* - `"nn"` — Nearest Neighbor (default, fast)
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
* # Errors
|
|
21
21
|
* Returns a `JsValue` string describing the error if input is invalid.
|
|
22
22
|
*/
|
|
23
|
-
export function solve_vrp(
|
|
23
|
+
export function solve_vrp(problem: any): any;
|
package/u_routing.js
CHANGED
package/u_routing_bg.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Solve a capacitated VRP problem
|
|
2
|
+
* Solve a capacitated VRP problem.
|
|
3
3
|
*
|
|
4
4
|
* # Arguments
|
|
5
|
-
* * `
|
|
5
|
+
* * `problem` — A native JS object matching the VRP input schema.
|
|
6
6
|
*
|
|
7
7
|
* # Supported methods
|
|
8
8
|
* - `"nn"` — Nearest Neighbor (default, fast)
|
|
@@ -16,24 +16,20 @@
|
|
|
16
16
|
*
|
|
17
17
|
* # Errors
|
|
18
18
|
* Returns a `JsValue` string describing the error if input is invalid.
|
|
19
|
-
* @param {any}
|
|
19
|
+
* @param {any} problem
|
|
20
20
|
* @returns {any}
|
|
21
21
|
*/
|
|
22
|
-
export function solve_vrp(
|
|
23
|
-
const ret = wasm.solve_vrp(
|
|
22
|
+
export function solve_vrp(problem) {
|
|
23
|
+
const ret = wasm.solve_vrp(problem);
|
|
24
24
|
if (ret[2]) {
|
|
25
25
|
throw takeFromExternrefTable0(ret[1]);
|
|
26
26
|
}
|
|
27
27
|
return takeFromExternrefTable0(ret[0]);
|
|
28
28
|
}
|
|
29
|
-
export function
|
|
29
|
+
export function __wbg_Error_9dc85fe1bc224456(arg0, arg1) {
|
|
30
30
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
31
31
|
return ret;
|
|
32
32
|
}
|
|
33
|
-
export function __wbg_Number_e6ffdb596c888833(arg0) {
|
|
34
|
-
const ret = Number(arg0);
|
|
35
|
-
return ret;
|
|
36
|
-
}
|
|
37
33
|
export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
38
34
|
const ret = String(arg1);
|
|
39
35
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -41,60 +37,56 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
41
37
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
42
38
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
43
39
|
}
|
|
44
|
-
export function
|
|
40
|
+
export function __wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6(arg0, arg1) {
|
|
45
41
|
const v = arg1;
|
|
46
42
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
47
43
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
48
44
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
49
45
|
}
|
|
50
|
-
export function
|
|
46
|
+
export function __wbg___wbindgen_boolean_get_b131b2f36d6b2f55(arg0) {
|
|
51
47
|
const v = arg0;
|
|
52
48
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
53
49
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
54
50
|
}
|
|
55
|
-
export function
|
|
51
|
+
export function __wbg___wbindgen_debug_string_56c147eb1a51f0c4(arg0, arg1) {
|
|
56
52
|
const ret = debugString(arg1);
|
|
57
53
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
58
54
|
const len1 = WASM_VECTOR_LEN;
|
|
59
55
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
60
56
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
61
57
|
}
|
|
62
|
-
export function
|
|
58
|
+
export function __wbg___wbindgen_in_ce8569b2fc6f5088(arg0, arg1) {
|
|
63
59
|
const ret = arg0 in arg1;
|
|
64
60
|
return ret;
|
|
65
61
|
}
|
|
66
|
-
export function
|
|
62
|
+
export function __wbg___wbindgen_is_bigint_df272c65456269c2(arg0) {
|
|
67
63
|
const ret = typeof(arg0) === 'bigint';
|
|
68
64
|
return ret;
|
|
69
65
|
}
|
|
70
|
-
export function
|
|
66
|
+
export function __wbg___wbindgen_is_function_147961669f068cd4(arg0) {
|
|
71
67
|
const ret = typeof(arg0) === 'function';
|
|
72
68
|
return ret;
|
|
73
69
|
}
|
|
74
|
-
export function
|
|
70
|
+
export function __wbg___wbindgen_is_object_3a2c414391dbf751(arg0) {
|
|
75
71
|
const val = arg0;
|
|
76
72
|
const ret = typeof(val) === 'object' && val !== null;
|
|
77
73
|
return ret;
|
|
78
74
|
}
|
|
79
|
-
export function
|
|
80
|
-
const ret = arg0 === undefined;
|
|
81
|
-
return ret;
|
|
82
|
-
}
|
|
83
|
-
export function __wbg___wbindgen_jsval_eq_7d430e744a913d26(arg0, arg1) {
|
|
75
|
+
export function __wbg___wbindgen_jsval_eq_174c93ec61bab0c5(arg0, arg1) {
|
|
84
76
|
const ret = arg0 === arg1;
|
|
85
77
|
return ret;
|
|
86
78
|
}
|
|
87
|
-
export function
|
|
79
|
+
export function __wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c(arg0, arg1) {
|
|
88
80
|
const ret = arg0 == arg1;
|
|
89
81
|
return ret;
|
|
90
82
|
}
|
|
91
|
-
export function
|
|
83
|
+
export function __wbg___wbindgen_number_get_588ed6b97f0d7e14(arg0, arg1) {
|
|
92
84
|
const obj = arg1;
|
|
93
85
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
94
86
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
95
87
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
96
88
|
}
|
|
97
|
-
export function
|
|
89
|
+
export function __wbg___wbindgen_string_get_fa2687d531ed17a5(arg0, arg1) {
|
|
98
90
|
const obj = arg1;
|
|
99
91
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
100
92
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -102,33 +94,37 @@ export function __wbg___wbindgen_string_get_914df97fcfa788f2(arg0, arg1) {
|
|
|
102
94
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
103
95
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
104
96
|
}
|
|
105
|
-
export function
|
|
97
|
+
export function __wbg___wbindgen_throw_bbadd78c1bac3a77(arg0, arg1) {
|
|
106
98
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
107
99
|
}
|
|
108
|
-
export function
|
|
100
|
+
export function __wbg_call_91f00ddc43e01490() { return handleError(function (arg0, arg1) {
|
|
109
101
|
const ret = arg0.call(arg1);
|
|
110
102
|
return ret;
|
|
111
103
|
}, arguments); }
|
|
112
|
-
export function
|
|
104
|
+
export function __wbg_done_6a8439e544ec6206(arg0) {
|
|
113
105
|
const ret = arg0.done;
|
|
114
106
|
return ret;
|
|
115
107
|
}
|
|
108
|
+
export function __wbg_entries_5a6a7e7e0df09fe5(arg0) {
|
|
109
|
+
const ret = Object.entries(arg0);
|
|
110
|
+
return ret;
|
|
111
|
+
}
|
|
116
112
|
export function __wbg_getRandomValues_3f44b700395062e5() { return handleError(function (arg0, arg1) {
|
|
117
113
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
118
114
|
}, arguments); }
|
|
119
|
-
export function
|
|
115
|
+
export function __wbg_get_44e98e27bda25b5b() { return handleError(function (arg0, arg1) {
|
|
120
116
|
const ret = Reflect.get(arg0, arg1);
|
|
121
117
|
return ret;
|
|
122
118
|
}, arguments); }
|
|
123
|
-
export function
|
|
119
|
+
export function __wbg_get_4b90d6d8c5deb5d5(arg0, arg1) {
|
|
124
120
|
const ret = arg0[arg1 >>> 0];
|
|
125
121
|
return ret;
|
|
126
122
|
}
|
|
127
|
-
export function
|
|
128
|
-
const ret = arg0[arg1];
|
|
123
|
+
export function __wbg_get_unchecked_46e778e3cec74b5e(arg0, arg1) {
|
|
124
|
+
const ret = arg0[arg1 >>> 0];
|
|
129
125
|
return ret;
|
|
130
126
|
}
|
|
131
|
-
export function
|
|
127
|
+
export function __wbg_instanceof_ArrayBuffer_a581da923203f29f(arg0) {
|
|
132
128
|
let result;
|
|
133
129
|
try {
|
|
134
130
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -138,7 +134,17 @@ export function __wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a(arg0) {
|
|
|
138
134
|
const ret = result;
|
|
139
135
|
return ret;
|
|
140
136
|
}
|
|
141
|
-
export function
|
|
137
|
+
export function __wbg_instanceof_Map_7f94c740225003e2(arg0) {
|
|
138
|
+
let result;
|
|
139
|
+
try {
|
|
140
|
+
result = arg0 instanceof Map;
|
|
141
|
+
} catch (_) {
|
|
142
|
+
result = false;
|
|
143
|
+
}
|
|
144
|
+
const ret = result;
|
|
145
|
+
return ret;
|
|
146
|
+
}
|
|
147
|
+
export function __wbg_instanceof_Uint8Array_b6fe1ac89eba107e(arg0) {
|
|
142
148
|
let result;
|
|
143
149
|
try {
|
|
144
150
|
result = arg0 instanceof Uint8Array;
|
|
@@ -148,60 +154,60 @@ export function __wbg_instanceof_Uint8Array_4b8da683deb25d72(arg0) {
|
|
|
148
154
|
const ret = result;
|
|
149
155
|
return ret;
|
|
150
156
|
}
|
|
151
|
-
export function
|
|
157
|
+
export function __wbg_isArray_139f48e3c057ede8(arg0) {
|
|
152
158
|
const ret = Array.isArray(arg0);
|
|
153
159
|
return ret;
|
|
154
160
|
}
|
|
155
|
-
export function
|
|
161
|
+
export function __wbg_isSafeInteger_c22ccb4af2201fe9(arg0) {
|
|
156
162
|
const ret = Number.isSafeInteger(arg0);
|
|
157
163
|
return ret;
|
|
158
164
|
}
|
|
159
|
-
export function
|
|
165
|
+
export function __wbg_iterator_9b36cebf3be7b7cd() {
|
|
160
166
|
const ret = Symbol.iterator;
|
|
161
167
|
return ret;
|
|
162
168
|
}
|
|
163
|
-
export function
|
|
169
|
+
export function __wbg_length_68a9d5278d084f4f(arg0) {
|
|
164
170
|
const ret = arg0.length;
|
|
165
171
|
return ret;
|
|
166
172
|
}
|
|
167
|
-
export function
|
|
173
|
+
export function __wbg_length_fb04d16d7bdf6d4c(arg0) {
|
|
168
174
|
const ret = arg0.length;
|
|
169
175
|
return ret;
|
|
170
176
|
}
|
|
171
|
-
export function
|
|
177
|
+
export function __wbg_new_0b303268aa395a38() {
|
|
178
|
+
const ret = new Array();
|
|
179
|
+
return ret;
|
|
180
|
+
}
|
|
181
|
+
export function __wbg_new_20b778a4c5c691c3() {
|
|
172
182
|
const ret = new Object();
|
|
173
183
|
return ret;
|
|
174
184
|
}
|
|
175
|
-
export function
|
|
185
|
+
export function __wbg_new_b06772b280cc6e52(arg0) {
|
|
176
186
|
const ret = new Uint8Array(arg0);
|
|
177
187
|
return ret;
|
|
178
188
|
}
|
|
179
|
-
export function
|
|
180
|
-
const ret =
|
|
189
|
+
export function __wbg_next_8cb028b6ba50743f() { return handleError(function (arg0) {
|
|
190
|
+
const ret = arg0.next();
|
|
181
191
|
return ret;
|
|
182
|
-
}
|
|
183
|
-
export function
|
|
192
|
+
}, arguments); }
|
|
193
|
+
export function __wbg_next_cfd0b146c9538df8(arg0) {
|
|
184
194
|
const ret = arg0.next;
|
|
185
195
|
return ret;
|
|
186
196
|
}
|
|
187
|
-
export function
|
|
188
|
-
const ret = arg0.next();
|
|
189
|
-
return ret;
|
|
190
|
-
}, arguments); }
|
|
191
|
-
export function __wbg_now_88621c9c9a4f3ffc() {
|
|
197
|
+
export function __wbg_now_bce4dc999095ea77() {
|
|
192
198
|
const ret = Date.now();
|
|
193
199
|
return ret;
|
|
194
200
|
}
|
|
195
|
-
export function
|
|
201
|
+
export function __wbg_prototypesetcall_956c7493c68e29b4(arg0, arg1, arg2) {
|
|
196
202
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
197
203
|
}
|
|
198
204
|
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
199
205
|
arg0[arg1] = arg2;
|
|
200
206
|
}
|
|
201
|
-
export function
|
|
207
|
+
export function __wbg_set_da33c120a6584674(arg0, arg1, arg2) {
|
|
202
208
|
arg0[arg1 >>> 0] = arg2;
|
|
203
209
|
}
|
|
204
|
-
export function
|
|
210
|
+
export function __wbg_value_3d3defe09fb1ffca(arg0) {
|
|
205
211
|
const ret = arg0.value;
|
|
206
212
|
return ret;
|
|
207
213
|
}
|
|
@@ -210,12 +216,17 @@ export function __wbindgen_cast_0000000000000001(arg0) {
|
|
|
210
216
|
const ret = arg0;
|
|
211
217
|
return ret;
|
|
212
218
|
}
|
|
213
|
-
export function __wbindgen_cast_0000000000000002(arg0
|
|
219
|
+
export function __wbindgen_cast_0000000000000002(arg0) {
|
|
220
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
221
|
+
const ret = arg0;
|
|
222
|
+
return ret;
|
|
223
|
+
}
|
|
224
|
+
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
214
225
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
215
226
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
216
227
|
return ret;
|
|
217
228
|
}
|
|
218
|
-
export function
|
|
229
|
+
export function __wbindgen_cast_0000000000000004(arg0) {
|
|
219
230
|
// Cast intrinsic for `U64 -> Externref`.
|
|
220
231
|
const ret = BigInt.asUintN(64, arg0);
|
|
221
232
|
return ret;
|
|
@@ -314,8 +325,7 @@ function getDataViewMemory0() {
|
|
|
314
325
|
}
|
|
315
326
|
|
|
316
327
|
function getStringFromWasm0(ptr, len) {
|
|
317
|
-
|
|
318
|
-
return decodeText(ptr, len);
|
|
328
|
+
return decodeText(ptr >>> 0, len);
|
|
319
329
|
}
|
|
320
330
|
|
|
321
331
|
let cachedUint8ArrayMemory0 = null;
|
package/u_routing_bg.wasm
CHANGED
|
Binary file
|