@iyulab/u-routing 0.2.2 → 0.2.4
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 +46 -47
- 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.2.
|
|
8
|
+
"version": "0.2.4",
|
|
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,21 +16,21 @@
|
|
|
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
|
|
33
|
+
export function __wbg_Number_4779d427bae39753(arg0) {
|
|
34
34
|
const ret = Number(arg0);
|
|
35
35
|
return ret;
|
|
36
36
|
}
|
|
@@ -41,60 +41,60 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
41
41
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
42
42
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
43
43
|
}
|
|
44
|
-
export function
|
|
44
|
+
export function __wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6(arg0, arg1) {
|
|
45
45
|
const v = arg1;
|
|
46
46
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
47
47
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
48
48
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
49
49
|
}
|
|
50
|
-
export function
|
|
50
|
+
export function __wbg___wbindgen_boolean_get_b131b2f36d6b2f55(arg0) {
|
|
51
51
|
const v = arg0;
|
|
52
52
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
53
53
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
54
54
|
}
|
|
55
|
-
export function
|
|
55
|
+
export function __wbg___wbindgen_debug_string_56c147eb1a51f0c4(arg0, arg1) {
|
|
56
56
|
const ret = debugString(arg1);
|
|
57
57
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
58
58
|
const len1 = WASM_VECTOR_LEN;
|
|
59
59
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
60
60
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
61
61
|
}
|
|
62
|
-
export function
|
|
62
|
+
export function __wbg___wbindgen_in_ce8569b2fc6f5088(arg0, arg1) {
|
|
63
63
|
const ret = arg0 in arg1;
|
|
64
64
|
return ret;
|
|
65
65
|
}
|
|
66
|
-
export function
|
|
66
|
+
export function __wbg___wbindgen_is_bigint_df272c65456269c2(arg0) {
|
|
67
67
|
const ret = typeof(arg0) === 'bigint';
|
|
68
68
|
return ret;
|
|
69
69
|
}
|
|
70
|
-
export function
|
|
70
|
+
export function __wbg___wbindgen_is_function_147961669f068cd4(arg0) {
|
|
71
71
|
const ret = typeof(arg0) === 'function';
|
|
72
72
|
return ret;
|
|
73
73
|
}
|
|
74
|
-
export function
|
|
74
|
+
export function __wbg___wbindgen_is_object_3a2c414391dbf751(arg0) {
|
|
75
75
|
const val = arg0;
|
|
76
76
|
const ret = typeof(val) === 'object' && val !== null;
|
|
77
77
|
return ret;
|
|
78
78
|
}
|
|
79
|
-
export function
|
|
79
|
+
export function __wbg___wbindgen_is_undefined_4410e3c20a99fa97(arg0) {
|
|
80
80
|
const ret = arg0 === undefined;
|
|
81
81
|
return ret;
|
|
82
82
|
}
|
|
83
|
-
export function
|
|
83
|
+
export function __wbg___wbindgen_jsval_eq_174c93ec61bab0c5(arg0, arg1) {
|
|
84
84
|
const ret = arg0 === arg1;
|
|
85
85
|
return ret;
|
|
86
86
|
}
|
|
87
|
-
export function
|
|
87
|
+
export function __wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c(arg0, arg1) {
|
|
88
88
|
const ret = arg0 == arg1;
|
|
89
89
|
return ret;
|
|
90
90
|
}
|
|
91
|
-
export function
|
|
91
|
+
export function __wbg___wbindgen_number_get_588ed6b97f0d7e14(arg0, arg1) {
|
|
92
92
|
const obj = arg1;
|
|
93
93
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
94
94
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
95
95
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
96
96
|
}
|
|
97
|
-
export function
|
|
97
|
+
export function __wbg___wbindgen_string_get_fa2687d531ed17a5(arg0, arg1) {
|
|
98
98
|
const obj = arg1;
|
|
99
99
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
100
100
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -102,25 +102,25 @@ export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
|
|
|
102
102
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
103
103
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
104
104
|
}
|
|
105
|
-
export function
|
|
105
|
+
export function __wbg___wbindgen_throw_bbadd78c1bac3a77(arg0, arg1) {
|
|
106
106
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
107
107
|
}
|
|
108
|
-
export function
|
|
108
|
+
export function __wbg_call_91f00ddc43e01490() { return handleError(function (arg0, arg1) {
|
|
109
109
|
const ret = arg0.call(arg1);
|
|
110
110
|
return ret;
|
|
111
111
|
}, arguments); }
|
|
112
|
-
export function
|
|
112
|
+
export function __wbg_done_6a8439e544ec6206(arg0) {
|
|
113
113
|
const ret = arg0.done;
|
|
114
114
|
return ret;
|
|
115
115
|
}
|
|
116
116
|
export function __wbg_getRandomValues_3f44b700395062e5() { return handleError(function (arg0, arg1) {
|
|
117
117
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
118
118
|
}, arguments); }
|
|
119
|
-
export function
|
|
119
|
+
export function __wbg_get_44e98e27bda25b5b() { return handleError(function (arg0, arg1) {
|
|
120
120
|
const ret = Reflect.get(arg0, arg1);
|
|
121
121
|
return ret;
|
|
122
122
|
}, arguments); }
|
|
123
|
-
export function
|
|
123
|
+
export function __wbg_get_unchecked_46e778e3cec74b5e(arg0, arg1) {
|
|
124
124
|
const ret = arg0[arg1 >>> 0];
|
|
125
125
|
return ret;
|
|
126
126
|
}
|
|
@@ -128,7 +128,7 @@ export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
|
128
128
|
const ret = arg0[arg1];
|
|
129
129
|
return ret;
|
|
130
130
|
}
|
|
131
|
-
export function
|
|
131
|
+
export function __wbg_instanceof_ArrayBuffer_a581da923203f29f(arg0) {
|
|
132
132
|
let result;
|
|
133
133
|
try {
|
|
134
134
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -138,7 +138,7 @@ export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
|
|
|
138
138
|
const ret = result;
|
|
139
139
|
return ret;
|
|
140
140
|
}
|
|
141
|
-
export function
|
|
141
|
+
export function __wbg_instanceof_Uint8Array_b6fe1ac89eba107e(arg0) {
|
|
142
142
|
let result;
|
|
143
143
|
try {
|
|
144
144
|
result = arg0 instanceof Uint8Array;
|
|
@@ -148,60 +148,60 @@ export function __wbg_instanceof_Uint8Array_740438561a5b956d(arg0) {
|
|
|
148
148
|
const ret = result;
|
|
149
149
|
return ret;
|
|
150
150
|
}
|
|
151
|
-
export function
|
|
151
|
+
export function __wbg_isArray_139f48e3c057ede8(arg0) {
|
|
152
152
|
const ret = Array.isArray(arg0);
|
|
153
153
|
return ret;
|
|
154
154
|
}
|
|
155
|
-
export function
|
|
155
|
+
export function __wbg_isSafeInteger_c22ccb4af2201fe9(arg0) {
|
|
156
156
|
const ret = Number.isSafeInteger(arg0);
|
|
157
157
|
return ret;
|
|
158
158
|
}
|
|
159
|
-
export function
|
|
159
|
+
export function __wbg_iterator_9b36cebf3be7b7cd() {
|
|
160
160
|
const ret = Symbol.iterator;
|
|
161
161
|
return ret;
|
|
162
162
|
}
|
|
163
|
-
export function
|
|
163
|
+
export function __wbg_length_68a9d5278d084f4f(arg0) {
|
|
164
164
|
const ret = arg0.length;
|
|
165
165
|
return ret;
|
|
166
166
|
}
|
|
167
|
-
export function
|
|
167
|
+
export function __wbg_length_fb04d16d7bdf6d4c(arg0) {
|
|
168
168
|
const ret = arg0.length;
|
|
169
169
|
return ret;
|
|
170
170
|
}
|
|
171
|
-
export function
|
|
172
|
-
const ret = new Uint8Array(arg0);
|
|
173
|
-
return ret;
|
|
174
|
-
}
|
|
175
|
-
export function __wbg_new_a70fbab9066b301f() {
|
|
171
|
+
export function __wbg_new_0b303268aa395a38() {
|
|
176
172
|
const ret = new Array();
|
|
177
173
|
return ret;
|
|
178
174
|
}
|
|
179
|
-
export function
|
|
175
|
+
export function __wbg_new_20b778a4c5c691c3() {
|
|
180
176
|
const ret = new Object();
|
|
181
177
|
return ret;
|
|
182
178
|
}
|
|
183
|
-
export function
|
|
179
|
+
export function __wbg_new_b06772b280cc6e52(arg0) {
|
|
180
|
+
const ret = new Uint8Array(arg0);
|
|
181
|
+
return ret;
|
|
182
|
+
}
|
|
183
|
+
export function __wbg_next_8cb028b6ba50743f() { return handleError(function (arg0) {
|
|
184
184
|
const ret = arg0.next();
|
|
185
185
|
return ret;
|
|
186
186
|
}, arguments); }
|
|
187
|
-
export function
|
|
187
|
+
export function __wbg_next_cfd0b146c9538df8(arg0) {
|
|
188
188
|
const ret = arg0.next;
|
|
189
189
|
return ret;
|
|
190
190
|
}
|
|
191
|
-
export function
|
|
191
|
+
export function __wbg_now_bce4dc999095ea77() {
|
|
192
192
|
const ret = Date.now();
|
|
193
193
|
return ret;
|
|
194
194
|
}
|
|
195
|
-
export function
|
|
195
|
+
export function __wbg_prototypesetcall_956c7493c68e29b4(arg0, arg1, arg2) {
|
|
196
196
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
197
197
|
}
|
|
198
|
-
export function __wbg_set_282384002438957f(arg0, arg1, arg2) {
|
|
199
|
-
arg0[arg1 >>> 0] = arg2;
|
|
200
|
-
}
|
|
201
198
|
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
202
199
|
arg0[arg1] = arg2;
|
|
203
200
|
}
|
|
204
|
-
export function
|
|
201
|
+
export function __wbg_set_da33c120a6584674(arg0, arg1, arg2) {
|
|
202
|
+
arg0[arg1 >>> 0] = arg2;
|
|
203
|
+
}
|
|
204
|
+
export function __wbg_value_3d3defe09fb1ffca(arg0) {
|
|
205
205
|
const ret = arg0.value;
|
|
206
206
|
return ret;
|
|
207
207
|
}
|
|
@@ -314,8 +314,7 @@ function getDataViewMemory0() {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
function getStringFromWasm0(ptr, len) {
|
|
317
|
-
|
|
318
|
-
return decodeText(ptr, len);
|
|
317
|
+
return decodeText(ptr >>> 0, len);
|
|
319
318
|
}
|
|
320
319
|
|
|
321
320
|
let cachedUint8ArrayMemory0 = null;
|
package/u_routing_bg.wasm
CHANGED
|
Binary file
|