@jetta/cargo-stabilizer 0.1.0-12 → 0.1.0-15
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/CHANGELOG.md +11 -2
- package/README.md +15 -10
- package/build/core/adapters/axle_adapter.d.ts +1 -0
- package/build/core/adapters/axle_adapter.d.ts.map +1 -1
- package/build/core/adapters/axle_adapter.js +3 -22
- package/build/core/adapters/axle_load_evaluation.d.ts +8 -0
- package/build/core/adapters/axle_load_evaluation.d.ts.map +1 -0
- package/build/core/adapters/axle_load_evaluation.js +1 -0
- package/build/core/adapters/build_axle_request.d.ts +2 -9
- package/build/core/adapters/build_axle_request.d.ts.map +1 -1
- package/build/core/adapters/build_axle_request.js +52 -24
- package/build/core/adapters/compute_axle_excess_kg.d.ts +8 -0
- package/build/core/adapters/compute_axle_excess_kg.d.ts.map +1 -0
- package/build/core/adapters/compute_axle_excess_kg.js +19 -0
- package/build/core/adapters/coordinate_mapper.d.ts +1 -1
- package/build/core/adapters/coordinate_mapper.js +3 -3
- package/build/core/adapters/evaluate_axle_load.d.ts +10 -0
- package/build/core/adapters/evaluate_axle_load.d.ts.map +1 -0
- package/build/core/adapters/evaluate_axle_load.js +32 -0
- package/build/core/adapters/map_item_to_stacking_item.d.ts +14 -0
- package/build/core/adapters/map_item_to_stacking_item.d.ts.map +1 -0
- package/build/core/adapters/map_item_to_stacking_item.js +40 -0
- package/build/core/adapters/run_axle_calculator.d.ts.map +1 -1
- package/build/core/adapters/run_axle_calculator.js +21 -16
- package/build/core/candidates/candidate_validation.d.ts.map +1 -1
- package/build/core/candidates/candidate_validation.js +4 -0
- package/build/core/candidates/is_candidate_stacking_valid.d.ts +14 -0
- package/build/core/candidates/is_candidate_stacking_valid.d.ts.map +1 -0
- package/build/core/candidates/is_candidate_stacking_valid.js +43 -0
- package/build/core/evaluation/compare_search_states.d.ts +12 -0
- package/build/core/evaluation/compare_search_states.d.ts.map +1 -0
- package/build/core/evaluation/compare_search_states.js +12 -0
- package/build/core/evaluation/evaluate_search_gates.d.ts +18 -0
- package/build/core/evaluation/evaluate_search_gates.d.ts.map +1 -0
- package/build/core/evaluation/evaluate_search_gates.js +30 -0
- package/build/core/evaluation/evaluation_result.d.ts +15 -0
- package/build/core/evaluation/evaluation_result.d.ts.map +1 -0
- package/build/core/evaluation/evaluation_result.js +1 -0
- package/build/core/evaluation/genetic_fitness.d.ts +9 -0
- package/build/core/evaluation/genetic_fitness.d.ts.map +1 -0
- package/build/core/evaluation/genetic_fitness.js +16 -0
- package/build/core/evaluation/is_non_axle_gates_pass.d.ts +8 -0
- package/build/core/evaluation/is_non_axle_gates_pass.d.ts.map +1 -0
- package/build/core/evaluation/is_non_axle_gates_pass.js +8 -0
- package/build/core/evaluation/is_search_trial_admissible.d.ts +10 -0
- package/build/core/evaluation/is_search_trial_admissible.d.ts.map +1 -0
- package/build/core/evaluation/is_search_trial_admissible.js +17 -0
- package/build/core/evaluation/is_waypoint_order_valid.d.ts +10 -0
- package/build/core/evaluation/is_waypoint_order_valid.d.ts.map +1 -0
- package/build/core/evaluation/is_waypoint_order_valid.js +14 -0
- package/build/core/evaluation/state_evaluator.d.ts +2 -10
- package/build/core/evaluation/state_evaluator.d.ts.map +1 -1
- package/build/core/evaluation/state_evaluator.js +6 -26
- package/build/core/factory/read_stabilizer_config.d.ts +3 -2
- package/build/core/factory/read_stabilizer_config.d.ts.map +1 -1
- package/build/core/factory/read_stabilizer_config_helpers.d.ts +5 -2
- package/build/core/factory/read_stabilizer_config_helpers.d.ts.map +1 -1
- package/build/core/filters/collect_pinned_floor_tie_ratio_group_ids.js +1 -1
- package/build/core/filters/is_item_on_cm_floor.d.ts +2 -2
- package/build/core/filters/is_item_on_cm_floor.js +3 -3
- package/build/core/geometry/has_penetrating_overlap.d.ts +2 -2
- package/build/core/geometry/has_penetrating_overlap.d.ts.map +1 -1
- package/build/core/geometry/has_penetrating_overlap.js +6 -6
- package/build/core/orchestration/StabilizerFlow.d.ts.map +1 -1
- package/build/core/orchestration/StabilizerFlow.js +1 -1
- package/build/core/strategies/reorder/BeamSearchReorder.d.ts.map +1 -1
- package/build/core/strategies/reorder/BeamSearchReorder.js +8 -10
- package/build/core/strategies/reorder/GeneticReorder.d.ts.map +1 -1
- package/build/core/strategies/reorder/GeneticReorder.js +2 -1
- package/build/core/strategies/reorder/SimulatedAnnealingReorder.d.ts.map +1 -1
- package/build/core/strategies/reorder/SimulatedAnnealingReorder.js +14 -5
- package/build/core/strategies/reorder/append_admitted_trial.d.ts +11 -0
- package/build/core/strategies/reorder/append_admitted_trial.d.ts.map +1 -0
- package/build/core/strategies/reorder/append_admitted_trial.js +22 -0
- package/build/core/strategies/reorder/beam_context.d.ts +1 -0
- package/build/core/strategies/reorder/beam_context.d.ts.map +1 -1
- package/build/core/strategies/reorder/greedy_improvement.d.ts.map +1 -1
- package/build/core/strategies/reorder/greedy_improvement.js +3 -2
- package/build/core/strategies/reorder/is_improving_greedy_trial.d.ts +10 -0
- package/build/core/strategies/reorder/is_improving_greedy_trial.d.ts.map +1 -0
- package/build/core/strategies/reorder/is_improving_greedy_trial.js +17 -0
- package/build/core/strategies/reorder/select_surviving_beam.d.ts +3 -2
- package/build/core/strategies/reorder/select_surviving_beam.d.ts.map +1 -1
- package/build/core/strategies/reorder/select_surviving_beam.js +5 -4
- package/build/core/validation/contract/cargo_movement_wire_field_map.d.ts +37 -3
- package/build/core/validation/contract/cargo_movement_wire_field_map.d.ts.map +1 -1
- package/build/core/validation/contract/cargo_movement_wire_field_map.js +40 -6
- package/build/core/validation/contract/cargo_movement_wire_mapper.d.ts.map +1 -1
- package/build/core/validation/contract/cargo_movement_wire_mapper.js +10 -1
- package/build/core/validation/contract/map_contract_to_wire_shape.d.ts.map +1 -1
- package/build/core/validation/contract/map_contract_to_wire_shape.js +12 -21
- package/build/core/validation/contract/map_input_config.d.ts +9 -0
- package/build/core/validation/contract/map_input_config.d.ts.map +1 -0
- package/build/core/validation/contract/map_input_config.js +40 -0
- package/build/core/validation/contract/map_wire_input_to_contract_shape.d.ts.map +1 -1
- package/build/core/validation/contract/map_wire_input_to_contract_shape.js +28 -22
- package/build/core/validation/contract/map_wire_item_stacking.d.ts +7 -0
- package/build/core/validation/contract/map_wire_item_stacking.d.ts.map +1 -0
- package/build/core/validation/contract/map_wire_item_stacking.js +40 -0
- package/build/core/validation/contract/map_wire_item_to_contract.d.ts +1 -5
- package/build/core/validation/contract/map_wire_item_to_contract.d.ts.map +1 -1
- package/build/core/validation/contract/map_wire_item_to_contract.js +16 -14
- package/build/core/validation/contract/parse_stabilizer_input.d.ts +49 -7
- package/build/core/validation/contract/parse_stabilizer_input.d.ts.map +1 -1
- package/build/core/validation/contract/parse_stabilizer_input.js +2 -0
- package/build/core/validation/contract/parse_stabilizer_output.d.ts +34 -5
- package/build/core/validation/contract/parse_stabilizer_output.d.ts.map +1 -1
- package/build/core/validation/contract/reject_forbidden_input_fields.d.ts +6 -0
- package/build/core/validation/contract/reject_forbidden_input_fields.d.ts.map +1 -0
- package/build/core/validation/contract/reject_forbidden_input_fields.js +53 -0
- package/build/core/validation/contract/stabilizer_domain_schema.d.ts +36 -65
- package/build/core/validation/contract/stabilizer_domain_schema.d.ts.map +1 -1
- package/build/core/validation/contract/stabilizer_domain_schema.js +16 -38
- package/build/core/validation/contract/stabilizer_env_schema.d.ts +112 -0
- package/build/core/validation/contract/stabilizer_env_schema.d.ts.map +1 -0
- package/build/core/validation/contract/stabilizer_env_schema.js +38 -0
- package/build/core/validation/contract/stabilizer_input_schema.d.ts +51 -7
- package/build/core/validation/contract/stabilizer_input_schema.d.ts.map +1 -1
- package/build/core/validation/contract/stabilizer_input_schema.js +2 -2
- package/build/core/validation/contract/stabilizer_item_schema.d.ts +25 -0
- package/build/core/validation/contract/stabilizer_item_schema.d.ts.map +1 -0
- package/build/core/validation/contract/stabilizer_item_schema.js +23 -0
- package/build/core/validation/contract/stabilizer_output_schema.d.ts +68 -10
- package/build/core/validation/contract/stabilizer_output_schema.d.ts.map +1 -1
- package/build/core/validation/contract/uniquify_contract_item_ids.d.ts +14 -0
- package/build/core/validation/contract/uniquify_contract_item_ids.d.ts.map +1 -0
- package/build/core/validation/contract/uniquify_contract_item_ids.js +54 -0
- package/build/core/validation/schemas/stabilizer_config_schema.d.ts +1 -1
- package/build/core/validation/schemas/stabilizer_config_schema.d.ts.map +1 -1
- package/build/core/validation/schemas/stabilizer_config_schema.js +1 -1
- package/build/index.d.ts +11 -12
- package/build/index.d.ts.map +1 -1
- package/build/index.js +29 -21
- package/package.json +12 -10
|
@@ -23,20 +23,62 @@ export declare function safe_parse_stabilizer_input(input_data: unknown): import
|
|
|
23
23
|
group_id?: string | null | undefined;
|
|
24
24
|
waypoint_id?: string | undefined;
|
|
25
25
|
weight?: number | undefined;
|
|
26
|
-
|
|
26
|
+
tie_ratio_orientation?: string | undefined;
|
|
27
|
+
family?: string | undefined;
|
|
28
|
+
supported_families?: string[] | undefined;
|
|
29
|
+
constraint?: string | undefined;
|
|
30
|
+
stack_families?: boolean | undefined;
|
|
31
|
+
stack_same_item?: boolean | undefined;
|
|
32
|
+
stack_same_area?: boolean | undefined;
|
|
33
|
+
stacking_unit?: string | undefined;
|
|
34
|
+
supported_weight?: number | undefined;
|
|
35
|
+
priority?: number | undefined;
|
|
27
36
|
}[];
|
|
28
37
|
sequence?: number | undefined;
|
|
29
|
-
|
|
38
|
+
kingpin_distance?: number | undefined;
|
|
39
|
+
container_distance_ahead?: number | undefined;
|
|
40
|
+
max_supported_weight?: number | undefined;
|
|
41
|
+
tare?: number | undefined;
|
|
42
|
+
cargo_weight?: number | undefined;
|
|
43
|
+
grouper?: number | undefined;
|
|
30
44
|
}[];
|
|
31
|
-
axles?:
|
|
32
|
-
|
|
45
|
+
axles?: {
|
|
46
|
+
distance_from_origin?: number | undefined;
|
|
47
|
+
max_supported_weight?: number | undefined;
|
|
48
|
+
dnit_weight?: number | undefined;
|
|
49
|
+
tare?: number | undefined;
|
|
50
|
+
container_sequence?: number | undefined;
|
|
51
|
+
sequence?: number | undefined;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
vehicle?: {
|
|
54
|
+
vehicle_id?: string | number | undefined;
|
|
55
|
+
vehicle_type?: number | undefined;
|
|
56
|
+
version_type?: number | undefined;
|
|
57
|
+
suspension_type?: string | undefined;
|
|
58
|
+
first_axle?: number | undefined;
|
|
59
|
+
tare?: number | undefined;
|
|
60
|
+
max_supported_weight?: number | undefined;
|
|
61
|
+
quantity?: number | undefined;
|
|
62
|
+
} | undefined;
|
|
33
63
|
}[];
|
|
34
|
-
config?: Record<string, unknown> | undefined;
|
|
35
64
|
};
|
|
36
65
|
id?: string | number | undefined;
|
|
37
66
|
company?: string | number | undefined;
|
|
38
|
-
|
|
39
|
-
|
|
67
|
+
config?: {
|
|
68
|
+
reorder_strategy: string;
|
|
69
|
+
transport_stability_floor: number;
|
|
70
|
+
max_iteration: number;
|
|
71
|
+
genetic_population: number;
|
|
72
|
+
genetic_generations: number;
|
|
73
|
+
genetic_mutation_rate: number;
|
|
74
|
+
beam_width: number;
|
|
75
|
+
beam_top_k: number;
|
|
76
|
+
axle_load_margin_percent: number;
|
|
77
|
+
preserve_tie_block_organization: boolean;
|
|
78
|
+
pin_tie_ratio_blocks: boolean;
|
|
79
|
+
enforce_milkrun_wall_reservation: boolean;
|
|
80
|
+
number_of_wall_to_allocate_from_last_waypoints: number;
|
|
81
|
+
} | undefined;
|
|
40
82
|
}>;
|
|
41
83
|
/**
|
|
42
84
|
* Parses stabilizer input at the public boundary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse_stabilizer_input.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/parse_stabilizer_input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"parse_stabilizer_input.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/parse_stabilizer_input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAE5F;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI9D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,OAAO,GAAG,eAAe,CAU3E;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InvalidStabilizerInputError } from '../../exceptions/InvalidStabilizerInputError.js';
|
|
2
2
|
import { map_wire_input_to_contract } from './cargo_movement_wire_mapper.js';
|
|
3
3
|
import { format_zod_error } from './format_zod_error.js';
|
|
4
|
+
import { reject_forbidden_input_fields } from './reject_forbidden_input_fields.js';
|
|
4
5
|
import { stabilizer_input_schema } from './stabilizer_input_schema.js';
|
|
5
6
|
/**
|
|
6
7
|
* Safely parses stabilizer input after wire mapping.
|
|
@@ -17,6 +18,7 @@ export function safe_parse_stabilizer_input(input_data) {
|
|
|
17
18
|
* @returns Validated stabilizer input in English contract shape.
|
|
18
19
|
*/
|
|
19
20
|
export function parse_stabilizer_input(input_data) {
|
|
21
|
+
reject_forbidden_input_fields(input_data);
|
|
20
22
|
const result = safe_parse_stabilizer_input(input_data);
|
|
21
23
|
if (!result.success) {
|
|
22
24
|
throw new InvalidStabilizerInputError(format_zod_error(result.error));
|
|
@@ -24,15 +24,44 @@ export declare function safe_parse_stabilizer_output(output_data: unknown): impo
|
|
|
24
24
|
group_id?: string | null | undefined;
|
|
25
25
|
waypoint_id?: string | undefined;
|
|
26
26
|
weight?: number | undefined;
|
|
27
|
-
|
|
27
|
+
tie_ratio_orientation?: string | undefined;
|
|
28
|
+
family?: string | undefined;
|
|
29
|
+
supported_families?: string[] | undefined;
|
|
30
|
+
constraint?: string | undefined;
|
|
31
|
+
stack_families?: boolean | undefined;
|
|
32
|
+
stack_same_item?: boolean | undefined;
|
|
33
|
+
stack_same_area?: boolean | undefined;
|
|
34
|
+
stacking_unit?: string | undefined;
|
|
35
|
+
supported_weight?: number | undefined;
|
|
36
|
+
priority?: number | undefined;
|
|
28
37
|
}[];
|
|
29
38
|
sequence?: number | undefined;
|
|
30
|
-
|
|
39
|
+
kingpin_distance?: number | undefined;
|
|
40
|
+
container_distance_ahead?: number | undefined;
|
|
41
|
+
max_supported_weight?: number | undefined;
|
|
42
|
+
tare?: number | undefined;
|
|
43
|
+
cargo_weight?: number | undefined;
|
|
44
|
+
grouper?: number | undefined;
|
|
31
45
|
}[];
|
|
32
|
-
axles?:
|
|
33
|
-
|
|
46
|
+
axles?: {
|
|
47
|
+
distance_from_origin?: number | undefined;
|
|
48
|
+
max_supported_weight?: number | undefined;
|
|
49
|
+
dnit_weight?: number | undefined;
|
|
50
|
+
tare?: number | undefined;
|
|
51
|
+
container_sequence?: number | undefined;
|
|
52
|
+
sequence?: number | undefined;
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
vehicle?: {
|
|
55
|
+
vehicle_id?: string | number | undefined;
|
|
56
|
+
vehicle_type?: number | undefined;
|
|
57
|
+
version_type?: number | undefined;
|
|
58
|
+
suspension_type?: string | undefined;
|
|
59
|
+
first_axle?: number | undefined;
|
|
60
|
+
tare?: number | undefined;
|
|
61
|
+
max_supported_weight?: number | undefined;
|
|
62
|
+
quantity?: number | undefined;
|
|
63
|
+
} | undefined;
|
|
34
64
|
}[];
|
|
35
|
-
config?: Record<string, unknown> | undefined;
|
|
36
65
|
};
|
|
37
66
|
messages: string[];
|
|
38
67
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse_stabilizer_output.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/parse_stabilizer_output.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAEH,KAAK,kBAAkB,EAC1B,MAAM,+BAA+B,CAAA;AAEtC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,OAAO
|
|
1
|
+
{"version":3,"file":"parse_stabilizer_output.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/parse_stabilizer_output.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAEH,KAAK,kBAAkB,EAC1B,MAAM,+BAA+B,CAAA;AAEtC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGhE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,OAAO,GAAG,kBAAkB,CAShF;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rejects dropped contract bags (`original_input`, item `attributes`) before mapping.
|
|
3
|
+
* @param input_data - Raw stabilizer input.
|
|
4
|
+
*/
|
|
5
|
+
export declare function reject_forbidden_input_fields(input_data: unknown): void;
|
|
6
|
+
//# sourceMappingURL=reject_forbidden_input_fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reject_forbidden_input_fields.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/reject_forbidden_input_fields.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAWvE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { InvalidStabilizerInputError } from '../../exceptions/InvalidStabilizerInputError.js';
|
|
2
|
+
/**
|
|
3
|
+
* Rejects dropped contract bags (`original_input`, item `attributes`) before mapping.
|
|
4
|
+
* @param input_data - Raw stabilizer input.
|
|
5
|
+
*/
|
|
6
|
+
export function reject_forbidden_input_fields(input_data) {
|
|
7
|
+
if (typeof input_data !== 'object' || input_data === null) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if ('original_input' in input_data) {
|
|
11
|
+
throw new InvalidStabilizerInputError('original_input is not part of the stabilizer contract');
|
|
12
|
+
}
|
|
13
|
+
reject_item_attributes(input_data);
|
|
14
|
+
}
|
|
15
|
+
function reject_item_attributes(input_data) {
|
|
16
|
+
const cargo_state = input_data.cargo_state;
|
|
17
|
+
if (typeof cargo_state !== 'object' || cargo_state === null) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const envs = cargo_state.envs;
|
|
21
|
+
if (!Array.isArray(envs)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
for (const env of envs) {
|
|
25
|
+
reject_env_item_attributes(env);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function reject_env_item_attributes(env) {
|
|
29
|
+
if (typeof env !== 'object' || env === null) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const containers = env.containers;
|
|
33
|
+
if (!Array.isArray(containers)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
for (const container of containers) {
|
|
37
|
+
reject_container_item_attributes(container);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function reject_container_item_attributes(container) {
|
|
41
|
+
if (typeof container !== 'object' || container === null) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const items = container.items;
|
|
45
|
+
if (!Array.isArray(items)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
for (const item of items) {
|
|
49
|
+
if (typeof item === 'object' && item !== null && 'attributes' in item) {
|
|
50
|
+
throw new InvalidStabilizerInputError('item attributes is not part of the stabilizer contract');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,61 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
group_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
5
|
-
waypoint_id: z.ZodOptional<z.ZodString>;
|
|
6
|
-
x: z.ZodNumber;
|
|
7
|
-
y: z.ZodNumber;
|
|
8
|
-
z: z.ZodNumber;
|
|
9
|
-
width: z.ZodNumber;
|
|
10
|
-
height: z.ZodNumber;
|
|
11
|
-
depth: z.ZodNumber;
|
|
12
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
|
-
export declare const stabilizer_container_schema: z.ZodObject<{
|
|
16
|
-
sequence: z.ZodOptional<z.ZodNumber>;
|
|
17
|
-
width: z.ZodNumber;
|
|
18
|
-
height: z.ZodNumber;
|
|
19
|
-
length: z.ZodNumber;
|
|
20
|
-
items: z.ZodArray<z.ZodObject<{
|
|
21
|
-
item_id: z.ZodString;
|
|
22
|
-
group_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
23
|
-
waypoint_id: z.ZodOptional<z.ZodString>;
|
|
24
|
-
x: z.ZodNumber;
|
|
25
|
-
y: z.ZodNumber;
|
|
26
|
-
z: z.ZodNumber;
|
|
27
|
-
width: z.ZodNumber;
|
|
28
|
-
height: z.ZodNumber;
|
|
29
|
-
depth: z.ZodNumber;
|
|
30
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
32
|
-
}, z.core.$strict>>;
|
|
33
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
34
|
-
}, z.core.$strict>;
|
|
35
|
-
export declare const stabilizer_env_schema: z.ZodObject<{
|
|
36
|
-
containers: z.ZodArray<z.ZodObject<{
|
|
37
|
-
sequence: z.ZodOptional<z.ZodNumber>;
|
|
38
|
-
width: z.ZodNumber;
|
|
39
|
-
height: z.ZodNumber;
|
|
40
|
-
length: z.ZodNumber;
|
|
41
|
-
items: z.ZodArray<z.ZodObject<{
|
|
42
|
-
item_id: z.ZodString;
|
|
43
|
-
group_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
44
|
-
waypoint_id: z.ZodOptional<z.ZodString>;
|
|
45
|
-
x: z.ZodNumber;
|
|
46
|
-
y: z.ZodNumber;
|
|
47
|
-
z: z.ZodNumber;
|
|
48
|
-
width: z.ZodNumber;
|
|
49
|
-
height: z.ZodNumber;
|
|
50
|
-
depth: z.ZodNumber;
|
|
51
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
-
}, z.core.$strict>>;
|
|
54
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
55
|
-
}, z.core.$strict>>;
|
|
56
|
-
axles: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
57
|
-
vehicle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
58
|
-
}, z.core.$strict>;
|
|
2
|
+
export { stabilizer_item_schema, type StabilizerItem } from './stabilizer_item_schema.js';
|
|
3
|
+
export { stabilizer_axle_schema, stabilizer_vehicle_schema, stabilizer_container_schema, stabilizer_env_schema, type StabilizerAxle, type StabilizerVehicle, type StabilizerContainer, type StabilizerEnv } from './stabilizer_env_schema.js';
|
|
59
4
|
export declare const stabilizer_cargo_state_schema: z.ZodObject<{
|
|
60
5
|
envs: z.ZodArray<z.ZodObject<{
|
|
61
6
|
containers: z.ZodArray<z.ZodObject<{
|
|
@@ -74,18 +19,44 @@ export declare const stabilizer_cargo_state_schema: z.ZodObject<{
|
|
|
74
19
|
height: z.ZodNumber;
|
|
75
20
|
depth: z.ZodNumber;
|
|
76
21
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
77
|
-
|
|
22
|
+
tie_ratio_orientation: z.ZodOptional<z.ZodString>;
|
|
23
|
+
family: z.ZodOptional<z.ZodString>;
|
|
24
|
+
supported_families: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
constraint: z.ZodOptional<z.ZodString>;
|
|
26
|
+
stack_families: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
stack_same_item: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
stack_same_area: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
stacking_unit: z.ZodOptional<z.ZodString>;
|
|
30
|
+
supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
78
32
|
}, z.core.$strict>>;
|
|
79
|
-
|
|
33
|
+
kingpin_distance: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
container_distance_ahead: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
cargo_weight: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
grouper: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
axles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
distance_from_origin: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
dnit_weight: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
container_sequence: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
}, z.core.$strict>>>;
|
|
48
|
+
vehicle: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
vehicle_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
50
|
+
vehicle_type: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
version_type: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
suspension_type: z.ZodOptional<z.ZodString>;
|
|
53
|
+
first_axle: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
80
57
|
}, z.core.$strict>>;
|
|
81
|
-
axles: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
82
|
-
vehicle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
83
58
|
}, z.core.$strict>>;
|
|
84
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
85
59
|
}, z.core.$strict>;
|
|
86
|
-
export type StabilizerItem = z.infer<typeof stabilizer_item_schema>;
|
|
87
|
-
export type StabilizerContainer = z.infer<typeof stabilizer_container_schema>;
|
|
88
|
-
export type StabilizerEnv = z.infer<typeof stabilizer_env_schema>;
|
|
89
60
|
export type StabilizerCargoState = z.infer<typeof stabilizer_cargo_state_schema>;
|
|
90
61
|
/**
|
|
91
62
|
* Validates waypoint consistency across all items in the primary env.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stabilizer_domain_schema.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/stabilizer_domain_schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"stabilizer_domain_schema.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/stabilizer_domain_schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EACH,sBAAsB,EACtB,KAAK,cAAc,EACtB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACH,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACrB,MAAM,4BAA4B,CAAA;AAEnC,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAE/B,CAAA;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEhF;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAKtF;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC1C,WAAW,EAAE,oBAAoB,EACjC,OAAO,EAAE,CAAC,CAAC,aAAa,GACzB,IAAI,CAUN"}
|
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MixedWaypointIdError } from '../../exceptions/MixedWaypointIdError.js';
|
|
3
3
|
import { validate_waypoint_ids } from '../../waypoint/validate_waypoint_ids.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
waypoint_id: z.string().optional(),
|
|
8
|
-
x: z.number(),
|
|
9
|
-
y: z.number(),
|
|
10
|
-
z: z.number(),
|
|
11
|
-
width: z.number().positive(),
|
|
12
|
-
height: z.number().positive(),
|
|
13
|
-
depth: z.number().positive(),
|
|
14
|
-
weight: z.number().optional(),
|
|
15
|
-
attributes: z.record(z.string(), z.unknown()).optional()
|
|
16
|
-
}).strict();
|
|
17
|
-
export const stabilizer_container_schema = z.object({
|
|
18
|
-
sequence: z.number().optional(),
|
|
19
|
-
width: z.number().positive(),
|
|
20
|
-
height: z.number().positive(),
|
|
21
|
-
length: z.number().positive(),
|
|
22
|
-
items: z.array(stabilizer_item_schema),
|
|
23
|
-
attributes: z.record(z.string(), z.unknown()).optional()
|
|
24
|
-
}).strict();
|
|
25
|
-
export const stabilizer_env_schema = z.object({
|
|
26
|
-
containers: z.array(stabilizer_container_schema).min(1),
|
|
27
|
-
axles: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
28
|
-
vehicle: z.record(z.string(), z.unknown()).optional()
|
|
29
|
-
}).strict();
|
|
4
|
+
import { stabilizer_env_schema } from './stabilizer_env_schema.js';
|
|
5
|
+
export { stabilizer_item_schema } from './stabilizer_item_schema.js';
|
|
6
|
+
export { stabilizer_axle_schema, stabilizer_vehicle_schema, stabilizer_container_schema, stabilizer_env_schema } from './stabilizer_env_schema.js';
|
|
30
7
|
export const stabilizer_cargo_state_schema = z.object({
|
|
31
|
-
envs: z.array(stabilizer_env_schema).min(1)
|
|
32
|
-
config: z.record(z.string(), z.unknown()).optional()
|
|
8
|
+
envs: z.array(stabilizer_env_schema).min(1)
|
|
33
9
|
}).strict();
|
|
34
10
|
/**
|
|
35
11
|
* Validates waypoint consistency across all items in the primary env.
|
|
@@ -50,15 +26,17 @@ export function add_waypoint_validation_issues(cargo_state, context) {
|
|
|
50
26
|
validate_primary_env_waypoints(cargo_state);
|
|
51
27
|
}
|
|
52
28
|
catch (error) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
29
|
+
add_waypoint_issue_or_throw(error, context);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function add_waypoint_issue_or_throw(error, context) {
|
|
33
|
+
if (error instanceof MixedWaypointIdError) {
|
|
34
|
+
context.addIssue({
|
|
35
|
+
code: 'custom',
|
|
36
|
+
message: error.message,
|
|
37
|
+
path: ['cargo_state', 'envs', 0]
|
|
38
|
+
});
|
|
39
|
+
return;
|
|
63
40
|
}
|
|
41
|
+
throw error;
|
|
64
42
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const stabilizer_axle_schema: z.ZodObject<{
|
|
3
|
+
distance_from_origin: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
dnit_weight: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
container_sequence: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
export declare const stabilizer_vehicle_schema: z.ZodObject<{
|
|
11
|
+
vehicle_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
12
|
+
vehicle_type: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
version_type: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
suspension_type: z.ZodOptional<z.ZodString>;
|
|
15
|
+
first_axle: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export declare const stabilizer_container_schema: z.ZodObject<{
|
|
21
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
width: z.ZodNumber;
|
|
23
|
+
height: z.ZodNumber;
|
|
24
|
+
length: z.ZodNumber;
|
|
25
|
+
items: z.ZodArray<z.ZodObject<{
|
|
26
|
+
item_id: z.ZodString;
|
|
27
|
+
group_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
28
|
+
waypoint_id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
x: z.ZodNumber;
|
|
30
|
+
y: z.ZodNumber;
|
|
31
|
+
z: z.ZodNumber;
|
|
32
|
+
width: z.ZodNumber;
|
|
33
|
+
height: z.ZodNumber;
|
|
34
|
+
depth: z.ZodNumber;
|
|
35
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
tie_ratio_orientation: z.ZodOptional<z.ZodString>;
|
|
37
|
+
family: z.ZodOptional<z.ZodString>;
|
|
38
|
+
supported_families: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
constraint: z.ZodOptional<z.ZodString>;
|
|
40
|
+
stack_families: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
stack_same_item: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
stack_same_area: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
stacking_unit: z.ZodOptional<z.ZodString>;
|
|
44
|
+
supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
kingpin_distance: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
container_distance_ahead: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
cargo_weight: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
grouper: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
export declare const stabilizer_env_schema: z.ZodObject<{
|
|
55
|
+
containers: z.ZodArray<z.ZodObject<{
|
|
56
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
width: z.ZodNumber;
|
|
58
|
+
height: z.ZodNumber;
|
|
59
|
+
length: z.ZodNumber;
|
|
60
|
+
items: z.ZodArray<z.ZodObject<{
|
|
61
|
+
item_id: z.ZodString;
|
|
62
|
+
group_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
63
|
+
waypoint_id: z.ZodOptional<z.ZodString>;
|
|
64
|
+
x: z.ZodNumber;
|
|
65
|
+
y: z.ZodNumber;
|
|
66
|
+
z: z.ZodNumber;
|
|
67
|
+
width: z.ZodNumber;
|
|
68
|
+
height: z.ZodNumber;
|
|
69
|
+
depth: z.ZodNumber;
|
|
70
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
tie_ratio_orientation: z.ZodOptional<z.ZodString>;
|
|
72
|
+
family: z.ZodOptional<z.ZodString>;
|
|
73
|
+
supported_families: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
|
+
constraint: z.ZodOptional<z.ZodString>;
|
|
75
|
+
stack_families: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
stack_same_item: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
stack_same_area: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
stacking_unit: z.ZodOptional<z.ZodString>;
|
|
79
|
+
supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
kingpin_distance: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
container_distance_ahead: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
cargo_weight: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
grouper: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
axles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
90
|
+
distance_from_origin: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
dnit_weight: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
container_sequence: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
}, z.core.$strict>>>;
|
|
97
|
+
vehicle: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
vehicle_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
99
|
+
vehicle_type: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
version_type: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
suspension_type: z.ZodOptional<z.ZodString>;
|
|
102
|
+
first_axle: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
}, z.core.$strict>;
|
|
108
|
+
export type StabilizerAxle = z.infer<typeof stabilizer_axle_schema>;
|
|
109
|
+
export type StabilizerVehicle = z.infer<typeof stabilizer_vehicle_schema>;
|
|
110
|
+
export type StabilizerContainer = z.infer<typeof stabilizer_container_schema>;
|
|
111
|
+
export type StabilizerEnv = z.infer<typeof stabilizer_env_schema>;
|
|
112
|
+
//# sourceMappingURL=stabilizer_env_schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stabilizer_env_schema.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/stabilizer_env_schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,sBAAsB;;;;;;;kBAOxB,CAAA;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;kBAS3B,CAAA;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAY7B,CAAA;AAEX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAIvB,CAAA;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AACzE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAC7E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { stabilizer_item_schema } from './stabilizer_item_schema.js';
|
|
3
|
+
export const stabilizer_axle_schema = z.object({
|
|
4
|
+
distance_from_origin: z.number().optional(),
|
|
5
|
+
max_supported_weight: z.number().optional(),
|
|
6
|
+
dnit_weight: z.number().optional(),
|
|
7
|
+
tare: z.number().optional(),
|
|
8
|
+
container_sequence: z.number().optional(),
|
|
9
|
+
sequence: z.number().optional()
|
|
10
|
+
}).strict();
|
|
11
|
+
export const stabilizer_vehicle_schema = z.object({
|
|
12
|
+
vehicle_id: z.union([z.string(), z.number()]).optional(),
|
|
13
|
+
vehicle_type: z.number().optional(),
|
|
14
|
+
version_type: z.number().optional(),
|
|
15
|
+
suspension_type: z.string().optional(),
|
|
16
|
+
first_axle: z.number().optional(),
|
|
17
|
+
tare: z.number().optional(),
|
|
18
|
+
max_supported_weight: z.number().optional(),
|
|
19
|
+
quantity: z.number().optional()
|
|
20
|
+
}).strict();
|
|
21
|
+
export const stabilizer_container_schema = z.object({
|
|
22
|
+
sequence: z.number().optional(),
|
|
23
|
+
width: z.number().positive(),
|
|
24
|
+
height: z.number().positive(),
|
|
25
|
+
length: z.number().positive(),
|
|
26
|
+
items: z.array(stabilizer_item_schema),
|
|
27
|
+
kingpin_distance: z.number().optional(),
|
|
28
|
+
container_distance_ahead: z.number().optional(),
|
|
29
|
+
max_supported_weight: z.number().optional(),
|
|
30
|
+
tare: z.number().optional(),
|
|
31
|
+
cargo_weight: z.number().optional(),
|
|
32
|
+
grouper: z.number().optional()
|
|
33
|
+
}).strict();
|
|
34
|
+
export const stabilizer_env_schema = z.object({
|
|
35
|
+
containers: z.array(stabilizer_container_schema).min(1),
|
|
36
|
+
axles: z.array(stabilizer_axle_schema).optional(),
|
|
37
|
+
vehicle: stabilizer_vehicle_schema.optional()
|
|
38
|
+
}).strict();
|
|
@@ -20,17 +20,61 @@ export declare const stabilizer_input_schema: z.ZodObject<{
|
|
|
20
20
|
height: z.ZodNumber;
|
|
21
21
|
depth: z.ZodNumber;
|
|
22
22
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
|
|
23
|
+
tie_ratio_orientation: z.ZodOptional<z.ZodString>;
|
|
24
|
+
family: z.ZodOptional<z.ZodString>;
|
|
25
|
+
supported_families: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
constraint: z.ZodOptional<z.ZodString>;
|
|
27
|
+
stack_families: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
stack_same_item: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
stack_same_area: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
stacking_unit: z.ZodOptional<z.ZodString>;
|
|
31
|
+
supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
24
33
|
}, z.core.$strict>>;
|
|
25
|
-
|
|
34
|
+
kingpin_distance: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
container_distance_ahead: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
cargo_weight: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
grouper: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
axles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
distance_from_origin: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
dnit_weight: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
container_sequence: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
}, z.core.$strict>>>;
|
|
49
|
+
vehicle: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
vehicle_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
51
|
+
vehicle_type: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
version_type: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
suspension_type: z.ZodOptional<z.ZodString>;
|
|
54
|
+
first_axle: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
tare: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
max_supported_weight: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
26
58
|
}, z.core.$strict>>;
|
|
27
|
-
axles: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
28
|
-
vehicle: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
59
|
}, z.core.$strict>>;
|
|
30
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
31
60
|
}, z.core.$strict>;
|
|
32
|
-
|
|
33
|
-
|
|
61
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
reorder_strategy: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
[x: string]: string;
|
|
64
|
+
}>>;
|
|
65
|
+
transport_stability_floor: z.ZodDefault<z.ZodNumber>;
|
|
66
|
+
max_iteration: z.ZodDefault<z.ZodNumber>;
|
|
67
|
+
genetic_population: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
genetic_generations: z.ZodDefault<z.ZodNumber>;
|
|
69
|
+
genetic_mutation_rate: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
beam_width: z.ZodDefault<z.ZodNumber>;
|
|
71
|
+
beam_top_k: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
axle_load_margin_percent: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
preserve_tie_block_organization: z.ZodDefault<z.ZodBoolean>;
|
|
74
|
+
pin_tie_ratio_blocks: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
+
enforce_milkrun_wall_reservation: z.ZodDefault<z.ZodBoolean>;
|
|
76
|
+
number_of_wall_to_allocate_from_last_waypoints: z.ZodDefault<z.ZodNumber>;
|
|
77
|
+
}, z.core.$strict>>;
|
|
34
78
|
}, z.core.$strict>;
|
|
35
79
|
export type StabilizerInput = z.infer<typeof stabilizer_input_schema>;
|
|
36
80
|
//# sourceMappingURL=stabilizer_input_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stabilizer_input_schema.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/stabilizer_input_schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"stabilizer_input_schema.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/stabilizer_input_schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQlC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|