@elaraai/east-py-datascience 0.0.2-beta.8 → 0.0.2-beta.80
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/README.md +58 -1
- package/dist/src/alns/alns.d.ts +528 -0
- package/dist/src/alns/alns.d.ts.map +1 -0
- package/dist/src/alns/alns.js +238 -0
- package/dist/src/alns/alns.js.map +1 -0
- package/dist/src/google_or/google_or.d.ts +2422 -0
- package/dist/src/google_or/google_or.d.ts.map +1 -0
- package/dist/src/google_or/google_or.js +542 -0
- package/dist/src/google_or/google_or.js.map +1 -0
- package/dist/{gp → src/gp}/gp.d.ts +185 -136
- package/dist/src/gp/gp.d.ts.map +1 -0
- package/dist/{gp → src/gp}/gp.js +64 -12
- package/dist/src/gp/gp.js.map +1 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +57 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lightgbm/lightgbm.d.ts +575 -0
- package/dist/src/lightgbm/lightgbm.d.ts.map +1 -0
- package/dist/{lightgbm → src/lightgbm}/lightgbm.js +104 -18
- package/dist/src/lightgbm/lightgbm.js.map +1 -0
- package/dist/src/lightning/lightning.d.ts +1594 -0
- package/dist/src/lightning/lightning.d.ts.map +1 -0
- package/dist/src/lightning/lightning.js +468 -0
- package/dist/src/lightning/lightning.js.map +1 -0
- package/dist/{mads → src/mads}/mads.d.ts +109 -112
- package/dist/src/mads/mads.d.ts.map +1 -0
- package/dist/{mads → src/mads}/mads.js +6 -8
- package/dist/src/mads/mads.js.map +1 -0
- package/dist/src/mapie/mapie.d.ts +3680 -0
- package/dist/src/mapie/mapie.d.ts.map +1 -0
- package/dist/src/mapie/mapie.js +616 -0
- package/dist/src/mapie/mapie.js.map +1 -0
- package/dist/{ngboost → src/ngboost}/ngboost.d.ts +192 -142
- package/dist/src/ngboost/ngboost.d.ts.map +1 -0
- package/dist/{ngboost → src/ngboost}/ngboost.js +67 -14
- package/dist/src/ngboost/ngboost.js.map +1 -0
- package/dist/src/optimization/optimization.d.ts +420 -0
- package/dist/src/optimization/optimization.d.ts.map +1 -0
- package/dist/src/optimization/optimization.js +257 -0
- package/dist/src/optimization/optimization.js.map +1 -0
- package/dist/{optuna → src/optuna}/optuna.d.ts +374 -314
- package/dist/src/optuna/optuna.d.ts.map +1 -0
- package/dist/{optuna → src/optuna}/optuna.js +2 -0
- package/dist/src/optuna/optuna.js.map +1 -0
- package/dist/src/pymc/pymc.d.ts +2932 -0
- package/dist/src/pymc/pymc.d.ts.map +1 -0
- package/dist/src/pymc/pymc.js +688 -0
- package/dist/src/pymc/pymc.js.map +1 -0
- package/dist/src/scipy/scipy.d.ts +2205 -0
- package/dist/src/scipy/scipy.d.ts.map +1 -0
- package/dist/src/scipy/scipy.js +884 -0
- package/dist/src/scipy/scipy.js.map +1 -0
- package/dist/src/shap/shap.d.ts +2988 -0
- package/dist/src/shap/shap.d.ts.map +1 -0
- package/dist/src/shap/shap.js +500 -0
- package/dist/src/shap/shap.js.map +1 -0
- package/dist/{simanneal → src/simanneal}/simanneal.d.ts +257 -160
- package/dist/src/simanneal/simanneal.d.ts.map +1 -0
- package/dist/{simanneal → src/simanneal}/simanneal.js +105 -8
- package/dist/src/simanneal/simanneal.js.map +1 -0
- package/dist/src/simulation/simulation.d.ts +431 -0
- package/dist/src/simulation/simulation.d.ts.map +1 -0
- package/dist/src/simulation/simulation.js +306 -0
- package/dist/src/simulation/simulation.js.map +1 -0
- package/dist/src/sklearn/sklearn.d.ts +6362 -0
- package/dist/src/sklearn/sklearn.d.ts.map +1 -0
- package/dist/src/sklearn/sklearn.js +1508 -0
- package/dist/src/sklearn/sklearn.js.map +1 -0
- package/dist/src/torch/torch.d.ts +1205 -0
- package/dist/src/torch/torch.d.ts.map +1 -0
- package/dist/{torch → src/torch}/torch.js +109 -18
- package/dist/src/torch/torch.js.map +1 -0
- package/dist/src/types.d.ts +43 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +44 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/xgboost/xgboost.d.ts +1424 -0
- package/dist/src/xgboost/xgboost.d.ts.map +1 -0
- package/dist/src/xgboost/xgboost.js +432 -0
- package/dist/src/xgboost/xgboost.js.map +1 -0
- package/package.json +12 -12
- package/dist/gp/gp.d.ts.map +0 -1
- package/dist/gp/gp.js.map +0 -1
- package/dist/index.d.ts +0 -27
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -41
- package/dist/index.js.map +0 -1
- package/dist/lightgbm/lightgbm.d.ts +0 -494
- package/dist/lightgbm/lightgbm.d.ts.map +0 -1
- package/dist/lightgbm/lightgbm.js.map +0 -1
- package/dist/mads/mads.d.ts.map +0 -1
- package/dist/mads/mads.js.map +0 -1
- package/dist/ngboost/ngboost.d.ts.map +0 -1
- package/dist/ngboost/ngboost.js.map +0 -1
- package/dist/optuna/optuna.d.ts.map +0 -1
- package/dist/optuna/optuna.js.map +0 -1
- package/dist/scipy/scipy.d.ts +0 -1260
- package/dist/scipy/scipy.d.ts.map +0 -1
- package/dist/scipy/scipy.js +0 -413
- package/dist/scipy/scipy.js.map +0 -1
- package/dist/shap/shap.d.ts +0 -657
- package/dist/shap/shap.d.ts.map +0 -1
- package/dist/shap/shap.js +0 -241
- package/dist/shap/shap.js.map +0 -1
- package/dist/simanneal/simanneal.d.ts.map +0 -1
- package/dist/simanneal/simanneal.js.map +0 -1
- package/dist/sklearn/sklearn.d.ts +0 -2691
- package/dist/sklearn/sklearn.d.ts.map +0 -1
- package/dist/sklearn/sklearn.js +0 -524
- package/dist/sklearn/sklearn.js.map +0 -1
- package/dist/torch/torch.d.ts +0 -1081
- package/dist/torch/torch.d.ts.map +0 -1
- package/dist/torch/torch.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types.d.ts +0 -80
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -81
- package/dist/types.js.map +0 -1
- package/dist/xgboost/xgboost.d.ts +0 -504
- package/dist/xgboost/xgboost.d.ts.map +0 -1
- package/dist/xgboost/xgboost.js +0 -177
- package/dist/xgboost/xgboost.js.map +0 -1
|
@@ -0,0 +1,2422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Google OR-Tools optimization platform functions.
|
|
7
|
+
*
|
|
8
|
+
* Provides constraint programming (CP-SAT), vehicle routing, linear programming,
|
|
9
|
+
* and graph algorithms using Google OR-Tools.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
import { StructType, VariantType, OptionType, ArrayType, DictType, IntegerType, BooleanType, FloatType, NullType, StringType } from "@elaraai/east";
|
|
14
|
+
/**
|
|
15
|
+
* Solver status — shared across all OR-Tools solvers.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GoogleOrStatusType: VariantType<{
|
|
18
|
+
readonly optimal: NullType;
|
|
19
|
+
readonly feasible: NullType;
|
|
20
|
+
readonly infeasible: NullType;
|
|
21
|
+
readonly not_solved: NullType;
|
|
22
|
+
readonly model_invalid: NullType;
|
|
23
|
+
}>;
|
|
24
|
+
/** Integer variable definition. */
|
|
25
|
+
export declare const CpSatIntVarType: StructType<{
|
|
26
|
+
readonly name: StringType;
|
|
27
|
+
readonly lower_bound: IntegerType;
|
|
28
|
+
readonly upper_bound: IntegerType;
|
|
29
|
+
}>;
|
|
30
|
+
/** Boolean variable definition. */
|
|
31
|
+
export declare const CpSatBoolVarType: StructType<{
|
|
32
|
+
readonly name: StringType;
|
|
33
|
+
}>;
|
|
34
|
+
/** Interval variable definition. */
|
|
35
|
+
export declare const CpSatIntervalVarType: StructType<{
|
|
36
|
+
readonly name: StringType;
|
|
37
|
+
readonly start: StringType;
|
|
38
|
+
readonly size: StringType;
|
|
39
|
+
readonly end: StringType;
|
|
40
|
+
readonly is_present: OptionType<StringType>;
|
|
41
|
+
}>;
|
|
42
|
+
/** A term in a linear expression: coeff * var. */
|
|
43
|
+
export declare const CpSatLinearTermType: StructType<{
|
|
44
|
+
readonly var: StringType;
|
|
45
|
+
readonly coeff: IntegerType;
|
|
46
|
+
}>;
|
|
47
|
+
/** A linear expression: sum(coeff_i * var_i) + constant. */
|
|
48
|
+
export declare const CpSatLinearExprType: StructType<{
|
|
49
|
+
readonly terms: ArrayType<StructType<{
|
|
50
|
+
readonly var: StringType;
|
|
51
|
+
readonly coeff: IntegerType;
|
|
52
|
+
}>>;
|
|
53
|
+
readonly constant: IntegerType;
|
|
54
|
+
}>;
|
|
55
|
+
/** A boolean literal (possibly negated). */
|
|
56
|
+
export declare const CpSatLiteralType: StructType<{
|
|
57
|
+
readonly var: StringType;
|
|
58
|
+
readonly negated: BooleanType;
|
|
59
|
+
}>;
|
|
60
|
+
/** Comparison operator for linear constraints. */
|
|
61
|
+
export declare const CpSatComparisonType: VariantType<{
|
|
62
|
+
readonly equal: NullType;
|
|
63
|
+
readonly not_equal: NullType;
|
|
64
|
+
readonly less_equal: NullType;
|
|
65
|
+
readonly greater_equal: NullType;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* CP-SAT constraint variant.
|
|
69
|
+
*
|
|
70
|
+
* Supports: linear, boolean logic, cardinality, combinatorial, scheduling, sequencing.
|
|
71
|
+
*/
|
|
72
|
+
export declare const CpSatConstraintType: VariantType<{
|
|
73
|
+
readonly linear: StructType<{
|
|
74
|
+
readonly expr: StructType<{
|
|
75
|
+
readonly terms: ArrayType<StructType<{
|
|
76
|
+
readonly var: StringType;
|
|
77
|
+
readonly coeff: IntegerType;
|
|
78
|
+
}>>;
|
|
79
|
+
readonly constant: IntegerType;
|
|
80
|
+
}>;
|
|
81
|
+
readonly op: VariantType<{
|
|
82
|
+
readonly equal: NullType;
|
|
83
|
+
readonly not_equal: NullType;
|
|
84
|
+
readonly less_equal: NullType;
|
|
85
|
+
readonly greater_equal: NullType;
|
|
86
|
+
}>;
|
|
87
|
+
readonly rhs: IntegerType;
|
|
88
|
+
}>;
|
|
89
|
+
readonly bool_or: StructType<{
|
|
90
|
+
readonly literals: ArrayType<StructType<{
|
|
91
|
+
readonly var: StringType;
|
|
92
|
+
readonly negated: BooleanType;
|
|
93
|
+
}>>;
|
|
94
|
+
}>;
|
|
95
|
+
readonly bool_and: StructType<{
|
|
96
|
+
readonly literals: ArrayType<StructType<{
|
|
97
|
+
readonly var: StringType;
|
|
98
|
+
readonly negated: BooleanType;
|
|
99
|
+
}>>;
|
|
100
|
+
}>;
|
|
101
|
+
readonly implication: StructType<{
|
|
102
|
+
readonly if_literal: StructType<{
|
|
103
|
+
readonly var: StringType;
|
|
104
|
+
readonly negated: BooleanType;
|
|
105
|
+
}>;
|
|
106
|
+
readonly then_literal: StructType<{
|
|
107
|
+
readonly var: StringType;
|
|
108
|
+
readonly negated: BooleanType;
|
|
109
|
+
}>;
|
|
110
|
+
}>;
|
|
111
|
+
readonly exactly_k: StructType<{
|
|
112
|
+
readonly vars: ArrayType<StringType>;
|
|
113
|
+
readonly k: IntegerType;
|
|
114
|
+
}>;
|
|
115
|
+
readonly at_most_k: StructType<{
|
|
116
|
+
readonly vars: ArrayType<StringType>;
|
|
117
|
+
readonly k: IntegerType;
|
|
118
|
+
}>;
|
|
119
|
+
readonly at_least_k: StructType<{
|
|
120
|
+
readonly vars: ArrayType<StringType>;
|
|
121
|
+
readonly k: IntegerType;
|
|
122
|
+
}>;
|
|
123
|
+
readonly all_different: StructType<{
|
|
124
|
+
readonly vars: ArrayType<StringType>;
|
|
125
|
+
}>;
|
|
126
|
+
readonly element: StructType<{
|
|
127
|
+
readonly index_var: StringType;
|
|
128
|
+
readonly values: ArrayType<IntegerType>;
|
|
129
|
+
readonly target_var: StringType;
|
|
130
|
+
}>;
|
|
131
|
+
readonly no_overlap: StructType<{
|
|
132
|
+
readonly intervals: ArrayType<StringType>;
|
|
133
|
+
}>;
|
|
134
|
+
readonly cumulative: StructType<{
|
|
135
|
+
readonly intervals: ArrayType<StringType>;
|
|
136
|
+
readonly demands: ArrayType<IntegerType>;
|
|
137
|
+
readonly capacity: IntegerType;
|
|
138
|
+
}>;
|
|
139
|
+
readonly circuit: StructType<{
|
|
140
|
+
readonly arcs: ArrayType<StructType<{
|
|
141
|
+
readonly tail: IntegerType;
|
|
142
|
+
readonly head: IntegerType;
|
|
143
|
+
readonly literal: StringType;
|
|
144
|
+
}>>;
|
|
145
|
+
}>;
|
|
146
|
+
}>;
|
|
147
|
+
/** CP-SAT objective: minimize or maximize a linear expression. */
|
|
148
|
+
export declare const CpSatObjectiveType: VariantType<{
|
|
149
|
+
readonly minimize: StructType<{
|
|
150
|
+
readonly terms: ArrayType<StructType<{
|
|
151
|
+
readonly var: StringType;
|
|
152
|
+
readonly coeff: IntegerType;
|
|
153
|
+
}>>;
|
|
154
|
+
readonly constant: IntegerType;
|
|
155
|
+
}>;
|
|
156
|
+
readonly maximize: StructType<{
|
|
157
|
+
readonly terms: ArrayType<StructType<{
|
|
158
|
+
readonly var: StringType;
|
|
159
|
+
readonly coeff: IntegerType;
|
|
160
|
+
}>>;
|
|
161
|
+
readonly constant: IntegerType;
|
|
162
|
+
}>;
|
|
163
|
+
}>;
|
|
164
|
+
/** Declarative CP-SAT model. */
|
|
165
|
+
export declare const CpSatModelType: StructType<{
|
|
166
|
+
readonly int_vars: ArrayType<StructType<{
|
|
167
|
+
readonly name: StringType;
|
|
168
|
+
readonly lower_bound: IntegerType;
|
|
169
|
+
readonly upper_bound: IntegerType;
|
|
170
|
+
}>>;
|
|
171
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
172
|
+
readonly name: StringType;
|
|
173
|
+
}>>;
|
|
174
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
175
|
+
readonly name: StringType;
|
|
176
|
+
readonly start: StringType;
|
|
177
|
+
readonly size: StringType;
|
|
178
|
+
readonly end: StringType;
|
|
179
|
+
readonly is_present: OptionType<StringType>;
|
|
180
|
+
}>>;
|
|
181
|
+
readonly constraints: ArrayType<VariantType<{
|
|
182
|
+
readonly linear: StructType<{
|
|
183
|
+
readonly expr: StructType<{
|
|
184
|
+
readonly terms: ArrayType<StructType<{
|
|
185
|
+
readonly var: StringType;
|
|
186
|
+
readonly coeff: IntegerType;
|
|
187
|
+
}>>;
|
|
188
|
+
readonly constant: IntegerType;
|
|
189
|
+
}>;
|
|
190
|
+
readonly op: VariantType<{
|
|
191
|
+
readonly equal: NullType;
|
|
192
|
+
readonly not_equal: NullType;
|
|
193
|
+
readonly less_equal: NullType;
|
|
194
|
+
readonly greater_equal: NullType;
|
|
195
|
+
}>;
|
|
196
|
+
readonly rhs: IntegerType;
|
|
197
|
+
}>;
|
|
198
|
+
readonly bool_or: StructType<{
|
|
199
|
+
readonly literals: ArrayType<StructType<{
|
|
200
|
+
readonly var: StringType;
|
|
201
|
+
readonly negated: BooleanType;
|
|
202
|
+
}>>;
|
|
203
|
+
}>;
|
|
204
|
+
readonly bool_and: StructType<{
|
|
205
|
+
readonly literals: ArrayType<StructType<{
|
|
206
|
+
readonly var: StringType;
|
|
207
|
+
readonly negated: BooleanType;
|
|
208
|
+
}>>;
|
|
209
|
+
}>;
|
|
210
|
+
readonly implication: StructType<{
|
|
211
|
+
readonly if_literal: StructType<{
|
|
212
|
+
readonly var: StringType;
|
|
213
|
+
readonly negated: BooleanType;
|
|
214
|
+
}>;
|
|
215
|
+
readonly then_literal: StructType<{
|
|
216
|
+
readonly var: StringType;
|
|
217
|
+
readonly negated: BooleanType;
|
|
218
|
+
}>;
|
|
219
|
+
}>;
|
|
220
|
+
readonly exactly_k: StructType<{
|
|
221
|
+
readonly vars: ArrayType<StringType>;
|
|
222
|
+
readonly k: IntegerType;
|
|
223
|
+
}>;
|
|
224
|
+
readonly at_most_k: StructType<{
|
|
225
|
+
readonly vars: ArrayType<StringType>;
|
|
226
|
+
readonly k: IntegerType;
|
|
227
|
+
}>;
|
|
228
|
+
readonly at_least_k: StructType<{
|
|
229
|
+
readonly vars: ArrayType<StringType>;
|
|
230
|
+
readonly k: IntegerType;
|
|
231
|
+
}>;
|
|
232
|
+
readonly all_different: StructType<{
|
|
233
|
+
readonly vars: ArrayType<StringType>;
|
|
234
|
+
}>;
|
|
235
|
+
readonly element: StructType<{
|
|
236
|
+
readonly index_var: StringType;
|
|
237
|
+
readonly values: ArrayType<IntegerType>;
|
|
238
|
+
readonly target_var: StringType;
|
|
239
|
+
}>;
|
|
240
|
+
readonly no_overlap: StructType<{
|
|
241
|
+
readonly intervals: ArrayType<StringType>;
|
|
242
|
+
}>;
|
|
243
|
+
readonly cumulative: StructType<{
|
|
244
|
+
readonly intervals: ArrayType<StringType>;
|
|
245
|
+
readonly demands: ArrayType<IntegerType>;
|
|
246
|
+
readonly capacity: IntegerType;
|
|
247
|
+
}>;
|
|
248
|
+
readonly circuit: StructType<{
|
|
249
|
+
readonly arcs: ArrayType<StructType<{
|
|
250
|
+
readonly tail: IntegerType;
|
|
251
|
+
readonly head: IntegerType;
|
|
252
|
+
readonly literal: StringType;
|
|
253
|
+
}>>;
|
|
254
|
+
}>;
|
|
255
|
+
}>>;
|
|
256
|
+
readonly objective: OptionType<VariantType<{
|
|
257
|
+
readonly minimize: StructType<{
|
|
258
|
+
readonly terms: ArrayType<StructType<{
|
|
259
|
+
readonly var: StringType;
|
|
260
|
+
readonly coeff: IntegerType;
|
|
261
|
+
}>>;
|
|
262
|
+
readonly constant: IntegerType;
|
|
263
|
+
}>;
|
|
264
|
+
readonly maximize: StructType<{
|
|
265
|
+
readonly terms: ArrayType<StructType<{
|
|
266
|
+
readonly var: StringType;
|
|
267
|
+
readonly coeff: IntegerType;
|
|
268
|
+
}>>;
|
|
269
|
+
readonly constant: IntegerType;
|
|
270
|
+
}>;
|
|
271
|
+
}>>;
|
|
272
|
+
}>;
|
|
273
|
+
/** CP-SAT solver configuration. */
|
|
274
|
+
export declare const CpSatConfigType: StructType<{
|
|
275
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
276
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
277
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
278
|
+
readonly seed: OptionType<IntegerType>;
|
|
279
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
280
|
+
}>;
|
|
281
|
+
/** CP-SAT solution result. */
|
|
282
|
+
export declare const CpSatResultType: StructType<{
|
|
283
|
+
readonly status: VariantType<{
|
|
284
|
+
readonly optimal: NullType;
|
|
285
|
+
readonly feasible: NullType;
|
|
286
|
+
readonly infeasible: NullType;
|
|
287
|
+
readonly not_solved: NullType;
|
|
288
|
+
readonly model_invalid: NullType;
|
|
289
|
+
}>;
|
|
290
|
+
readonly objective_value: OptionType<FloatType>;
|
|
291
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
292
|
+
readonly wall_time: FloatType;
|
|
293
|
+
}>;
|
|
294
|
+
/** First solution strategy for routing. */
|
|
295
|
+
export declare const RoutingFirstSolutionType: VariantType<{
|
|
296
|
+
readonly path_cheapest_arc: NullType;
|
|
297
|
+
readonly savings: NullType;
|
|
298
|
+
readonly christofides: NullType;
|
|
299
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
300
|
+
readonly local_cheapest_insertion: NullType;
|
|
301
|
+
readonly first_unbound_min_value: NullType;
|
|
302
|
+
}>;
|
|
303
|
+
/** Local search metaheuristic for routing. */
|
|
304
|
+
export declare const RoutingMetaheuristicType: VariantType<{
|
|
305
|
+
readonly greedy_descent: NullType;
|
|
306
|
+
readonly guided_local_search: NullType;
|
|
307
|
+
readonly simulated_annealing: NullType;
|
|
308
|
+
readonly tabu_search: NullType;
|
|
309
|
+
}>;
|
|
310
|
+
/** Time window constraint for a node. */
|
|
311
|
+
export declare const RoutingTimeWindowType: StructType<{
|
|
312
|
+
readonly start: IntegerType;
|
|
313
|
+
readonly end: IntegerType;
|
|
314
|
+
}>;
|
|
315
|
+
/** Pickup-delivery pair. */
|
|
316
|
+
export declare const RoutingPickupDeliveryType: StructType<{
|
|
317
|
+
readonly pickup: IntegerType;
|
|
318
|
+
readonly delivery: IntegerType;
|
|
319
|
+
}>;
|
|
320
|
+
/** Vehicle routing model. */
|
|
321
|
+
export declare const RoutingModelType: StructType<{
|
|
322
|
+
readonly distance_matrix: ArrayType<ArrayType<IntegerType>>;
|
|
323
|
+
readonly num_vehicles: IntegerType;
|
|
324
|
+
readonly depot: IntegerType;
|
|
325
|
+
readonly demands: OptionType<ArrayType<IntegerType>>;
|
|
326
|
+
readonly vehicle_capacities: OptionType<ArrayType<IntegerType>>;
|
|
327
|
+
readonly time_matrix: OptionType<ArrayType<ArrayType<IntegerType>>>;
|
|
328
|
+
readonly time_windows: OptionType<ArrayType<StructType<{
|
|
329
|
+
readonly start: IntegerType;
|
|
330
|
+
readonly end: IntegerType;
|
|
331
|
+
}>>>;
|
|
332
|
+
readonly pickup_deliveries: OptionType<ArrayType<StructType<{
|
|
333
|
+
readonly pickup: IntegerType;
|
|
334
|
+
readonly delivery: IntegerType;
|
|
335
|
+
}>>>;
|
|
336
|
+
}>;
|
|
337
|
+
/** Routing solver configuration. */
|
|
338
|
+
export declare const RoutingConfigType: StructType<{
|
|
339
|
+
readonly first_solution: OptionType<VariantType<{
|
|
340
|
+
readonly path_cheapest_arc: NullType;
|
|
341
|
+
readonly savings: NullType;
|
|
342
|
+
readonly christofides: NullType;
|
|
343
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
344
|
+
readonly local_cheapest_insertion: NullType;
|
|
345
|
+
readonly first_unbound_min_value: NullType;
|
|
346
|
+
}>>;
|
|
347
|
+
readonly metaheuristic: OptionType<VariantType<{
|
|
348
|
+
readonly greedy_descent: NullType;
|
|
349
|
+
readonly guided_local_search: NullType;
|
|
350
|
+
readonly simulated_annealing: NullType;
|
|
351
|
+
readonly tabu_search: NullType;
|
|
352
|
+
}>>;
|
|
353
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
354
|
+
}>;
|
|
355
|
+
/** A single vehicle route in the solution. */
|
|
356
|
+
export declare const RoutingRouteType: StructType<{
|
|
357
|
+
readonly vehicle: IntegerType;
|
|
358
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
359
|
+
readonly distance: IntegerType;
|
|
360
|
+
}>;
|
|
361
|
+
/** Vehicle routing result. */
|
|
362
|
+
export declare const RoutingResultType: StructType<{
|
|
363
|
+
readonly status: VariantType<{
|
|
364
|
+
readonly optimal: NullType;
|
|
365
|
+
readonly feasible: NullType;
|
|
366
|
+
readonly infeasible: NullType;
|
|
367
|
+
readonly not_solved: NullType;
|
|
368
|
+
readonly model_invalid: NullType;
|
|
369
|
+
}>;
|
|
370
|
+
readonly total_distance: IntegerType;
|
|
371
|
+
readonly routes: ArrayType<StructType<{
|
|
372
|
+
readonly vehicle: IntegerType;
|
|
373
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
374
|
+
readonly distance: IntegerType;
|
|
375
|
+
}>>;
|
|
376
|
+
readonly wall_time: FloatType;
|
|
377
|
+
}>;
|
|
378
|
+
/** LP/MIP variable definition. */
|
|
379
|
+
export declare const LinearVarType: StructType<{
|
|
380
|
+
readonly name: StringType;
|
|
381
|
+
readonly lower_bound: FloatType;
|
|
382
|
+
readonly upper_bound: FloatType;
|
|
383
|
+
readonly is_integer: BooleanType;
|
|
384
|
+
}>;
|
|
385
|
+
/** A term in a linear expression: coeff * var. */
|
|
386
|
+
export declare const LinearTermType: StructType<{
|
|
387
|
+
readonly var: StringType;
|
|
388
|
+
readonly coeff: FloatType;
|
|
389
|
+
}>;
|
|
390
|
+
/** Linear constraint: lower_bound <= sum(terms) <= upper_bound. */
|
|
391
|
+
export declare const LinearConstraintDefType: StructType<{
|
|
392
|
+
readonly terms: ArrayType<StructType<{
|
|
393
|
+
readonly var: StringType;
|
|
394
|
+
readonly coeff: FloatType;
|
|
395
|
+
}>>;
|
|
396
|
+
readonly lower_bound: FloatType;
|
|
397
|
+
readonly upper_bound: FloatType;
|
|
398
|
+
}>;
|
|
399
|
+
/** Linear objective function. */
|
|
400
|
+
export declare const LinearObjectiveType: StructType<{
|
|
401
|
+
readonly terms: ArrayType<StructType<{
|
|
402
|
+
readonly var: StringType;
|
|
403
|
+
readonly coeff: FloatType;
|
|
404
|
+
}>>;
|
|
405
|
+
readonly maximize: BooleanType;
|
|
406
|
+
}>;
|
|
407
|
+
/** Linear programming model. */
|
|
408
|
+
export declare const LinearModelType: StructType<{
|
|
409
|
+
readonly variables: ArrayType<StructType<{
|
|
410
|
+
readonly name: StringType;
|
|
411
|
+
readonly lower_bound: FloatType;
|
|
412
|
+
readonly upper_bound: FloatType;
|
|
413
|
+
readonly is_integer: BooleanType;
|
|
414
|
+
}>>;
|
|
415
|
+
readonly constraints: ArrayType<StructType<{
|
|
416
|
+
readonly terms: ArrayType<StructType<{
|
|
417
|
+
readonly var: StringType;
|
|
418
|
+
readonly coeff: FloatType;
|
|
419
|
+
}>>;
|
|
420
|
+
readonly lower_bound: FloatType;
|
|
421
|
+
readonly upper_bound: FloatType;
|
|
422
|
+
}>>;
|
|
423
|
+
readonly objective: StructType<{
|
|
424
|
+
readonly terms: ArrayType<StructType<{
|
|
425
|
+
readonly var: StringType;
|
|
426
|
+
readonly coeff: FloatType;
|
|
427
|
+
}>>;
|
|
428
|
+
readonly maximize: BooleanType;
|
|
429
|
+
}>;
|
|
430
|
+
}>;
|
|
431
|
+
/** LP solver backend. */
|
|
432
|
+
export declare const LinearSolverType: VariantType<{
|
|
433
|
+
readonly glop: NullType;
|
|
434
|
+
readonly scip: NullType;
|
|
435
|
+
readonly highs: NullType;
|
|
436
|
+
}>;
|
|
437
|
+
/** LP solver configuration. */
|
|
438
|
+
export declare const LinearConfigType: StructType<{
|
|
439
|
+
readonly solver: OptionType<VariantType<{
|
|
440
|
+
readonly glop: NullType;
|
|
441
|
+
readonly scip: NullType;
|
|
442
|
+
readonly highs: NullType;
|
|
443
|
+
}>>;
|
|
444
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
445
|
+
}>;
|
|
446
|
+
/** LP/MIP result. */
|
|
447
|
+
export declare const LinearResultType: StructType<{
|
|
448
|
+
readonly status: VariantType<{
|
|
449
|
+
readonly optimal: NullType;
|
|
450
|
+
readonly feasible: NullType;
|
|
451
|
+
readonly infeasible: NullType;
|
|
452
|
+
readonly not_solved: NullType;
|
|
453
|
+
readonly model_invalid: NullType;
|
|
454
|
+
}>;
|
|
455
|
+
readonly objective_value: OptionType<FloatType>;
|
|
456
|
+
readonly assignments: DictType<StringType, FloatType>;
|
|
457
|
+
readonly wall_time: FloatType;
|
|
458
|
+
}>;
|
|
459
|
+
/** Min-cost flow network input. */
|
|
460
|
+
export declare const MinCostFlowInputType: StructType<{
|
|
461
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
462
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
463
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
464
|
+
readonly unit_costs: ArrayType<IntegerType>;
|
|
465
|
+
readonly supplies: ArrayType<IntegerType>;
|
|
466
|
+
}>;
|
|
467
|
+
/** Min-cost flow result. */
|
|
468
|
+
export declare const MinCostFlowResultType: StructType<{
|
|
469
|
+
readonly status: VariantType<{
|
|
470
|
+
readonly optimal: NullType;
|
|
471
|
+
readonly feasible: NullType;
|
|
472
|
+
readonly infeasible: NullType;
|
|
473
|
+
readonly not_solved: NullType;
|
|
474
|
+
readonly model_invalid: NullType;
|
|
475
|
+
}>;
|
|
476
|
+
readonly total_cost: IntegerType;
|
|
477
|
+
readonly flows: ArrayType<IntegerType>;
|
|
478
|
+
readonly wall_time: FloatType;
|
|
479
|
+
}>;
|
|
480
|
+
/** Max-flow network input. */
|
|
481
|
+
export declare const MaxFlowInputType: StructType<{
|
|
482
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
483
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
484
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
485
|
+
readonly source: IntegerType;
|
|
486
|
+
readonly sink: IntegerType;
|
|
487
|
+
}>;
|
|
488
|
+
/** Max-flow result. */
|
|
489
|
+
export declare const MaxFlowResultType: StructType<{
|
|
490
|
+
readonly status: VariantType<{
|
|
491
|
+
readonly optimal: NullType;
|
|
492
|
+
readonly feasible: NullType;
|
|
493
|
+
readonly infeasible: NullType;
|
|
494
|
+
readonly not_solved: NullType;
|
|
495
|
+
readonly model_invalid: NullType;
|
|
496
|
+
}>;
|
|
497
|
+
readonly total_flow: IntegerType;
|
|
498
|
+
readonly flows: ArrayType<IntegerType>;
|
|
499
|
+
readonly wall_time: FloatType;
|
|
500
|
+
}>;
|
|
501
|
+
/** Linear sum assignment cost matrix. */
|
|
502
|
+
export declare const AssignmentInputType: StructType<{
|
|
503
|
+
readonly costs: ArrayType<ArrayType<IntegerType>>;
|
|
504
|
+
}>;
|
|
505
|
+
/** A single worker-task assignment. */
|
|
506
|
+
export declare const AssignmentMatchType: StructType<{
|
|
507
|
+
readonly worker: IntegerType;
|
|
508
|
+
readonly task: IntegerType;
|
|
509
|
+
readonly cost: IntegerType;
|
|
510
|
+
}>;
|
|
511
|
+
/** Assignment result. */
|
|
512
|
+
export declare const AssignmentResultType: StructType<{
|
|
513
|
+
readonly status: VariantType<{
|
|
514
|
+
readonly optimal: NullType;
|
|
515
|
+
readonly feasible: NullType;
|
|
516
|
+
readonly infeasible: NullType;
|
|
517
|
+
readonly not_solved: NullType;
|
|
518
|
+
readonly model_invalid: NullType;
|
|
519
|
+
}>;
|
|
520
|
+
readonly total_cost: IntegerType;
|
|
521
|
+
readonly assignments: ArrayType<StructType<{
|
|
522
|
+
readonly worker: IntegerType;
|
|
523
|
+
readonly task: IntegerType;
|
|
524
|
+
readonly cost: IntegerType;
|
|
525
|
+
}>>;
|
|
526
|
+
readonly wall_time: FloatType;
|
|
527
|
+
}>;
|
|
528
|
+
/** Solve a CP-SAT model and return the best solution. */
|
|
529
|
+
export declare const google_or_cpsat_solve: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
530
|
+
readonly int_vars: ArrayType<StructType<{
|
|
531
|
+
readonly name: StringType;
|
|
532
|
+
readonly lower_bound: IntegerType;
|
|
533
|
+
readonly upper_bound: IntegerType;
|
|
534
|
+
}>>;
|
|
535
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
536
|
+
readonly name: StringType;
|
|
537
|
+
}>>;
|
|
538
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
539
|
+
readonly name: StringType;
|
|
540
|
+
readonly start: StringType;
|
|
541
|
+
readonly size: StringType;
|
|
542
|
+
readonly end: StringType;
|
|
543
|
+
readonly is_present: OptionType<StringType>;
|
|
544
|
+
}>>;
|
|
545
|
+
readonly constraints: ArrayType<VariantType<{
|
|
546
|
+
readonly linear: StructType<{
|
|
547
|
+
readonly expr: StructType<{
|
|
548
|
+
readonly terms: ArrayType<StructType<{
|
|
549
|
+
readonly var: StringType;
|
|
550
|
+
readonly coeff: IntegerType;
|
|
551
|
+
}>>;
|
|
552
|
+
readonly constant: IntegerType;
|
|
553
|
+
}>;
|
|
554
|
+
readonly op: VariantType<{
|
|
555
|
+
readonly equal: NullType;
|
|
556
|
+
readonly not_equal: NullType;
|
|
557
|
+
readonly less_equal: NullType;
|
|
558
|
+
readonly greater_equal: NullType;
|
|
559
|
+
}>;
|
|
560
|
+
readonly rhs: IntegerType;
|
|
561
|
+
}>;
|
|
562
|
+
readonly bool_or: StructType<{
|
|
563
|
+
readonly literals: ArrayType<StructType<{
|
|
564
|
+
readonly var: StringType;
|
|
565
|
+
readonly negated: BooleanType;
|
|
566
|
+
}>>;
|
|
567
|
+
}>;
|
|
568
|
+
readonly bool_and: StructType<{
|
|
569
|
+
readonly literals: ArrayType<StructType<{
|
|
570
|
+
readonly var: StringType;
|
|
571
|
+
readonly negated: BooleanType;
|
|
572
|
+
}>>;
|
|
573
|
+
}>;
|
|
574
|
+
readonly implication: StructType<{
|
|
575
|
+
readonly if_literal: StructType<{
|
|
576
|
+
readonly var: StringType;
|
|
577
|
+
readonly negated: BooleanType;
|
|
578
|
+
}>;
|
|
579
|
+
readonly then_literal: StructType<{
|
|
580
|
+
readonly var: StringType;
|
|
581
|
+
readonly negated: BooleanType;
|
|
582
|
+
}>;
|
|
583
|
+
}>;
|
|
584
|
+
readonly exactly_k: StructType<{
|
|
585
|
+
readonly vars: ArrayType<StringType>;
|
|
586
|
+
readonly k: IntegerType;
|
|
587
|
+
}>;
|
|
588
|
+
readonly at_most_k: StructType<{
|
|
589
|
+
readonly vars: ArrayType<StringType>;
|
|
590
|
+
readonly k: IntegerType;
|
|
591
|
+
}>;
|
|
592
|
+
readonly at_least_k: StructType<{
|
|
593
|
+
readonly vars: ArrayType<StringType>;
|
|
594
|
+
readonly k: IntegerType;
|
|
595
|
+
}>;
|
|
596
|
+
readonly all_different: StructType<{
|
|
597
|
+
readonly vars: ArrayType<StringType>;
|
|
598
|
+
}>;
|
|
599
|
+
readonly element: StructType<{
|
|
600
|
+
readonly index_var: StringType;
|
|
601
|
+
readonly values: ArrayType<IntegerType>;
|
|
602
|
+
readonly target_var: StringType;
|
|
603
|
+
}>;
|
|
604
|
+
readonly no_overlap: StructType<{
|
|
605
|
+
readonly intervals: ArrayType<StringType>;
|
|
606
|
+
}>;
|
|
607
|
+
readonly cumulative: StructType<{
|
|
608
|
+
readonly intervals: ArrayType<StringType>;
|
|
609
|
+
readonly demands: ArrayType<IntegerType>;
|
|
610
|
+
readonly capacity: IntegerType;
|
|
611
|
+
}>;
|
|
612
|
+
readonly circuit: StructType<{
|
|
613
|
+
readonly arcs: ArrayType<StructType<{
|
|
614
|
+
readonly tail: IntegerType;
|
|
615
|
+
readonly head: IntegerType;
|
|
616
|
+
readonly literal: StringType;
|
|
617
|
+
}>>;
|
|
618
|
+
}>;
|
|
619
|
+
}>>;
|
|
620
|
+
readonly objective: OptionType<VariantType<{
|
|
621
|
+
readonly minimize: StructType<{
|
|
622
|
+
readonly terms: ArrayType<StructType<{
|
|
623
|
+
readonly var: StringType;
|
|
624
|
+
readonly coeff: IntegerType;
|
|
625
|
+
}>>;
|
|
626
|
+
readonly constant: IntegerType;
|
|
627
|
+
}>;
|
|
628
|
+
readonly maximize: StructType<{
|
|
629
|
+
readonly terms: ArrayType<StructType<{
|
|
630
|
+
readonly var: StringType;
|
|
631
|
+
readonly coeff: IntegerType;
|
|
632
|
+
}>>;
|
|
633
|
+
readonly constant: IntegerType;
|
|
634
|
+
}>;
|
|
635
|
+
}>>;
|
|
636
|
+
}>, StructType<{
|
|
637
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
638
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
639
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
640
|
+
readonly seed: OptionType<IntegerType>;
|
|
641
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
642
|
+
}>], StructType<{
|
|
643
|
+
readonly status: VariantType<{
|
|
644
|
+
readonly optimal: NullType;
|
|
645
|
+
readonly feasible: NullType;
|
|
646
|
+
readonly infeasible: NullType;
|
|
647
|
+
readonly not_solved: NullType;
|
|
648
|
+
readonly model_invalid: NullType;
|
|
649
|
+
}>;
|
|
650
|
+
readonly objective_value: OptionType<FloatType>;
|
|
651
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
652
|
+
readonly wall_time: FloatType;
|
|
653
|
+
}>>;
|
|
654
|
+
/** Solve a CP-SAT model and return all feasible solutions found. */
|
|
655
|
+
export declare const google_or_cpsat_solve_all: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
656
|
+
readonly int_vars: ArrayType<StructType<{
|
|
657
|
+
readonly name: StringType;
|
|
658
|
+
readonly lower_bound: IntegerType;
|
|
659
|
+
readonly upper_bound: IntegerType;
|
|
660
|
+
}>>;
|
|
661
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
662
|
+
readonly name: StringType;
|
|
663
|
+
}>>;
|
|
664
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
665
|
+
readonly name: StringType;
|
|
666
|
+
readonly start: StringType;
|
|
667
|
+
readonly size: StringType;
|
|
668
|
+
readonly end: StringType;
|
|
669
|
+
readonly is_present: OptionType<StringType>;
|
|
670
|
+
}>>;
|
|
671
|
+
readonly constraints: ArrayType<VariantType<{
|
|
672
|
+
readonly linear: StructType<{
|
|
673
|
+
readonly expr: StructType<{
|
|
674
|
+
readonly terms: ArrayType<StructType<{
|
|
675
|
+
readonly var: StringType;
|
|
676
|
+
readonly coeff: IntegerType;
|
|
677
|
+
}>>;
|
|
678
|
+
readonly constant: IntegerType;
|
|
679
|
+
}>;
|
|
680
|
+
readonly op: VariantType<{
|
|
681
|
+
readonly equal: NullType;
|
|
682
|
+
readonly not_equal: NullType;
|
|
683
|
+
readonly less_equal: NullType;
|
|
684
|
+
readonly greater_equal: NullType;
|
|
685
|
+
}>;
|
|
686
|
+
readonly rhs: IntegerType;
|
|
687
|
+
}>;
|
|
688
|
+
readonly bool_or: StructType<{
|
|
689
|
+
readonly literals: ArrayType<StructType<{
|
|
690
|
+
readonly var: StringType;
|
|
691
|
+
readonly negated: BooleanType;
|
|
692
|
+
}>>;
|
|
693
|
+
}>;
|
|
694
|
+
readonly bool_and: StructType<{
|
|
695
|
+
readonly literals: ArrayType<StructType<{
|
|
696
|
+
readonly var: StringType;
|
|
697
|
+
readonly negated: BooleanType;
|
|
698
|
+
}>>;
|
|
699
|
+
}>;
|
|
700
|
+
readonly implication: StructType<{
|
|
701
|
+
readonly if_literal: StructType<{
|
|
702
|
+
readonly var: StringType;
|
|
703
|
+
readonly negated: BooleanType;
|
|
704
|
+
}>;
|
|
705
|
+
readonly then_literal: StructType<{
|
|
706
|
+
readonly var: StringType;
|
|
707
|
+
readonly negated: BooleanType;
|
|
708
|
+
}>;
|
|
709
|
+
}>;
|
|
710
|
+
readonly exactly_k: StructType<{
|
|
711
|
+
readonly vars: ArrayType<StringType>;
|
|
712
|
+
readonly k: IntegerType;
|
|
713
|
+
}>;
|
|
714
|
+
readonly at_most_k: StructType<{
|
|
715
|
+
readonly vars: ArrayType<StringType>;
|
|
716
|
+
readonly k: IntegerType;
|
|
717
|
+
}>;
|
|
718
|
+
readonly at_least_k: StructType<{
|
|
719
|
+
readonly vars: ArrayType<StringType>;
|
|
720
|
+
readonly k: IntegerType;
|
|
721
|
+
}>;
|
|
722
|
+
readonly all_different: StructType<{
|
|
723
|
+
readonly vars: ArrayType<StringType>;
|
|
724
|
+
}>;
|
|
725
|
+
readonly element: StructType<{
|
|
726
|
+
readonly index_var: StringType;
|
|
727
|
+
readonly values: ArrayType<IntegerType>;
|
|
728
|
+
readonly target_var: StringType;
|
|
729
|
+
}>;
|
|
730
|
+
readonly no_overlap: StructType<{
|
|
731
|
+
readonly intervals: ArrayType<StringType>;
|
|
732
|
+
}>;
|
|
733
|
+
readonly cumulative: StructType<{
|
|
734
|
+
readonly intervals: ArrayType<StringType>;
|
|
735
|
+
readonly demands: ArrayType<IntegerType>;
|
|
736
|
+
readonly capacity: IntegerType;
|
|
737
|
+
}>;
|
|
738
|
+
readonly circuit: StructType<{
|
|
739
|
+
readonly arcs: ArrayType<StructType<{
|
|
740
|
+
readonly tail: IntegerType;
|
|
741
|
+
readonly head: IntegerType;
|
|
742
|
+
readonly literal: StringType;
|
|
743
|
+
}>>;
|
|
744
|
+
}>;
|
|
745
|
+
}>>;
|
|
746
|
+
readonly objective: OptionType<VariantType<{
|
|
747
|
+
readonly minimize: StructType<{
|
|
748
|
+
readonly terms: ArrayType<StructType<{
|
|
749
|
+
readonly var: StringType;
|
|
750
|
+
readonly coeff: IntegerType;
|
|
751
|
+
}>>;
|
|
752
|
+
readonly constant: IntegerType;
|
|
753
|
+
}>;
|
|
754
|
+
readonly maximize: StructType<{
|
|
755
|
+
readonly terms: ArrayType<StructType<{
|
|
756
|
+
readonly var: StringType;
|
|
757
|
+
readonly coeff: IntegerType;
|
|
758
|
+
}>>;
|
|
759
|
+
readonly constant: IntegerType;
|
|
760
|
+
}>;
|
|
761
|
+
}>>;
|
|
762
|
+
}>, StructType<{
|
|
763
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
764
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
765
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
766
|
+
readonly seed: OptionType<IntegerType>;
|
|
767
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
768
|
+
}>], ArrayType<StructType<{
|
|
769
|
+
readonly status: VariantType<{
|
|
770
|
+
readonly optimal: NullType;
|
|
771
|
+
readonly feasible: NullType;
|
|
772
|
+
readonly infeasible: NullType;
|
|
773
|
+
readonly not_solved: NullType;
|
|
774
|
+
readonly model_invalid: NullType;
|
|
775
|
+
}>;
|
|
776
|
+
readonly objective_value: OptionType<FloatType>;
|
|
777
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
778
|
+
readonly wall_time: FloatType;
|
|
779
|
+
}>>>;
|
|
780
|
+
/** Solve a vehicle routing problem. */
|
|
781
|
+
export declare const google_or_routing_solve: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
782
|
+
readonly distance_matrix: ArrayType<ArrayType<IntegerType>>;
|
|
783
|
+
readonly num_vehicles: IntegerType;
|
|
784
|
+
readonly depot: IntegerType;
|
|
785
|
+
readonly demands: OptionType<ArrayType<IntegerType>>;
|
|
786
|
+
readonly vehicle_capacities: OptionType<ArrayType<IntegerType>>;
|
|
787
|
+
readonly time_matrix: OptionType<ArrayType<ArrayType<IntegerType>>>;
|
|
788
|
+
readonly time_windows: OptionType<ArrayType<StructType<{
|
|
789
|
+
readonly start: IntegerType;
|
|
790
|
+
readonly end: IntegerType;
|
|
791
|
+
}>>>;
|
|
792
|
+
readonly pickup_deliveries: OptionType<ArrayType<StructType<{
|
|
793
|
+
readonly pickup: IntegerType;
|
|
794
|
+
readonly delivery: IntegerType;
|
|
795
|
+
}>>>;
|
|
796
|
+
}>, StructType<{
|
|
797
|
+
readonly first_solution: OptionType<VariantType<{
|
|
798
|
+
readonly path_cheapest_arc: NullType;
|
|
799
|
+
readonly savings: NullType;
|
|
800
|
+
readonly christofides: NullType;
|
|
801
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
802
|
+
readonly local_cheapest_insertion: NullType;
|
|
803
|
+
readonly first_unbound_min_value: NullType;
|
|
804
|
+
}>>;
|
|
805
|
+
readonly metaheuristic: OptionType<VariantType<{
|
|
806
|
+
readonly greedy_descent: NullType;
|
|
807
|
+
readonly guided_local_search: NullType;
|
|
808
|
+
readonly simulated_annealing: NullType;
|
|
809
|
+
readonly tabu_search: NullType;
|
|
810
|
+
}>>;
|
|
811
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
812
|
+
}>], StructType<{
|
|
813
|
+
readonly status: VariantType<{
|
|
814
|
+
readonly optimal: NullType;
|
|
815
|
+
readonly feasible: NullType;
|
|
816
|
+
readonly infeasible: NullType;
|
|
817
|
+
readonly not_solved: NullType;
|
|
818
|
+
readonly model_invalid: NullType;
|
|
819
|
+
}>;
|
|
820
|
+
readonly total_distance: IntegerType;
|
|
821
|
+
readonly routes: ArrayType<StructType<{
|
|
822
|
+
readonly vehicle: IntegerType;
|
|
823
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
824
|
+
readonly distance: IntegerType;
|
|
825
|
+
}>>;
|
|
826
|
+
readonly wall_time: FloatType;
|
|
827
|
+
}>>;
|
|
828
|
+
/** Solve a linear programming / MIP problem. */
|
|
829
|
+
export declare const google_or_linear_solve: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
830
|
+
readonly variables: ArrayType<StructType<{
|
|
831
|
+
readonly name: StringType;
|
|
832
|
+
readonly lower_bound: FloatType;
|
|
833
|
+
readonly upper_bound: FloatType;
|
|
834
|
+
readonly is_integer: BooleanType;
|
|
835
|
+
}>>;
|
|
836
|
+
readonly constraints: ArrayType<StructType<{
|
|
837
|
+
readonly terms: ArrayType<StructType<{
|
|
838
|
+
readonly var: StringType;
|
|
839
|
+
readonly coeff: FloatType;
|
|
840
|
+
}>>;
|
|
841
|
+
readonly lower_bound: FloatType;
|
|
842
|
+
readonly upper_bound: FloatType;
|
|
843
|
+
}>>;
|
|
844
|
+
readonly objective: StructType<{
|
|
845
|
+
readonly terms: ArrayType<StructType<{
|
|
846
|
+
readonly var: StringType;
|
|
847
|
+
readonly coeff: FloatType;
|
|
848
|
+
}>>;
|
|
849
|
+
readonly maximize: BooleanType;
|
|
850
|
+
}>;
|
|
851
|
+
}>, StructType<{
|
|
852
|
+
readonly solver: OptionType<VariantType<{
|
|
853
|
+
readonly glop: NullType;
|
|
854
|
+
readonly scip: NullType;
|
|
855
|
+
readonly highs: NullType;
|
|
856
|
+
}>>;
|
|
857
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
858
|
+
}>], StructType<{
|
|
859
|
+
readonly status: VariantType<{
|
|
860
|
+
readonly optimal: NullType;
|
|
861
|
+
readonly feasible: NullType;
|
|
862
|
+
readonly infeasible: NullType;
|
|
863
|
+
readonly not_solved: NullType;
|
|
864
|
+
readonly model_invalid: NullType;
|
|
865
|
+
}>;
|
|
866
|
+
readonly objective_value: OptionType<FloatType>;
|
|
867
|
+
readonly assignments: DictType<StringType, FloatType>;
|
|
868
|
+
readonly wall_time: FloatType;
|
|
869
|
+
}>>;
|
|
870
|
+
/** Solve a min-cost flow problem. */
|
|
871
|
+
export declare const google_or_min_cost_flow: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
872
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
873
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
874
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
875
|
+
readonly unit_costs: ArrayType<IntegerType>;
|
|
876
|
+
readonly supplies: ArrayType<IntegerType>;
|
|
877
|
+
}>], StructType<{
|
|
878
|
+
readonly status: VariantType<{
|
|
879
|
+
readonly optimal: NullType;
|
|
880
|
+
readonly feasible: NullType;
|
|
881
|
+
readonly infeasible: NullType;
|
|
882
|
+
readonly not_solved: NullType;
|
|
883
|
+
readonly model_invalid: NullType;
|
|
884
|
+
}>;
|
|
885
|
+
readonly total_cost: IntegerType;
|
|
886
|
+
readonly flows: ArrayType<IntegerType>;
|
|
887
|
+
readonly wall_time: FloatType;
|
|
888
|
+
}>>;
|
|
889
|
+
/** Solve a max-flow problem. */
|
|
890
|
+
export declare const google_or_max_flow: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
891
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
892
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
893
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
894
|
+
readonly source: IntegerType;
|
|
895
|
+
readonly sink: IntegerType;
|
|
896
|
+
}>], StructType<{
|
|
897
|
+
readonly status: VariantType<{
|
|
898
|
+
readonly optimal: NullType;
|
|
899
|
+
readonly feasible: NullType;
|
|
900
|
+
readonly infeasible: NullType;
|
|
901
|
+
readonly not_solved: NullType;
|
|
902
|
+
readonly model_invalid: NullType;
|
|
903
|
+
}>;
|
|
904
|
+
readonly total_flow: IntegerType;
|
|
905
|
+
readonly flows: ArrayType<IntegerType>;
|
|
906
|
+
readonly wall_time: FloatType;
|
|
907
|
+
}>>;
|
|
908
|
+
/** Solve a linear sum assignment problem. */
|
|
909
|
+
export declare const google_or_assignment: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
910
|
+
readonly costs: ArrayType<ArrayType<IntegerType>>;
|
|
911
|
+
}>], StructType<{
|
|
912
|
+
readonly status: VariantType<{
|
|
913
|
+
readonly optimal: NullType;
|
|
914
|
+
readonly feasible: NullType;
|
|
915
|
+
readonly infeasible: NullType;
|
|
916
|
+
readonly not_solved: NullType;
|
|
917
|
+
readonly model_invalid: NullType;
|
|
918
|
+
}>;
|
|
919
|
+
readonly total_cost: IntegerType;
|
|
920
|
+
readonly assignments: ArrayType<StructType<{
|
|
921
|
+
readonly worker: IntegerType;
|
|
922
|
+
readonly task: IntegerType;
|
|
923
|
+
readonly cost: IntegerType;
|
|
924
|
+
}>>;
|
|
925
|
+
readonly wall_time: FloatType;
|
|
926
|
+
}>>;
|
|
927
|
+
/** Type definitions for Google OR-Tools. */
|
|
928
|
+
export declare const GoogleOrTypes: {
|
|
929
|
+
readonly StatusType: VariantType<{
|
|
930
|
+
readonly optimal: NullType;
|
|
931
|
+
readonly feasible: NullType;
|
|
932
|
+
readonly infeasible: NullType;
|
|
933
|
+
readonly not_solved: NullType;
|
|
934
|
+
readonly model_invalid: NullType;
|
|
935
|
+
}>;
|
|
936
|
+
readonly CpSatIntVarType: StructType<{
|
|
937
|
+
readonly name: StringType;
|
|
938
|
+
readonly lower_bound: IntegerType;
|
|
939
|
+
readonly upper_bound: IntegerType;
|
|
940
|
+
}>;
|
|
941
|
+
readonly CpSatBoolVarType: StructType<{
|
|
942
|
+
readonly name: StringType;
|
|
943
|
+
}>;
|
|
944
|
+
readonly CpSatIntervalVarType: StructType<{
|
|
945
|
+
readonly name: StringType;
|
|
946
|
+
readonly start: StringType;
|
|
947
|
+
readonly size: StringType;
|
|
948
|
+
readonly end: StringType;
|
|
949
|
+
readonly is_present: OptionType<StringType>;
|
|
950
|
+
}>;
|
|
951
|
+
readonly CpSatLinearTermType: StructType<{
|
|
952
|
+
readonly var: StringType;
|
|
953
|
+
readonly coeff: IntegerType;
|
|
954
|
+
}>;
|
|
955
|
+
readonly CpSatLinearExprType: StructType<{
|
|
956
|
+
readonly terms: ArrayType<StructType<{
|
|
957
|
+
readonly var: StringType;
|
|
958
|
+
readonly coeff: IntegerType;
|
|
959
|
+
}>>;
|
|
960
|
+
readonly constant: IntegerType;
|
|
961
|
+
}>;
|
|
962
|
+
readonly CpSatLiteralType: StructType<{
|
|
963
|
+
readonly var: StringType;
|
|
964
|
+
readonly negated: BooleanType;
|
|
965
|
+
}>;
|
|
966
|
+
readonly CpSatComparisonType: VariantType<{
|
|
967
|
+
readonly equal: NullType;
|
|
968
|
+
readonly not_equal: NullType;
|
|
969
|
+
readonly less_equal: NullType;
|
|
970
|
+
readonly greater_equal: NullType;
|
|
971
|
+
}>;
|
|
972
|
+
readonly CpSatConstraintType: VariantType<{
|
|
973
|
+
readonly linear: StructType<{
|
|
974
|
+
readonly expr: StructType<{
|
|
975
|
+
readonly terms: ArrayType<StructType<{
|
|
976
|
+
readonly var: StringType;
|
|
977
|
+
readonly coeff: IntegerType;
|
|
978
|
+
}>>;
|
|
979
|
+
readonly constant: IntegerType;
|
|
980
|
+
}>;
|
|
981
|
+
readonly op: VariantType<{
|
|
982
|
+
readonly equal: NullType;
|
|
983
|
+
readonly not_equal: NullType;
|
|
984
|
+
readonly less_equal: NullType;
|
|
985
|
+
readonly greater_equal: NullType;
|
|
986
|
+
}>;
|
|
987
|
+
readonly rhs: IntegerType;
|
|
988
|
+
}>;
|
|
989
|
+
readonly bool_or: StructType<{
|
|
990
|
+
readonly literals: ArrayType<StructType<{
|
|
991
|
+
readonly var: StringType;
|
|
992
|
+
readonly negated: BooleanType;
|
|
993
|
+
}>>;
|
|
994
|
+
}>;
|
|
995
|
+
readonly bool_and: StructType<{
|
|
996
|
+
readonly literals: ArrayType<StructType<{
|
|
997
|
+
readonly var: StringType;
|
|
998
|
+
readonly negated: BooleanType;
|
|
999
|
+
}>>;
|
|
1000
|
+
}>;
|
|
1001
|
+
readonly implication: StructType<{
|
|
1002
|
+
readonly if_literal: StructType<{
|
|
1003
|
+
readonly var: StringType;
|
|
1004
|
+
readonly negated: BooleanType;
|
|
1005
|
+
}>;
|
|
1006
|
+
readonly then_literal: StructType<{
|
|
1007
|
+
readonly var: StringType;
|
|
1008
|
+
readonly negated: BooleanType;
|
|
1009
|
+
}>;
|
|
1010
|
+
}>;
|
|
1011
|
+
readonly exactly_k: StructType<{
|
|
1012
|
+
readonly vars: ArrayType<StringType>;
|
|
1013
|
+
readonly k: IntegerType;
|
|
1014
|
+
}>;
|
|
1015
|
+
readonly at_most_k: StructType<{
|
|
1016
|
+
readonly vars: ArrayType<StringType>;
|
|
1017
|
+
readonly k: IntegerType;
|
|
1018
|
+
}>;
|
|
1019
|
+
readonly at_least_k: StructType<{
|
|
1020
|
+
readonly vars: ArrayType<StringType>;
|
|
1021
|
+
readonly k: IntegerType;
|
|
1022
|
+
}>;
|
|
1023
|
+
readonly all_different: StructType<{
|
|
1024
|
+
readonly vars: ArrayType<StringType>;
|
|
1025
|
+
}>;
|
|
1026
|
+
readonly element: StructType<{
|
|
1027
|
+
readonly index_var: StringType;
|
|
1028
|
+
readonly values: ArrayType<IntegerType>;
|
|
1029
|
+
readonly target_var: StringType;
|
|
1030
|
+
}>;
|
|
1031
|
+
readonly no_overlap: StructType<{
|
|
1032
|
+
readonly intervals: ArrayType<StringType>;
|
|
1033
|
+
}>;
|
|
1034
|
+
readonly cumulative: StructType<{
|
|
1035
|
+
readonly intervals: ArrayType<StringType>;
|
|
1036
|
+
readonly demands: ArrayType<IntegerType>;
|
|
1037
|
+
readonly capacity: IntegerType;
|
|
1038
|
+
}>;
|
|
1039
|
+
readonly circuit: StructType<{
|
|
1040
|
+
readonly arcs: ArrayType<StructType<{
|
|
1041
|
+
readonly tail: IntegerType;
|
|
1042
|
+
readonly head: IntegerType;
|
|
1043
|
+
readonly literal: StringType;
|
|
1044
|
+
}>>;
|
|
1045
|
+
}>;
|
|
1046
|
+
}>;
|
|
1047
|
+
readonly CpSatObjectiveType: VariantType<{
|
|
1048
|
+
readonly minimize: StructType<{
|
|
1049
|
+
readonly terms: ArrayType<StructType<{
|
|
1050
|
+
readonly var: StringType;
|
|
1051
|
+
readonly coeff: IntegerType;
|
|
1052
|
+
}>>;
|
|
1053
|
+
readonly constant: IntegerType;
|
|
1054
|
+
}>;
|
|
1055
|
+
readonly maximize: StructType<{
|
|
1056
|
+
readonly terms: ArrayType<StructType<{
|
|
1057
|
+
readonly var: StringType;
|
|
1058
|
+
readonly coeff: IntegerType;
|
|
1059
|
+
}>>;
|
|
1060
|
+
readonly constant: IntegerType;
|
|
1061
|
+
}>;
|
|
1062
|
+
}>;
|
|
1063
|
+
readonly CpSatModelType: StructType<{
|
|
1064
|
+
readonly int_vars: ArrayType<StructType<{
|
|
1065
|
+
readonly name: StringType;
|
|
1066
|
+
readonly lower_bound: IntegerType;
|
|
1067
|
+
readonly upper_bound: IntegerType;
|
|
1068
|
+
}>>;
|
|
1069
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
1070
|
+
readonly name: StringType;
|
|
1071
|
+
}>>;
|
|
1072
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
1073
|
+
readonly name: StringType;
|
|
1074
|
+
readonly start: StringType;
|
|
1075
|
+
readonly size: StringType;
|
|
1076
|
+
readonly end: StringType;
|
|
1077
|
+
readonly is_present: OptionType<StringType>;
|
|
1078
|
+
}>>;
|
|
1079
|
+
readonly constraints: ArrayType<VariantType<{
|
|
1080
|
+
readonly linear: StructType<{
|
|
1081
|
+
readonly expr: StructType<{
|
|
1082
|
+
readonly terms: ArrayType<StructType<{
|
|
1083
|
+
readonly var: StringType;
|
|
1084
|
+
readonly coeff: IntegerType;
|
|
1085
|
+
}>>;
|
|
1086
|
+
readonly constant: IntegerType;
|
|
1087
|
+
}>;
|
|
1088
|
+
readonly op: VariantType<{
|
|
1089
|
+
readonly equal: NullType;
|
|
1090
|
+
readonly not_equal: NullType;
|
|
1091
|
+
readonly less_equal: NullType;
|
|
1092
|
+
readonly greater_equal: NullType;
|
|
1093
|
+
}>;
|
|
1094
|
+
readonly rhs: IntegerType;
|
|
1095
|
+
}>;
|
|
1096
|
+
readonly bool_or: StructType<{
|
|
1097
|
+
readonly literals: ArrayType<StructType<{
|
|
1098
|
+
readonly var: StringType;
|
|
1099
|
+
readonly negated: BooleanType;
|
|
1100
|
+
}>>;
|
|
1101
|
+
}>;
|
|
1102
|
+
readonly bool_and: StructType<{
|
|
1103
|
+
readonly literals: ArrayType<StructType<{
|
|
1104
|
+
readonly var: StringType;
|
|
1105
|
+
readonly negated: BooleanType;
|
|
1106
|
+
}>>;
|
|
1107
|
+
}>;
|
|
1108
|
+
readonly implication: StructType<{
|
|
1109
|
+
readonly if_literal: StructType<{
|
|
1110
|
+
readonly var: StringType;
|
|
1111
|
+
readonly negated: BooleanType;
|
|
1112
|
+
}>;
|
|
1113
|
+
readonly then_literal: StructType<{
|
|
1114
|
+
readonly var: StringType;
|
|
1115
|
+
readonly negated: BooleanType;
|
|
1116
|
+
}>;
|
|
1117
|
+
}>;
|
|
1118
|
+
readonly exactly_k: StructType<{
|
|
1119
|
+
readonly vars: ArrayType<StringType>;
|
|
1120
|
+
readonly k: IntegerType;
|
|
1121
|
+
}>;
|
|
1122
|
+
readonly at_most_k: StructType<{
|
|
1123
|
+
readonly vars: ArrayType<StringType>;
|
|
1124
|
+
readonly k: IntegerType;
|
|
1125
|
+
}>;
|
|
1126
|
+
readonly at_least_k: StructType<{
|
|
1127
|
+
readonly vars: ArrayType<StringType>;
|
|
1128
|
+
readonly k: IntegerType;
|
|
1129
|
+
}>;
|
|
1130
|
+
readonly all_different: StructType<{
|
|
1131
|
+
readonly vars: ArrayType<StringType>;
|
|
1132
|
+
}>;
|
|
1133
|
+
readonly element: StructType<{
|
|
1134
|
+
readonly index_var: StringType;
|
|
1135
|
+
readonly values: ArrayType<IntegerType>;
|
|
1136
|
+
readonly target_var: StringType;
|
|
1137
|
+
}>;
|
|
1138
|
+
readonly no_overlap: StructType<{
|
|
1139
|
+
readonly intervals: ArrayType<StringType>;
|
|
1140
|
+
}>;
|
|
1141
|
+
readonly cumulative: StructType<{
|
|
1142
|
+
readonly intervals: ArrayType<StringType>;
|
|
1143
|
+
readonly demands: ArrayType<IntegerType>;
|
|
1144
|
+
readonly capacity: IntegerType;
|
|
1145
|
+
}>;
|
|
1146
|
+
readonly circuit: StructType<{
|
|
1147
|
+
readonly arcs: ArrayType<StructType<{
|
|
1148
|
+
readonly tail: IntegerType;
|
|
1149
|
+
readonly head: IntegerType;
|
|
1150
|
+
readonly literal: StringType;
|
|
1151
|
+
}>>;
|
|
1152
|
+
}>;
|
|
1153
|
+
}>>;
|
|
1154
|
+
readonly objective: OptionType<VariantType<{
|
|
1155
|
+
readonly minimize: StructType<{
|
|
1156
|
+
readonly terms: ArrayType<StructType<{
|
|
1157
|
+
readonly var: StringType;
|
|
1158
|
+
readonly coeff: IntegerType;
|
|
1159
|
+
}>>;
|
|
1160
|
+
readonly constant: IntegerType;
|
|
1161
|
+
}>;
|
|
1162
|
+
readonly maximize: StructType<{
|
|
1163
|
+
readonly terms: ArrayType<StructType<{
|
|
1164
|
+
readonly var: StringType;
|
|
1165
|
+
readonly coeff: IntegerType;
|
|
1166
|
+
}>>;
|
|
1167
|
+
readonly constant: IntegerType;
|
|
1168
|
+
}>;
|
|
1169
|
+
}>>;
|
|
1170
|
+
}>;
|
|
1171
|
+
readonly CpSatConfigType: StructType<{
|
|
1172
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1173
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
1174
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
1175
|
+
readonly seed: OptionType<IntegerType>;
|
|
1176
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
1177
|
+
}>;
|
|
1178
|
+
readonly CpSatResultType: StructType<{
|
|
1179
|
+
readonly status: VariantType<{
|
|
1180
|
+
readonly optimal: NullType;
|
|
1181
|
+
readonly feasible: NullType;
|
|
1182
|
+
readonly infeasible: NullType;
|
|
1183
|
+
readonly not_solved: NullType;
|
|
1184
|
+
readonly model_invalid: NullType;
|
|
1185
|
+
}>;
|
|
1186
|
+
readonly objective_value: OptionType<FloatType>;
|
|
1187
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
1188
|
+
readonly wall_time: FloatType;
|
|
1189
|
+
}>;
|
|
1190
|
+
readonly RoutingFirstSolutionType: VariantType<{
|
|
1191
|
+
readonly path_cheapest_arc: NullType;
|
|
1192
|
+
readonly savings: NullType;
|
|
1193
|
+
readonly christofides: NullType;
|
|
1194
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
1195
|
+
readonly local_cheapest_insertion: NullType;
|
|
1196
|
+
readonly first_unbound_min_value: NullType;
|
|
1197
|
+
}>;
|
|
1198
|
+
readonly RoutingMetaheuristicType: VariantType<{
|
|
1199
|
+
readonly greedy_descent: NullType;
|
|
1200
|
+
readonly guided_local_search: NullType;
|
|
1201
|
+
readonly simulated_annealing: NullType;
|
|
1202
|
+
readonly tabu_search: NullType;
|
|
1203
|
+
}>;
|
|
1204
|
+
readonly RoutingTimeWindowType: StructType<{
|
|
1205
|
+
readonly start: IntegerType;
|
|
1206
|
+
readonly end: IntegerType;
|
|
1207
|
+
}>;
|
|
1208
|
+
readonly RoutingPickupDeliveryType: StructType<{
|
|
1209
|
+
readonly pickup: IntegerType;
|
|
1210
|
+
readonly delivery: IntegerType;
|
|
1211
|
+
}>;
|
|
1212
|
+
readonly RoutingModelType: StructType<{
|
|
1213
|
+
readonly distance_matrix: ArrayType<ArrayType<IntegerType>>;
|
|
1214
|
+
readonly num_vehicles: IntegerType;
|
|
1215
|
+
readonly depot: IntegerType;
|
|
1216
|
+
readonly demands: OptionType<ArrayType<IntegerType>>;
|
|
1217
|
+
readonly vehicle_capacities: OptionType<ArrayType<IntegerType>>;
|
|
1218
|
+
readonly time_matrix: OptionType<ArrayType<ArrayType<IntegerType>>>;
|
|
1219
|
+
readonly time_windows: OptionType<ArrayType<StructType<{
|
|
1220
|
+
readonly start: IntegerType;
|
|
1221
|
+
readonly end: IntegerType;
|
|
1222
|
+
}>>>;
|
|
1223
|
+
readonly pickup_deliveries: OptionType<ArrayType<StructType<{
|
|
1224
|
+
readonly pickup: IntegerType;
|
|
1225
|
+
readonly delivery: IntegerType;
|
|
1226
|
+
}>>>;
|
|
1227
|
+
}>;
|
|
1228
|
+
readonly RoutingConfigType: StructType<{
|
|
1229
|
+
readonly first_solution: OptionType<VariantType<{
|
|
1230
|
+
readonly path_cheapest_arc: NullType;
|
|
1231
|
+
readonly savings: NullType;
|
|
1232
|
+
readonly christofides: NullType;
|
|
1233
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
1234
|
+
readonly local_cheapest_insertion: NullType;
|
|
1235
|
+
readonly first_unbound_min_value: NullType;
|
|
1236
|
+
}>>;
|
|
1237
|
+
readonly metaheuristic: OptionType<VariantType<{
|
|
1238
|
+
readonly greedy_descent: NullType;
|
|
1239
|
+
readonly guided_local_search: NullType;
|
|
1240
|
+
readonly simulated_annealing: NullType;
|
|
1241
|
+
readonly tabu_search: NullType;
|
|
1242
|
+
}>>;
|
|
1243
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1244
|
+
}>;
|
|
1245
|
+
readonly RoutingRouteType: StructType<{
|
|
1246
|
+
readonly vehicle: IntegerType;
|
|
1247
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
1248
|
+
readonly distance: IntegerType;
|
|
1249
|
+
}>;
|
|
1250
|
+
readonly RoutingResultType: StructType<{
|
|
1251
|
+
readonly status: VariantType<{
|
|
1252
|
+
readonly optimal: NullType;
|
|
1253
|
+
readonly feasible: NullType;
|
|
1254
|
+
readonly infeasible: NullType;
|
|
1255
|
+
readonly not_solved: NullType;
|
|
1256
|
+
readonly model_invalid: NullType;
|
|
1257
|
+
}>;
|
|
1258
|
+
readonly total_distance: IntegerType;
|
|
1259
|
+
readonly routes: ArrayType<StructType<{
|
|
1260
|
+
readonly vehicle: IntegerType;
|
|
1261
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
1262
|
+
readonly distance: IntegerType;
|
|
1263
|
+
}>>;
|
|
1264
|
+
readonly wall_time: FloatType;
|
|
1265
|
+
}>;
|
|
1266
|
+
readonly LinearVarType: StructType<{
|
|
1267
|
+
readonly name: StringType;
|
|
1268
|
+
readonly lower_bound: FloatType;
|
|
1269
|
+
readonly upper_bound: FloatType;
|
|
1270
|
+
readonly is_integer: BooleanType;
|
|
1271
|
+
}>;
|
|
1272
|
+
readonly LinearTermType: StructType<{
|
|
1273
|
+
readonly var: StringType;
|
|
1274
|
+
readonly coeff: FloatType;
|
|
1275
|
+
}>;
|
|
1276
|
+
readonly LinearConstraintDefType: StructType<{
|
|
1277
|
+
readonly terms: ArrayType<StructType<{
|
|
1278
|
+
readonly var: StringType;
|
|
1279
|
+
readonly coeff: FloatType;
|
|
1280
|
+
}>>;
|
|
1281
|
+
readonly lower_bound: FloatType;
|
|
1282
|
+
readonly upper_bound: FloatType;
|
|
1283
|
+
}>;
|
|
1284
|
+
readonly LinearObjectiveType: StructType<{
|
|
1285
|
+
readonly terms: ArrayType<StructType<{
|
|
1286
|
+
readonly var: StringType;
|
|
1287
|
+
readonly coeff: FloatType;
|
|
1288
|
+
}>>;
|
|
1289
|
+
readonly maximize: BooleanType;
|
|
1290
|
+
}>;
|
|
1291
|
+
readonly LinearModelType: StructType<{
|
|
1292
|
+
readonly variables: ArrayType<StructType<{
|
|
1293
|
+
readonly name: StringType;
|
|
1294
|
+
readonly lower_bound: FloatType;
|
|
1295
|
+
readonly upper_bound: FloatType;
|
|
1296
|
+
readonly is_integer: BooleanType;
|
|
1297
|
+
}>>;
|
|
1298
|
+
readonly constraints: ArrayType<StructType<{
|
|
1299
|
+
readonly terms: ArrayType<StructType<{
|
|
1300
|
+
readonly var: StringType;
|
|
1301
|
+
readonly coeff: FloatType;
|
|
1302
|
+
}>>;
|
|
1303
|
+
readonly lower_bound: FloatType;
|
|
1304
|
+
readonly upper_bound: FloatType;
|
|
1305
|
+
}>>;
|
|
1306
|
+
readonly objective: StructType<{
|
|
1307
|
+
readonly terms: ArrayType<StructType<{
|
|
1308
|
+
readonly var: StringType;
|
|
1309
|
+
readonly coeff: FloatType;
|
|
1310
|
+
}>>;
|
|
1311
|
+
readonly maximize: BooleanType;
|
|
1312
|
+
}>;
|
|
1313
|
+
}>;
|
|
1314
|
+
readonly LinearSolverType: VariantType<{
|
|
1315
|
+
readonly glop: NullType;
|
|
1316
|
+
readonly scip: NullType;
|
|
1317
|
+
readonly highs: NullType;
|
|
1318
|
+
}>;
|
|
1319
|
+
readonly LinearConfigType: StructType<{
|
|
1320
|
+
readonly solver: OptionType<VariantType<{
|
|
1321
|
+
readonly glop: NullType;
|
|
1322
|
+
readonly scip: NullType;
|
|
1323
|
+
readonly highs: NullType;
|
|
1324
|
+
}>>;
|
|
1325
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1326
|
+
}>;
|
|
1327
|
+
readonly LinearResultType: StructType<{
|
|
1328
|
+
readonly status: VariantType<{
|
|
1329
|
+
readonly optimal: NullType;
|
|
1330
|
+
readonly feasible: NullType;
|
|
1331
|
+
readonly infeasible: NullType;
|
|
1332
|
+
readonly not_solved: NullType;
|
|
1333
|
+
readonly model_invalid: NullType;
|
|
1334
|
+
}>;
|
|
1335
|
+
readonly objective_value: OptionType<FloatType>;
|
|
1336
|
+
readonly assignments: DictType<StringType, FloatType>;
|
|
1337
|
+
readonly wall_time: FloatType;
|
|
1338
|
+
}>;
|
|
1339
|
+
readonly MinCostFlowInputType: StructType<{
|
|
1340
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
1341
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
1342
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
1343
|
+
readonly unit_costs: ArrayType<IntegerType>;
|
|
1344
|
+
readonly supplies: ArrayType<IntegerType>;
|
|
1345
|
+
}>;
|
|
1346
|
+
readonly MinCostFlowResultType: StructType<{
|
|
1347
|
+
readonly status: VariantType<{
|
|
1348
|
+
readonly optimal: NullType;
|
|
1349
|
+
readonly feasible: NullType;
|
|
1350
|
+
readonly infeasible: NullType;
|
|
1351
|
+
readonly not_solved: NullType;
|
|
1352
|
+
readonly model_invalid: NullType;
|
|
1353
|
+
}>;
|
|
1354
|
+
readonly total_cost: IntegerType;
|
|
1355
|
+
readonly flows: ArrayType<IntegerType>;
|
|
1356
|
+
readonly wall_time: FloatType;
|
|
1357
|
+
}>;
|
|
1358
|
+
readonly MaxFlowInputType: StructType<{
|
|
1359
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
1360
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
1361
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
1362
|
+
readonly source: IntegerType;
|
|
1363
|
+
readonly sink: IntegerType;
|
|
1364
|
+
}>;
|
|
1365
|
+
readonly MaxFlowResultType: StructType<{
|
|
1366
|
+
readonly status: VariantType<{
|
|
1367
|
+
readonly optimal: NullType;
|
|
1368
|
+
readonly feasible: NullType;
|
|
1369
|
+
readonly infeasible: NullType;
|
|
1370
|
+
readonly not_solved: NullType;
|
|
1371
|
+
readonly model_invalid: NullType;
|
|
1372
|
+
}>;
|
|
1373
|
+
readonly total_flow: IntegerType;
|
|
1374
|
+
readonly flows: ArrayType<IntegerType>;
|
|
1375
|
+
readonly wall_time: FloatType;
|
|
1376
|
+
}>;
|
|
1377
|
+
readonly AssignmentInputType: StructType<{
|
|
1378
|
+
readonly costs: ArrayType<ArrayType<IntegerType>>;
|
|
1379
|
+
}>;
|
|
1380
|
+
readonly AssignmentMatchType: StructType<{
|
|
1381
|
+
readonly worker: IntegerType;
|
|
1382
|
+
readonly task: IntegerType;
|
|
1383
|
+
readonly cost: IntegerType;
|
|
1384
|
+
}>;
|
|
1385
|
+
readonly AssignmentResultType: StructType<{
|
|
1386
|
+
readonly status: VariantType<{
|
|
1387
|
+
readonly optimal: NullType;
|
|
1388
|
+
readonly feasible: NullType;
|
|
1389
|
+
readonly infeasible: NullType;
|
|
1390
|
+
readonly not_solved: NullType;
|
|
1391
|
+
readonly model_invalid: NullType;
|
|
1392
|
+
}>;
|
|
1393
|
+
readonly total_cost: IntegerType;
|
|
1394
|
+
readonly assignments: ArrayType<StructType<{
|
|
1395
|
+
readonly worker: IntegerType;
|
|
1396
|
+
readonly task: IntegerType;
|
|
1397
|
+
readonly cost: IntegerType;
|
|
1398
|
+
}>>;
|
|
1399
|
+
readonly wall_time: FloatType;
|
|
1400
|
+
}>;
|
|
1401
|
+
};
|
|
1402
|
+
/**
|
|
1403
|
+
* Google OR-Tools optimization.
|
|
1404
|
+
*
|
|
1405
|
+
* Provides:
|
|
1406
|
+
* - CP-SAT: Constraint programming with SAT-based solving
|
|
1407
|
+
* - Routing: Vehicle routing (TSP, CVRP, VRPTW, VRPPD)
|
|
1408
|
+
* - Linear: Linear programming and mixed-integer programming
|
|
1409
|
+
* - Graph: Min-cost flow, max flow, linear sum assignment
|
|
1410
|
+
*/
|
|
1411
|
+
export declare const GoogleOr: {
|
|
1412
|
+
/**
|
|
1413
|
+
* Solve a CP-SAT model and return the best solution.
|
|
1414
|
+
*
|
|
1415
|
+
* @example
|
|
1416
|
+
* ```ts
|
|
1417
|
+
* import { East, variant } from "@elaraai/east";
|
|
1418
|
+
* import { GoogleOr, CpSatModelType, CpSatConfigType } from "@elaraai/east-py-datascience";
|
|
1419
|
+
*
|
|
1420
|
+
* const solve = East.function(
|
|
1421
|
+
* [CpSatModelType],
|
|
1422
|
+
* GoogleOr.Types.CpSatResultType,
|
|
1423
|
+
* ($, model) => {
|
|
1424
|
+
* const config = $.let({
|
|
1425
|
+
* max_time_seconds: variant("some", 10.0),
|
|
1426
|
+
* num_workers: variant("none", null),
|
|
1427
|
+
* log_search_progress: variant("none", null),
|
|
1428
|
+
* seed: variant("none", null),
|
|
1429
|
+
* max_solutions: variant("none", null),
|
|
1430
|
+
* }, CpSatConfigType);
|
|
1431
|
+
* return $.return(GoogleOr.cpsatSolve(model, config));
|
|
1432
|
+
* }
|
|
1433
|
+
* );
|
|
1434
|
+
* ```
|
|
1435
|
+
*/
|
|
1436
|
+
readonly cpsatSolve: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1437
|
+
readonly int_vars: ArrayType<StructType<{
|
|
1438
|
+
readonly name: StringType;
|
|
1439
|
+
readonly lower_bound: IntegerType;
|
|
1440
|
+
readonly upper_bound: IntegerType;
|
|
1441
|
+
}>>;
|
|
1442
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
1443
|
+
readonly name: StringType;
|
|
1444
|
+
}>>;
|
|
1445
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
1446
|
+
readonly name: StringType;
|
|
1447
|
+
readonly start: StringType;
|
|
1448
|
+
readonly size: StringType;
|
|
1449
|
+
readonly end: StringType;
|
|
1450
|
+
readonly is_present: OptionType<StringType>;
|
|
1451
|
+
}>>;
|
|
1452
|
+
readonly constraints: ArrayType<VariantType<{
|
|
1453
|
+
readonly linear: StructType<{
|
|
1454
|
+
readonly expr: StructType<{
|
|
1455
|
+
readonly terms: ArrayType<StructType<{
|
|
1456
|
+
readonly var: StringType;
|
|
1457
|
+
readonly coeff: IntegerType;
|
|
1458
|
+
}>>;
|
|
1459
|
+
readonly constant: IntegerType;
|
|
1460
|
+
}>;
|
|
1461
|
+
readonly op: VariantType<{
|
|
1462
|
+
readonly equal: NullType;
|
|
1463
|
+
readonly not_equal: NullType;
|
|
1464
|
+
readonly less_equal: NullType;
|
|
1465
|
+
readonly greater_equal: NullType;
|
|
1466
|
+
}>;
|
|
1467
|
+
readonly rhs: IntegerType;
|
|
1468
|
+
}>;
|
|
1469
|
+
readonly bool_or: StructType<{
|
|
1470
|
+
readonly literals: ArrayType<StructType<{
|
|
1471
|
+
readonly var: StringType;
|
|
1472
|
+
readonly negated: BooleanType;
|
|
1473
|
+
}>>;
|
|
1474
|
+
}>;
|
|
1475
|
+
readonly bool_and: StructType<{
|
|
1476
|
+
readonly literals: ArrayType<StructType<{
|
|
1477
|
+
readonly var: StringType;
|
|
1478
|
+
readonly negated: BooleanType;
|
|
1479
|
+
}>>;
|
|
1480
|
+
}>;
|
|
1481
|
+
readonly implication: StructType<{
|
|
1482
|
+
readonly if_literal: StructType<{
|
|
1483
|
+
readonly var: StringType;
|
|
1484
|
+
readonly negated: BooleanType;
|
|
1485
|
+
}>;
|
|
1486
|
+
readonly then_literal: StructType<{
|
|
1487
|
+
readonly var: StringType;
|
|
1488
|
+
readonly negated: BooleanType;
|
|
1489
|
+
}>;
|
|
1490
|
+
}>;
|
|
1491
|
+
readonly exactly_k: StructType<{
|
|
1492
|
+
readonly vars: ArrayType<StringType>;
|
|
1493
|
+
readonly k: IntegerType;
|
|
1494
|
+
}>;
|
|
1495
|
+
readonly at_most_k: StructType<{
|
|
1496
|
+
readonly vars: ArrayType<StringType>;
|
|
1497
|
+
readonly k: IntegerType;
|
|
1498
|
+
}>;
|
|
1499
|
+
readonly at_least_k: StructType<{
|
|
1500
|
+
readonly vars: ArrayType<StringType>;
|
|
1501
|
+
readonly k: IntegerType;
|
|
1502
|
+
}>;
|
|
1503
|
+
readonly all_different: StructType<{
|
|
1504
|
+
readonly vars: ArrayType<StringType>;
|
|
1505
|
+
}>;
|
|
1506
|
+
readonly element: StructType<{
|
|
1507
|
+
readonly index_var: StringType;
|
|
1508
|
+
readonly values: ArrayType<IntegerType>;
|
|
1509
|
+
readonly target_var: StringType;
|
|
1510
|
+
}>;
|
|
1511
|
+
readonly no_overlap: StructType<{
|
|
1512
|
+
readonly intervals: ArrayType<StringType>;
|
|
1513
|
+
}>;
|
|
1514
|
+
readonly cumulative: StructType<{
|
|
1515
|
+
readonly intervals: ArrayType<StringType>;
|
|
1516
|
+
readonly demands: ArrayType<IntegerType>;
|
|
1517
|
+
readonly capacity: IntegerType;
|
|
1518
|
+
}>;
|
|
1519
|
+
readonly circuit: StructType<{
|
|
1520
|
+
readonly arcs: ArrayType<StructType<{
|
|
1521
|
+
readonly tail: IntegerType;
|
|
1522
|
+
readonly head: IntegerType;
|
|
1523
|
+
readonly literal: StringType;
|
|
1524
|
+
}>>;
|
|
1525
|
+
}>;
|
|
1526
|
+
}>>;
|
|
1527
|
+
readonly objective: OptionType<VariantType<{
|
|
1528
|
+
readonly minimize: StructType<{
|
|
1529
|
+
readonly terms: ArrayType<StructType<{
|
|
1530
|
+
readonly var: StringType;
|
|
1531
|
+
readonly coeff: IntegerType;
|
|
1532
|
+
}>>;
|
|
1533
|
+
readonly constant: IntegerType;
|
|
1534
|
+
}>;
|
|
1535
|
+
readonly maximize: StructType<{
|
|
1536
|
+
readonly terms: ArrayType<StructType<{
|
|
1537
|
+
readonly var: StringType;
|
|
1538
|
+
readonly coeff: IntegerType;
|
|
1539
|
+
}>>;
|
|
1540
|
+
readonly constant: IntegerType;
|
|
1541
|
+
}>;
|
|
1542
|
+
}>>;
|
|
1543
|
+
}>, StructType<{
|
|
1544
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1545
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
1546
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
1547
|
+
readonly seed: OptionType<IntegerType>;
|
|
1548
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
1549
|
+
}>], StructType<{
|
|
1550
|
+
readonly status: VariantType<{
|
|
1551
|
+
readonly optimal: NullType;
|
|
1552
|
+
readonly feasible: NullType;
|
|
1553
|
+
readonly infeasible: NullType;
|
|
1554
|
+
readonly not_solved: NullType;
|
|
1555
|
+
readonly model_invalid: NullType;
|
|
1556
|
+
}>;
|
|
1557
|
+
readonly objective_value: OptionType<FloatType>;
|
|
1558
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
1559
|
+
readonly wall_time: FloatType;
|
|
1560
|
+
}>>;
|
|
1561
|
+
/**
|
|
1562
|
+
* Solve a CP-SAT model and return all feasible solutions found.
|
|
1563
|
+
*
|
|
1564
|
+
* @example
|
|
1565
|
+
* ```ts
|
|
1566
|
+
* import { East, ArrayType, variant } from "@elaraai/east";
|
|
1567
|
+
* import { GoogleOr, CpSatModelType, CpSatConfigType } from "@elaraai/east-py-datascience";
|
|
1568
|
+
*
|
|
1569
|
+
* const solveAll = East.function(
|
|
1570
|
+
* [CpSatModelType],
|
|
1571
|
+
* ArrayType(GoogleOr.Types.CpSatResultType),
|
|
1572
|
+
* ($, model) => {
|
|
1573
|
+
* const config = $.let({
|
|
1574
|
+
* max_time_seconds: variant("some", 10.0),
|
|
1575
|
+
* num_workers: variant("none", null),
|
|
1576
|
+
* log_search_progress: variant("none", null),
|
|
1577
|
+
* seed: variant("none", null),
|
|
1578
|
+
* max_solutions: variant("some", 100n),
|
|
1579
|
+
* }, CpSatConfigType);
|
|
1580
|
+
* return $.return(GoogleOr.cpsatSolveAll(model, config));
|
|
1581
|
+
* }
|
|
1582
|
+
* );
|
|
1583
|
+
* ```
|
|
1584
|
+
*/
|
|
1585
|
+
readonly cpsatSolveAll: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1586
|
+
readonly int_vars: ArrayType<StructType<{
|
|
1587
|
+
readonly name: StringType;
|
|
1588
|
+
readonly lower_bound: IntegerType;
|
|
1589
|
+
readonly upper_bound: IntegerType;
|
|
1590
|
+
}>>;
|
|
1591
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
1592
|
+
readonly name: StringType;
|
|
1593
|
+
}>>;
|
|
1594
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
1595
|
+
readonly name: StringType;
|
|
1596
|
+
readonly start: StringType;
|
|
1597
|
+
readonly size: StringType;
|
|
1598
|
+
readonly end: StringType;
|
|
1599
|
+
readonly is_present: OptionType<StringType>;
|
|
1600
|
+
}>>;
|
|
1601
|
+
readonly constraints: ArrayType<VariantType<{
|
|
1602
|
+
readonly linear: StructType<{
|
|
1603
|
+
readonly expr: StructType<{
|
|
1604
|
+
readonly terms: ArrayType<StructType<{
|
|
1605
|
+
readonly var: StringType;
|
|
1606
|
+
readonly coeff: IntegerType;
|
|
1607
|
+
}>>;
|
|
1608
|
+
readonly constant: IntegerType;
|
|
1609
|
+
}>;
|
|
1610
|
+
readonly op: VariantType<{
|
|
1611
|
+
readonly equal: NullType;
|
|
1612
|
+
readonly not_equal: NullType;
|
|
1613
|
+
readonly less_equal: NullType;
|
|
1614
|
+
readonly greater_equal: NullType;
|
|
1615
|
+
}>;
|
|
1616
|
+
readonly rhs: IntegerType;
|
|
1617
|
+
}>;
|
|
1618
|
+
readonly bool_or: StructType<{
|
|
1619
|
+
readonly literals: ArrayType<StructType<{
|
|
1620
|
+
readonly var: StringType;
|
|
1621
|
+
readonly negated: BooleanType;
|
|
1622
|
+
}>>;
|
|
1623
|
+
}>;
|
|
1624
|
+
readonly bool_and: StructType<{
|
|
1625
|
+
readonly literals: ArrayType<StructType<{
|
|
1626
|
+
readonly var: StringType;
|
|
1627
|
+
readonly negated: BooleanType;
|
|
1628
|
+
}>>;
|
|
1629
|
+
}>;
|
|
1630
|
+
readonly implication: StructType<{
|
|
1631
|
+
readonly if_literal: StructType<{
|
|
1632
|
+
readonly var: StringType;
|
|
1633
|
+
readonly negated: BooleanType;
|
|
1634
|
+
}>;
|
|
1635
|
+
readonly then_literal: StructType<{
|
|
1636
|
+
readonly var: StringType;
|
|
1637
|
+
readonly negated: BooleanType;
|
|
1638
|
+
}>;
|
|
1639
|
+
}>;
|
|
1640
|
+
readonly exactly_k: StructType<{
|
|
1641
|
+
readonly vars: ArrayType<StringType>;
|
|
1642
|
+
readonly k: IntegerType;
|
|
1643
|
+
}>;
|
|
1644
|
+
readonly at_most_k: StructType<{
|
|
1645
|
+
readonly vars: ArrayType<StringType>;
|
|
1646
|
+
readonly k: IntegerType;
|
|
1647
|
+
}>;
|
|
1648
|
+
readonly at_least_k: StructType<{
|
|
1649
|
+
readonly vars: ArrayType<StringType>;
|
|
1650
|
+
readonly k: IntegerType;
|
|
1651
|
+
}>;
|
|
1652
|
+
readonly all_different: StructType<{
|
|
1653
|
+
readonly vars: ArrayType<StringType>;
|
|
1654
|
+
}>;
|
|
1655
|
+
readonly element: StructType<{
|
|
1656
|
+
readonly index_var: StringType;
|
|
1657
|
+
readonly values: ArrayType<IntegerType>;
|
|
1658
|
+
readonly target_var: StringType;
|
|
1659
|
+
}>;
|
|
1660
|
+
readonly no_overlap: StructType<{
|
|
1661
|
+
readonly intervals: ArrayType<StringType>;
|
|
1662
|
+
}>;
|
|
1663
|
+
readonly cumulative: StructType<{
|
|
1664
|
+
readonly intervals: ArrayType<StringType>;
|
|
1665
|
+
readonly demands: ArrayType<IntegerType>;
|
|
1666
|
+
readonly capacity: IntegerType;
|
|
1667
|
+
}>;
|
|
1668
|
+
readonly circuit: StructType<{
|
|
1669
|
+
readonly arcs: ArrayType<StructType<{
|
|
1670
|
+
readonly tail: IntegerType;
|
|
1671
|
+
readonly head: IntegerType;
|
|
1672
|
+
readonly literal: StringType;
|
|
1673
|
+
}>>;
|
|
1674
|
+
}>;
|
|
1675
|
+
}>>;
|
|
1676
|
+
readonly objective: OptionType<VariantType<{
|
|
1677
|
+
readonly minimize: StructType<{
|
|
1678
|
+
readonly terms: ArrayType<StructType<{
|
|
1679
|
+
readonly var: StringType;
|
|
1680
|
+
readonly coeff: IntegerType;
|
|
1681
|
+
}>>;
|
|
1682
|
+
readonly constant: IntegerType;
|
|
1683
|
+
}>;
|
|
1684
|
+
readonly maximize: StructType<{
|
|
1685
|
+
readonly terms: ArrayType<StructType<{
|
|
1686
|
+
readonly var: StringType;
|
|
1687
|
+
readonly coeff: IntegerType;
|
|
1688
|
+
}>>;
|
|
1689
|
+
readonly constant: IntegerType;
|
|
1690
|
+
}>;
|
|
1691
|
+
}>>;
|
|
1692
|
+
}>, StructType<{
|
|
1693
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1694
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
1695
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
1696
|
+
readonly seed: OptionType<IntegerType>;
|
|
1697
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
1698
|
+
}>], ArrayType<StructType<{
|
|
1699
|
+
readonly status: VariantType<{
|
|
1700
|
+
readonly optimal: NullType;
|
|
1701
|
+
readonly feasible: NullType;
|
|
1702
|
+
readonly infeasible: NullType;
|
|
1703
|
+
readonly not_solved: NullType;
|
|
1704
|
+
readonly model_invalid: NullType;
|
|
1705
|
+
}>;
|
|
1706
|
+
readonly objective_value: OptionType<FloatType>;
|
|
1707
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
1708
|
+
readonly wall_time: FloatType;
|
|
1709
|
+
}>>>;
|
|
1710
|
+
/**
|
|
1711
|
+
* Solve a vehicle routing problem.
|
|
1712
|
+
*
|
|
1713
|
+
* @example
|
|
1714
|
+
* ```ts
|
|
1715
|
+
* import { East, variant } from "@elaraai/east";
|
|
1716
|
+
* import { GoogleOr, RoutingModelType, RoutingConfigType } from "@elaraai/east-py-datascience";
|
|
1717
|
+
*
|
|
1718
|
+
* const solve = East.function(
|
|
1719
|
+
* [RoutingModelType],
|
|
1720
|
+
* GoogleOr.Types.RoutingResultType,
|
|
1721
|
+
* ($, model) => {
|
|
1722
|
+
* const config = $.let({
|
|
1723
|
+
* first_solution: variant("some", variant("path_cheapest_arc", null)),
|
|
1724
|
+
* metaheuristic: variant("some", variant("guided_local_search", null)),
|
|
1725
|
+
* max_time_seconds: variant("some", 30.0),
|
|
1726
|
+
* }, RoutingConfigType);
|
|
1727
|
+
* return $.return(GoogleOr.routingSolve(model, config));
|
|
1728
|
+
* }
|
|
1729
|
+
* );
|
|
1730
|
+
* ```
|
|
1731
|
+
*/
|
|
1732
|
+
readonly routingSolve: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1733
|
+
readonly distance_matrix: ArrayType<ArrayType<IntegerType>>;
|
|
1734
|
+
readonly num_vehicles: IntegerType;
|
|
1735
|
+
readonly depot: IntegerType;
|
|
1736
|
+
readonly demands: OptionType<ArrayType<IntegerType>>;
|
|
1737
|
+
readonly vehicle_capacities: OptionType<ArrayType<IntegerType>>;
|
|
1738
|
+
readonly time_matrix: OptionType<ArrayType<ArrayType<IntegerType>>>;
|
|
1739
|
+
readonly time_windows: OptionType<ArrayType<StructType<{
|
|
1740
|
+
readonly start: IntegerType;
|
|
1741
|
+
readonly end: IntegerType;
|
|
1742
|
+
}>>>;
|
|
1743
|
+
readonly pickup_deliveries: OptionType<ArrayType<StructType<{
|
|
1744
|
+
readonly pickup: IntegerType;
|
|
1745
|
+
readonly delivery: IntegerType;
|
|
1746
|
+
}>>>;
|
|
1747
|
+
}>, StructType<{
|
|
1748
|
+
readonly first_solution: OptionType<VariantType<{
|
|
1749
|
+
readonly path_cheapest_arc: NullType;
|
|
1750
|
+
readonly savings: NullType;
|
|
1751
|
+
readonly christofides: NullType;
|
|
1752
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
1753
|
+
readonly local_cheapest_insertion: NullType;
|
|
1754
|
+
readonly first_unbound_min_value: NullType;
|
|
1755
|
+
}>>;
|
|
1756
|
+
readonly metaheuristic: OptionType<VariantType<{
|
|
1757
|
+
readonly greedy_descent: NullType;
|
|
1758
|
+
readonly guided_local_search: NullType;
|
|
1759
|
+
readonly simulated_annealing: NullType;
|
|
1760
|
+
readonly tabu_search: NullType;
|
|
1761
|
+
}>>;
|
|
1762
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1763
|
+
}>], StructType<{
|
|
1764
|
+
readonly status: VariantType<{
|
|
1765
|
+
readonly optimal: NullType;
|
|
1766
|
+
readonly feasible: NullType;
|
|
1767
|
+
readonly infeasible: NullType;
|
|
1768
|
+
readonly not_solved: NullType;
|
|
1769
|
+
readonly model_invalid: NullType;
|
|
1770
|
+
}>;
|
|
1771
|
+
readonly total_distance: IntegerType;
|
|
1772
|
+
readonly routes: ArrayType<StructType<{
|
|
1773
|
+
readonly vehicle: IntegerType;
|
|
1774
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
1775
|
+
readonly distance: IntegerType;
|
|
1776
|
+
}>>;
|
|
1777
|
+
readonly wall_time: FloatType;
|
|
1778
|
+
}>>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Solve a linear programming / MIP problem.
|
|
1781
|
+
*
|
|
1782
|
+
* @example
|
|
1783
|
+
* ```ts
|
|
1784
|
+
* import { East, variant } from "@elaraai/east";
|
|
1785
|
+
* import { GoogleOr, LinearModelType, LinearConfigType } from "@elaraai/east-py-datascience";
|
|
1786
|
+
*
|
|
1787
|
+
* const solve = East.function(
|
|
1788
|
+
* [LinearModelType],
|
|
1789
|
+
* GoogleOr.Types.LinearResultType,
|
|
1790
|
+
* ($, model) => {
|
|
1791
|
+
* const config = $.let({
|
|
1792
|
+
* solver: variant("some", variant("highs", null)),
|
|
1793
|
+
* max_time_seconds: variant("some", 60.0),
|
|
1794
|
+
* }, LinearConfigType);
|
|
1795
|
+
* return $.return(GoogleOr.linearSolve(model, config));
|
|
1796
|
+
* }
|
|
1797
|
+
* );
|
|
1798
|
+
* ```
|
|
1799
|
+
*/
|
|
1800
|
+
readonly linearSolve: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1801
|
+
readonly variables: ArrayType<StructType<{
|
|
1802
|
+
readonly name: StringType;
|
|
1803
|
+
readonly lower_bound: FloatType;
|
|
1804
|
+
readonly upper_bound: FloatType;
|
|
1805
|
+
readonly is_integer: BooleanType;
|
|
1806
|
+
}>>;
|
|
1807
|
+
readonly constraints: ArrayType<StructType<{
|
|
1808
|
+
readonly terms: ArrayType<StructType<{
|
|
1809
|
+
readonly var: StringType;
|
|
1810
|
+
readonly coeff: FloatType;
|
|
1811
|
+
}>>;
|
|
1812
|
+
readonly lower_bound: FloatType;
|
|
1813
|
+
readonly upper_bound: FloatType;
|
|
1814
|
+
}>>;
|
|
1815
|
+
readonly objective: StructType<{
|
|
1816
|
+
readonly terms: ArrayType<StructType<{
|
|
1817
|
+
readonly var: StringType;
|
|
1818
|
+
readonly coeff: FloatType;
|
|
1819
|
+
}>>;
|
|
1820
|
+
readonly maximize: BooleanType;
|
|
1821
|
+
}>;
|
|
1822
|
+
}>, StructType<{
|
|
1823
|
+
readonly solver: OptionType<VariantType<{
|
|
1824
|
+
readonly glop: NullType;
|
|
1825
|
+
readonly scip: NullType;
|
|
1826
|
+
readonly highs: NullType;
|
|
1827
|
+
}>>;
|
|
1828
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
1829
|
+
}>], StructType<{
|
|
1830
|
+
readonly status: VariantType<{
|
|
1831
|
+
readonly optimal: NullType;
|
|
1832
|
+
readonly feasible: NullType;
|
|
1833
|
+
readonly infeasible: NullType;
|
|
1834
|
+
readonly not_solved: NullType;
|
|
1835
|
+
readonly model_invalid: NullType;
|
|
1836
|
+
}>;
|
|
1837
|
+
readonly objective_value: OptionType<FloatType>;
|
|
1838
|
+
readonly assignments: DictType<StringType, FloatType>;
|
|
1839
|
+
readonly wall_time: FloatType;
|
|
1840
|
+
}>>;
|
|
1841
|
+
/**
|
|
1842
|
+
* Solve a min-cost flow problem.
|
|
1843
|
+
*
|
|
1844
|
+
* @example
|
|
1845
|
+
* ```ts
|
|
1846
|
+
* import { East } from "@elaraai/east";
|
|
1847
|
+
* import { GoogleOr, MinCostFlowInputType } from "@elaraai/east-py-datascience";
|
|
1848
|
+
*
|
|
1849
|
+
* const solve = East.function(
|
|
1850
|
+
* [MinCostFlowInputType],
|
|
1851
|
+
* GoogleOr.Types.MinCostFlowResultType,
|
|
1852
|
+
* ($, input) => {
|
|
1853
|
+
* return $.return(GoogleOr.minCostFlow(input));
|
|
1854
|
+
* }
|
|
1855
|
+
* );
|
|
1856
|
+
* ```
|
|
1857
|
+
*/
|
|
1858
|
+
readonly minCostFlow: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1859
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
1860
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
1861
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
1862
|
+
readonly unit_costs: ArrayType<IntegerType>;
|
|
1863
|
+
readonly supplies: ArrayType<IntegerType>;
|
|
1864
|
+
}>], StructType<{
|
|
1865
|
+
readonly status: VariantType<{
|
|
1866
|
+
readonly optimal: NullType;
|
|
1867
|
+
readonly feasible: NullType;
|
|
1868
|
+
readonly infeasible: NullType;
|
|
1869
|
+
readonly not_solved: NullType;
|
|
1870
|
+
readonly model_invalid: NullType;
|
|
1871
|
+
}>;
|
|
1872
|
+
readonly total_cost: IntegerType;
|
|
1873
|
+
readonly flows: ArrayType<IntegerType>;
|
|
1874
|
+
readonly wall_time: FloatType;
|
|
1875
|
+
}>>;
|
|
1876
|
+
/**
|
|
1877
|
+
* Solve a max-flow problem.
|
|
1878
|
+
*
|
|
1879
|
+
* @example
|
|
1880
|
+
* ```ts
|
|
1881
|
+
* import { East } from "@elaraai/east";
|
|
1882
|
+
* import { GoogleOr, MaxFlowInputType } from "@elaraai/east-py-datascience";
|
|
1883
|
+
*
|
|
1884
|
+
* const solve = East.function(
|
|
1885
|
+
* [MaxFlowInputType],
|
|
1886
|
+
* GoogleOr.Types.MaxFlowResultType,
|
|
1887
|
+
* ($, input) => {
|
|
1888
|
+
* return $.return(GoogleOr.maxFlow(input));
|
|
1889
|
+
* }
|
|
1890
|
+
* );
|
|
1891
|
+
* ```
|
|
1892
|
+
*/
|
|
1893
|
+
readonly maxFlow: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1894
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
1895
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
1896
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
1897
|
+
readonly source: IntegerType;
|
|
1898
|
+
readonly sink: IntegerType;
|
|
1899
|
+
}>], StructType<{
|
|
1900
|
+
readonly status: VariantType<{
|
|
1901
|
+
readonly optimal: NullType;
|
|
1902
|
+
readonly feasible: NullType;
|
|
1903
|
+
readonly infeasible: NullType;
|
|
1904
|
+
readonly not_solved: NullType;
|
|
1905
|
+
readonly model_invalid: NullType;
|
|
1906
|
+
}>;
|
|
1907
|
+
readonly total_flow: IntegerType;
|
|
1908
|
+
readonly flows: ArrayType<IntegerType>;
|
|
1909
|
+
readonly wall_time: FloatType;
|
|
1910
|
+
}>>;
|
|
1911
|
+
/**
|
|
1912
|
+
* Solve a linear sum assignment problem.
|
|
1913
|
+
*
|
|
1914
|
+
* @example
|
|
1915
|
+
* ```ts
|
|
1916
|
+
* import { East } from "@elaraai/east";
|
|
1917
|
+
* import { GoogleOr, AssignmentInputType } from "@elaraai/east-py-datascience";
|
|
1918
|
+
*
|
|
1919
|
+
* const solve = East.function(
|
|
1920
|
+
* [AssignmentInputType],
|
|
1921
|
+
* GoogleOr.Types.AssignmentResultType,
|
|
1922
|
+
* ($, input) => {
|
|
1923
|
+
* return $.return(GoogleOr.assignment(input));
|
|
1924
|
+
* }
|
|
1925
|
+
* );
|
|
1926
|
+
* ```
|
|
1927
|
+
*/
|
|
1928
|
+
readonly assignment: import("@elaraai/east").PlatformDefinition<[StructType<{
|
|
1929
|
+
readonly costs: ArrayType<ArrayType<IntegerType>>;
|
|
1930
|
+
}>], StructType<{
|
|
1931
|
+
readonly status: VariantType<{
|
|
1932
|
+
readonly optimal: NullType;
|
|
1933
|
+
readonly feasible: NullType;
|
|
1934
|
+
readonly infeasible: NullType;
|
|
1935
|
+
readonly not_solved: NullType;
|
|
1936
|
+
readonly model_invalid: NullType;
|
|
1937
|
+
}>;
|
|
1938
|
+
readonly total_cost: IntegerType;
|
|
1939
|
+
readonly assignments: ArrayType<StructType<{
|
|
1940
|
+
readonly worker: IntegerType;
|
|
1941
|
+
readonly task: IntegerType;
|
|
1942
|
+
readonly cost: IntegerType;
|
|
1943
|
+
}>>;
|
|
1944
|
+
readonly wall_time: FloatType;
|
|
1945
|
+
}>>;
|
|
1946
|
+
/** Type definitions. */
|
|
1947
|
+
readonly Types: {
|
|
1948
|
+
readonly StatusType: VariantType<{
|
|
1949
|
+
readonly optimal: NullType;
|
|
1950
|
+
readonly feasible: NullType;
|
|
1951
|
+
readonly infeasible: NullType;
|
|
1952
|
+
readonly not_solved: NullType;
|
|
1953
|
+
readonly model_invalid: NullType;
|
|
1954
|
+
}>;
|
|
1955
|
+
readonly CpSatIntVarType: StructType<{
|
|
1956
|
+
readonly name: StringType;
|
|
1957
|
+
readonly lower_bound: IntegerType;
|
|
1958
|
+
readonly upper_bound: IntegerType;
|
|
1959
|
+
}>;
|
|
1960
|
+
readonly CpSatBoolVarType: StructType<{
|
|
1961
|
+
readonly name: StringType;
|
|
1962
|
+
}>;
|
|
1963
|
+
readonly CpSatIntervalVarType: StructType<{
|
|
1964
|
+
readonly name: StringType;
|
|
1965
|
+
readonly start: StringType;
|
|
1966
|
+
readonly size: StringType;
|
|
1967
|
+
readonly end: StringType;
|
|
1968
|
+
readonly is_present: OptionType<StringType>;
|
|
1969
|
+
}>;
|
|
1970
|
+
readonly CpSatLinearTermType: StructType<{
|
|
1971
|
+
readonly var: StringType;
|
|
1972
|
+
readonly coeff: IntegerType;
|
|
1973
|
+
}>;
|
|
1974
|
+
readonly CpSatLinearExprType: StructType<{
|
|
1975
|
+
readonly terms: ArrayType<StructType<{
|
|
1976
|
+
readonly var: StringType;
|
|
1977
|
+
readonly coeff: IntegerType;
|
|
1978
|
+
}>>;
|
|
1979
|
+
readonly constant: IntegerType;
|
|
1980
|
+
}>;
|
|
1981
|
+
readonly CpSatLiteralType: StructType<{
|
|
1982
|
+
readonly var: StringType;
|
|
1983
|
+
readonly negated: BooleanType;
|
|
1984
|
+
}>;
|
|
1985
|
+
readonly CpSatComparisonType: VariantType<{
|
|
1986
|
+
readonly equal: NullType;
|
|
1987
|
+
readonly not_equal: NullType;
|
|
1988
|
+
readonly less_equal: NullType;
|
|
1989
|
+
readonly greater_equal: NullType;
|
|
1990
|
+
}>;
|
|
1991
|
+
readonly CpSatConstraintType: VariantType<{
|
|
1992
|
+
readonly linear: StructType<{
|
|
1993
|
+
readonly expr: StructType<{
|
|
1994
|
+
readonly terms: ArrayType<StructType<{
|
|
1995
|
+
readonly var: StringType;
|
|
1996
|
+
readonly coeff: IntegerType;
|
|
1997
|
+
}>>;
|
|
1998
|
+
readonly constant: IntegerType;
|
|
1999
|
+
}>;
|
|
2000
|
+
readonly op: VariantType<{
|
|
2001
|
+
readonly equal: NullType;
|
|
2002
|
+
readonly not_equal: NullType;
|
|
2003
|
+
readonly less_equal: NullType;
|
|
2004
|
+
readonly greater_equal: NullType;
|
|
2005
|
+
}>;
|
|
2006
|
+
readonly rhs: IntegerType;
|
|
2007
|
+
}>;
|
|
2008
|
+
readonly bool_or: StructType<{
|
|
2009
|
+
readonly literals: ArrayType<StructType<{
|
|
2010
|
+
readonly var: StringType;
|
|
2011
|
+
readonly negated: BooleanType;
|
|
2012
|
+
}>>;
|
|
2013
|
+
}>;
|
|
2014
|
+
readonly bool_and: StructType<{
|
|
2015
|
+
readonly literals: ArrayType<StructType<{
|
|
2016
|
+
readonly var: StringType;
|
|
2017
|
+
readonly negated: BooleanType;
|
|
2018
|
+
}>>;
|
|
2019
|
+
}>;
|
|
2020
|
+
readonly implication: StructType<{
|
|
2021
|
+
readonly if_literal: StructType<{
|
|
2022
|
+
readonly var: StringType;
|
|
2023
|
+
readonly negated: BooleanType;
|
|
2024
|
+
}>;
|
|
2025
|
+
readonly then_literal: StructType<{
|
|
2026
|
+
readonly var: StringType;
|
|
2027
|
+
readonly negated: BooleanType;
|
|
2028
|
+
}>;
|
|
2029
|
+
}>;
|
|
2030
|
+
readonly exactly_k: StructType<{
|
|
2031
|
+
readonly vars: ArrayType<StringType>;
|
|
2032
|
+
readonly k: IntegerType;
|
|
2033
|
+
}>;
|
|
2034
|
+
readonly at_most_k: StructType<{
|
|
2035
|
+
readonly vars: ArrayType<StringType>;
|
|
2036
|
+
readonly k: IntegerType;
|
|
2037
|
+
}>;
|
|
2038
|
+
readonly at_least_k: StructType<{
|
|
2039
|
+
readonly vars: ArrayType<StringType>;
|
|
2040
|
+
readonly k: IntegerType;
|
|
2041
|
+
}>;
|
|
2042
|
+
readonly all_different: StructType<{
|
|
2043
|
+
readonly vars: ArrayType<StringType>;
|
|
2044
|
+
}>;
|
|
2045
|
+
readonly element: StructType<{
|
|
2046
|
+
readonly index_var: StringType;
|
|
2047
|
+
readonly values: ArrayType<IntegerType>;
|
|
2048
|
+
readonly target_var: StringType;
|
|
2049
|
+
}>;
|
|
2050
|
+
readonly no_overlap: StructType<{
|
|
2051
|
+
readonly intervals: ArrayType<StringType>;
|
|
2052
|
+
}>;
|
|
2053
|
+
readonly cumulative: StructType<{
|
|
2054
|
+
readonly intervals: ArrayType<StringType>;
|
|
2055
|
+
readonly demands: ArrayType<IntegerType>;
|
|
2056
|
+
readonly capacity: IntegerType;
|
|
2057
|
+
}>;
|
|
2058
|
+
readonly circuit: StructType<{
|
|
2059
|
+
readonly arcs: ArrayType<StructType<{
|
|
2060
|
+
readonly tail: IntegerType;
|
|
2061
|
+
readonly head: IntegerType;
|
|
2062
|
+
readonly literal: StringType;
|
|
2063
|
+
}>>;
|
|
2064
|
+
}>;
|
|
2065
|
+
}>;
|
|
2066
|
+
readonly CpSatObjectiveType: VariantType<{
|
|
2067
|
+
readonly minimize: StructType<{
|
|
2068
|
+
readonly terms: ArrayType<StructType<{
|
|
2069
|
+
readonly var: StringType;
|
|
2070
|
+
readonly coeff: IntegerType;
|
|
2071
|
+
}>>;
|
|
2072
|
+
readonly constant: IntegerType;
|
|
2073
|
+
}>;
|
|
2074
|
+
readonly maximize: StructType<{
|
|
2075
|
+
readonly terms: ArrayType<StructType<{
|
|
2076
|
+
readonly var: StringType;
|
|
2077
|
+
readonly coeff: IntegerType;
|
|
2078
|
+
}>>;
|
|
2079
|
+
readonly constant: IntegerType;
|
|
2080
|
+
}>;
|
|
2081
|
+
}>;
|
|
2082
|
+
readonly CpSatModelType: StructType<{
|
|
2083
|
+
readonly int_vars: ArrayType<StructType<{
|
|
2084
|
+
readonly name: StringType;
|
|
2085
|
+
readonly lower_bound: IntegerType;
|
|
2086
|
+
readonly upper_bound: IntegerType;
|
|
2087
|
+
}>>;
|
|
2088
|
+
readonly bool_vars: ArrayType<StructType<{
|
|
2089
|
+
readonly name: StringType;
|
|
2090
|
+
}>>;
|
|
2091
|
+
readonly interval_vars: ArrayType<StructType<{
|
|
2092
|
+
readonly name: StringType;
|
|
2093
|
+
readonly start: StringType;
|
|
2094
|
+
readonly size: StringType;
|
|
2095
|
+
readonly end: StringType;
|
|
2096
|
+
readonly is_present: OptionType<StringType>;
|
|
2097
|
+
}>>;
|
|
2098
|
+
readonly constraints: ArrayType<VariantType<{
|
|
2099
|
+
readonly linear: StructType<{
|
|
2100
|
+
readonly expr: StructType<{
|
|
2101
|
+
readonly terms: ArrayType<StructType<{
|
|
2102
|
+
readonly var: StringType;
|
|
2103
|
+
readonly coeff: IntegerType;
|
|
2104
|
+
}>>;
|
|
2105
|
+
readonly constant: IntegerType;
|
|
2106
|
+
}>;
|
|
2107
|
+
readonly op: VariantType<{
|
|
2108
|
+
readonly equal: NullType;
|
|
2109
|
+
readonly not_equal: NullType;
|
|
2110
|
+
readonly less_equal: NullType;
|
|
2111
|
+
readonly greater_equal: NullType;
|
|
2112
|
+
}>;
|
|
2113
|
+
readonly rhs: IntegerType;
|
|
2114
|
+
}>;
|
|
2115
|
+
readonly bool_or: StructType<{
|
|
2116
|
+
readonly literals: ArrayType<StructType<{
|
|
2117
|
+
readonly var: StringType;
|
|
2118
|
+
readonly negated: BooleanType;
|
|
2119
|
+
}>>;
|
|
2120
|
+
}>;
|
|
2121
|
+
readonly bool_and: StructType<{
|
|
2122
|
+
readonly literals: ArrayType<StructType<{
|
|
2123
|
+
readonly var: StringType;
|
|
2124
|
+
readonly negated: BooleanType;
|
|
2125
|
+
}>>;
|
|
2126
|
+
}>;
|
|
2127
|
+
readonly implication: StructType<{
|
|
2128
|
+
readonly if_literal: StructType<{
|
|
2129
|
+
readonly var: StringType;
|
|
2130
|
+
readonly negated: BooleanType;
|
|
2131
|
+
}>;
|
|
2132
|
+
readonly then_literal: StructType<{
|
|
2133
|
+
readonly var: StringType;
|
|
2134
|
+
readonly negated: BooleanType;
|
|
2135
|
+
}>;
|
|
2136
|
+
}>;
|
|
2137
|
+
readonly exactly_k: StructType<{
|
|
2138
|
+
readonly vars: ArrayType<StringType>;
|
|
2139
|
+
readonly k: IntegerType;
|
|
2140
|
+
}>;
|
|
2141
|
+
readonly at_most_k: StructType<{
|
|
2142
|
+
readonly vars: ArrayType<StringType>;
|
|
2143
|
+
readonly k: IntegerType;
|
|
2144
|
+
}>;
|
|
2145
|
+
readonly at_least_k: StructType<{
|
|
2146
|
+
readonly vars: ArrayType<StringType>;
|
|
2147
|
+
readonly k: IntegerType;
|
|
2148
|
+
}>;
|
|
2149
|
+
readonly all_different: StructType<{
|
|
2150
|
+
readonly vars: ArrayType<StringType>;
|
|
2151
|
+
}>;
|
|
2152
|
+
readonly element: StructType<{
|
|
2153
|
+
readonly index_var: StringType;
|
|
2154
|
+
readonly values: ArrayType<IntegerType>;
|
|
2155
|
+
readonly target_var: StringType;
|
|
2156
|
+
}>;
|
|
2157
|
+
readonly no_overlap: StructType<{
|
|
2158
|
+
readonly intervals: ArrayType<StringType>;
|
|
2159
|
+
}>;
|
|
2160
|
+
readonly cumulative: StructType<{
|
|
2161
|
+
readonly intervals: ArrayType<StringType>;
|
|
2162
|
+
readonly demands: ArrayType<IntegerType>;
|
|
2163
|
+
readonly capacity: IntegerType;
|
|
2164
|
+
}>;
|
|
2165
|
+
readonly circuit: StructType<{
|
|
2166
|
+
readonly arcs: ArrayType<StructType<{
|
|
2167
|
+
readonly tail: IntegerType;
|
|
2168
|
+
readonly head: IntegerType;
|
|
2169
|
+
readonly literal: StringType;
|
|
2170
|
+
}>>;
|
|
2171
|
+
}>;
|
|
2172
|
+
}>>;
|
|
2173
|
+
readonly objective: OptionType<VariantType<{
|
|
2174
|
+
readonly minimize: StructType<{
|
|
2175
|
+
readonly terms: ArrayType<StructType<{
|
|
2176
|
+
readonly var: StringType;
|
|
2177
|
+
readonly coeff: IntegerType;
|
|
2178
|
+
}>>;
|
|
2179
|
+
readonly constant: IntegerType;
|
|
2180
|
+
}>;
|
|
2181
|
+
readonly maximize: StructType<{
|
|
2182
|
+
readonly terms: ArrayType<StructType<{
|
|
2183
|
+
readonly var: StringType;
|
|
2184
|
+
readonly coeff: IntegerType;
|
|
2185
|
+
}>>;
|
|
2186
|
+
readonly constant: IntegerType;
|
|
2187
|
+
}>;
|
|
2188
|
+
}>>;
|
|
2189
|
+
}>;
|
|
2190
|
+
readonly CpSatConfigType: StructType<{
|
|
2191
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
2192
|
+
readonly num_workers: OptionType<IntegerType>;
|
|
2193
|
+
readonly log_search_progress: OptionType<BooleanType>;
|
|
2194
|
+
readonly seed: OptionType<IntegerType>;
|
|
2195
|
+
readonly max_solutions: OptionType<IntegerType>;
|
|
2196
|
+
}>;
|
|
2197
|
+
readonly CpSatResultType: StructType<{
|
|
2198
|
+
readonly status: VariantType<{
|
|
2199
|
+
readonly optimal: NullType;
|
|
2200
|
+
readonly feasible: NullType;
|
|
2201
|
+
readonly infeasible: NullType;
|
|
2202
|
+
readonly not_solved: NullType;
|
|
2203
|
+
readonly model_invalid: NullType;
|
|
2204
|
+
}>;
|
|
2205
|
+
readonly objective_value: OptionType<FloatType>;
|
|
2206
|
+
readonly assignments: DictType<StringType, IntegerType>;
|
|
2207
|
+
readonly wall_time: FloatType;
|
|
2208
|
+
}>;
|
|
2209
|
+
readonly RoutingFirstSolutionType: VariantType<{
|
|
2210
|
+
readonly path_cheapest_arc: NullType;
|
|
2211
|
+
readonly savings: NullType;
|
|
2212
|
+
readonly christofides: NullType;
|
|
2213
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
2214
|
+
readonly local_cheapest_insertion: NullType;
|
|
2215
|
+
readonly first_unbound_min_value: NullType;
|
|
2216
|
+
}>;
|
|
2217
|
+
readonly RoutingMetaheuristicType: VariantType<{
|
|
2218
|
+
readonly greedy_descent: NullType;
|
|
2219
|
+
readonly guided_local_search: NullType;
|
|
2220
|
+
readonly simulated_annealing: NullType;
|
|
2221
|
+
readonly tabu_search: NullType;
|
|
2222
|
+
}>;
|
|
2223
|
+
readonly RoutingTimeWindowType: StructType<{
|
|
2224
|
+
readonly start: IntegerType;
|
|
2225
|
+
readonly end: IntegerType;
|
|
2226
|
+
}>;
|
|
2227
|
+
readonly RoutingPickupDeliveryType: StructType<{
|
|
2228
|
+
readonly pickup: IntegerType;
|
|
2229
|
+
readonly delivery: IntegerType;
|
|
2230
|
+
}>;
|
|
2231
|
+
readonly RoutingModelType: StructType<{
|
|
2232
|
+
readonly distance_matrix: ArrayType<ArrayType<IntegerType>>;
|
|
2233
|
+
readonly num_vehicles: IntegerType;
|
|
2234
|
+
readonly depot: IntegerType;
|
|
2235
|
+
readonly demands: OptionType<ArrayType<IntegerType>>;
|
|
2236
|
+
readonly vehicle_capacities: OptionType<ArrayType<IntegerType>>;
|
|
2237
|
+
readonly time_matrix: OptionType<ArrayType<ArrayType<IntegerType>>>;
|
|
2238
|
+
readonly time_windows: OptionType<ArrayType<StructType<{
|
|
2239
|
+
readonly start: IntegerType;
|
|
2240
|
+
readonly end: IntegerType;
|
|
2241
|
+
}>>>;
|
|
2242
|
+
readonly pickup_deliveries: OptionType<ArrayType<StructType<{
|
|
2243
|
+
readonly pickup: IntegerType;
|
|
2244
|
+
readonly delivery: IntegerType;
|
|
2245
|
+
}>>>;
|
|
2246
|
+
}>;
|
|
2247
|
+
readonly RoutingConfigType: StructType<{
|
|
2248
|
+
readonly first_solution: OptionType<VariantType<{
|
|
2249
|
+
readonly path_cheapest_arc: NullType;
|
|
2250
|
+
readonly savings: NullType;
|
|
2251
|
+
readonly christofides: NullType;
|
|
2252
|
+
readonly parallel_cheapest_insertion: NullType;
|
|
2253
|
+
readonly local_cheapest_insertion: NullType;
|
|
2254
|
+
readonly first_unbound_min_value: NullType;
|
|
2255
|
+
}>>;
|
|
2256
|
+
readonly metaheuristic: OptionType<VariantType<{
|
|
2257
|
+
readonly greedy_descent: NullType;
|
|
2258
|
+
readonly guided_local_search: NullType;
|
|
2259
|
+
readonly simulated_annealing: NullType;
|
|
2260
|
+
readonly tabu_search: NullType;
|
|
2261
|
+
}>>;
|
|
2262
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
2263
|
+
}>;
|
|
2264
|
+
readonly RoutingRouteType: StructType<{
|
|
2265
|
+
readonly vehicle: IntegerType;
|
|
2266
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
2267
|
+
readonly distance: IntegerType;
|
|
2268
|
+
}>;
|
|
2269
|
+
readonly RoutingResultType: StructType<{
|
|
2270
|
+
readonly status: VariantType<{
|
|
2271
|
+
readonly optimal: NullType;
|
|
2272
|
+
readonly feasible: NullType;
|
|
2273
|
+
readonly infeasible: NullType;
|
|
2274
|
+
readonly not_solved: NullType;
|
|
2275
|
+
readonly model_invalid: NullType;
|
|
2276
|
+
}>;
|
|
2277
|
+
readonly total_distance: IntegerType;
|
|
2278
|
+
readonly routes: ArrayType<StructType<{
|
|
2279
|
+
readonly vehicle: IntegerType;
|
|
2280
|
+
readonly nodes: ArrayType<IntegerType>;
|
|
2281
|
+
readonly distance: IntegerType;
|
|
2282
|
+
}>>;
|
|
2283
|
+
readonly wall_time: FloatType;
|
|
2284
|
+
}>;
|
|
2285
|
+
readonly LinearVarType: StructType<{
|
|
2286
|
+
readonly name: StringType;
|
|
2287
|
+
readonly lower_bound: FloatType;
|
|
2288
|
+
readonly upper_bound: FloatType;
|
|
2289
|
+
readonly is_integer: BooleanType;
|
|
2290
|
+
}>;
|
|
2291
|
+
readonly LinearTermType: StructType<{
|
|
2292
|
+
readonly var: StringType;
|
|
2293
|
+
readonly coeff: FloatType;
|
|
2294
|
+
}>;
|
|
2295
|
+
readonly LinearConstraintDefType: StructType<{
|
|
2296
|
+
readonly terms: ArrayType<StructType<{
|
|
2297
|
+
readonly var: StringType;
|
|
2298
|
+
readonly coeff: FloatType;
|
|
2299
|
+
}>>;
|
|
2300
|
+
readonly lower_bound: FloatType;
|
|
2301
|
+
readonly upper_bound: FloatType;
|
|
2302
|
+
}>;
|
|
2303
|
+
readonly LinearObjectiveType: StructType<{
|
|
2304
|
+
readonly terms: ArrayType<StructType<{
|
|
2305
|
+
readonly var: StringType;
|
|
2306
|
+
readonly coeff: FloatType;
|
|
2307
|
+
}>>;
|
|
2308
|
+
readonly maximize: BooleanType;
|
|
2309
|
+
}>;
|
|
2310
|
+
readonly LinearModelType: StructType<{
|
|
2311
|
+
readonly variables: ArrayType<StructType<{
|
|
2312
|
+
readonly name: StringType;
|
|
2313
|
+
readonly lower_bound: FloatType;
|
|
2314
|
+
readonly upper_bound: FloatType;
|
|
2315
|
+
readonly is_integer: BooleanType;
|
|
2316
|
+
}>>;
|
|
2317
|
+
readonly constraints: ArrayType<StructType<{
|
|
2318
|
+
readonly terms: ArrayType<StructType<{
|
|
2319
|
+
readonly var: StringType;
|
|
2320
|
+
readonly coeff: FloatType;
|
|
2321
|
+
}>>;
|
|
2322
|
+
readonly lower_bound: FloatType;
|
|
2323
|
+
readonly upper_bound: FloatType;
|
|
2324
|
+
}>>;
|
|
2325
|
+
readonly objective: StructType<{
|
|
2326
|
+
readonly terms: ArrayType<StructType<{
|
|
2327
|
+
readonly var: StringType;
|
|
2328
|
+
readonly coeff: FloatType;
|
|
2329
|
+
}>>;
|
|
2330
|
+
readonly maximize: BooleanType;
|
|
2331
|
+
}>;
|
|
2332
|
+
}>;
|
|
2333
|
+
readonly LinearSolverType: VariantType<{
|
|
2334
|
+
readonly glop: NullType;
|
|
2335
|
+
readonly scip: NullType;
|
|
2336
|
+
readonly highs: NullType;
|
|
2337
|
+
}>;
|
|
2338
|
+
readonly LinearConfigType: StructType<{
|
|
2339
|
+
readonly solver: OptionType<VariantType<{
|
|
2340
|
+
readonly glop: NullType;
|
|
2341
|
+
readonly scip: NullType;
|
|
2342
|
+
readonly highs: NullType;
|
|
2343
|
+
}>>;
|
|
2344
|
+
readonly max_time_seconds: OptionType<FloatType>;
|
|
2345
|
+
}>;
|
|
2346
|
+
readonly LinearResultType: StructType<{
|
|
2347
|
+
readonly status: VariantType<{
|
|
2348
|
+
readonly optimal: NullType;
|
|
2349
|
+
readonly feasible: NullType;
|
|
2350
|
+
readonly infeasible: NullType;
|
|
2351
|
+
readonly not_solved: NullType;
|
|
2352
|
+
readonly model_invalid: NullType;
|
|
2353
|
+
}>;
|
|
2354
|
+
readonly objective_value: OptionType<FloatType>;
|
|
2355
|
+
readonly assignments: DictType<StringType, FloatType>;
|
|
2356
|
+
readonly wall_time: FloatType;
|
|
2357
|
+
}>;
|
|
2358
|
+
readonly MinCostFlowInputType: StructType<{
|
|
2359
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
2360
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
2361
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
2362
|
+
readonly unit_costs: ArrayType<IntegerType>;
|
|
2363
|
+
readonly supplies: ArrayType<IntegerType>;
|
|
2364
|
+
}>;
|
|
2365
|
+
readonly MinCostFlowResultType: StructType<{
|
|
2366
|
+
readonly status: VariantType<{
|
|
2367
|
+
readonly optimal: NullType;
|
|
2368
|
+
readonly feasible: NullType;
|
|
2369
|
+
readonly infeasible: NullType;
|
|
2370
|
+
readonly not_solved: NullType;
|
|
2371
|
+
readonly model_invalid: NullType;
|
|
2372
|
+
}>;
|
|
2373
|
+
readonly total_cost: IntegerType;
|
|
2374
|
+
readonly flows: ArrayType<IntegerType>;
|
|
2375
|
+
readonly wall_time: FloatType;
|
|
2376
|
+
}>;
|
|
2377
|
+
readonly MaxFlowInputType: StructType<{
|
|
2378
|
+
readonly start_nodes: ArrayType<IntegerType>;
|
|
2379
|
+
readonly end_nodes: ArrayType<IntegerType>;
|
|
2380
|
+
readonly capacities: ArrayType<IntegerType>;
|
|
2381
|
+
readonly source: IntegerType;
|
|
2382
|
+
readonly sink: IntegerType;
|
|
2383
|
+
}>;
|
|
2384
|
+
readonly MaxFlowResultType: StructType<{
|
|
2385
|
+
readonly status: VariantType<{
|
|
2386
|
+
readonly optimal: NullType;
|
|
2387
|
+
readonly feasible: NullType;
|
|
2388
|
+
readonly infeasible: NullType;
|
|
2389
|
+
readonly not_solved: NullType;
|
|
2390
|
+
readonly model_invalid: NullType;
|
|
2391
|
+
}>;
|
|
2392
|
+
readonly total_flow: IntegerType;
|
|
2393
|
+
readonly flows: ArrayType<IntegerType>;
|
|
2394
|
+
readonly wall_time: FloatType;
|
|
2395
|
+
}>;
|
|
2396
|
+
readonly AssignmentInputType: StructType<{
|
|
2397
|
+
readonly costs: ArrayType<ArrayType<IntegerType>>;
|
|
2398
|
+
}>;
|
|
2399
|
+
readonly AssignmentMatchType: StructType<{
|
|
2400
|
+
readonly worker: IntegerType;
|
|
2401
|
+
readonly task: IntegerType;
|
|
2402
|
+
readonly cost: IntegerType;
|
|
2403
|
+
}>;
|
|
2404
|
+
readonly AssignmentResultType: StructType<{
|
|
2405
|
+
readonly status: VariantType<{
|
|
2406
|
+
readonly optimal: NullType;
|
|
2407
|
+
readonly feasible: NullType;
|
|
2408
|
+
readonly infeasible: NullType;
|
|
2409
|
+
readonly not_solved: NullType;
|
|
2410
|
+
readonly model_invalid: NullType;
|
|
2411
|
+
}>;
|
|
2412
|
+
readonly total_cost: IntegerType;
|
|
2413
|
+
readonly assignments: ArrayType<StructType<{
|
|
2414
|
+
readonly worker: IntegerType;
|
|
2415
|
+
readonly task: IntegerType;
|
|
2416
|
+
readonly cost: IntegerType;
|
|
2417
|
+
}>>;
|
|
2418
|
+
readonly wall_time: FloatType;
|
|
2419
|
+
}>;
|
|
2420
|
+
};
|
|
2421
|
+
};
|
|
2422
|
+
//# sourceMappingURL=google_or.d.ts.map
|