@jetta/blocks-allocator 0.2.1-0 → 0.2.1-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/Allocation_Attempt.js +4 -1
- package/src/Allocation_Optimization/Block_Allocator.js +12 -6
- package/src/Allocation_Optimization/block_builder/Block_Wall_Builder.js +8 -1
- package/src/Allocation_Optimization/block_builder/Blocks_Builder.js +3 -1
- package/src/Allocation_Optimization/block_builder/Slot_Item_Assigner.js +4 -2
- package/src/Allocation_Optimization/item_consumption_heuristic/Item_Chooser.js +6 -130
- package/src/Allocation_Optimization/item_consumption_heuristic/Slots_Items_Assigner.js +59 -32
- package/src/Allocation_Optimization/item_consumption_heuristic/assign_one_plan_slot.js +53 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/assert_layout_fits_axle_load.js +26 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/axle_load_exceeds_limit.js +62 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/candidate_item_axle_score.js +42 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/candidate_item_fits_axle_load.js +19 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/clone_env_with_layout_items.js +26 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/evaluate_layout_axle_load.js +63 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/layout_fits_axle_load.js +36 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/axle_load/map_allocated_item_to_axle_wire.js +21 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/select_axle_balanced_slot_item.js +143 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/select_slot_item.js +149 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/slot_candidate_acceptance.js +110 -0
- package/src/Allocation_Optimization/item_consumption_heuristic/slot_candidate_order.js +49 -0
- package/src/models/Cargo_Profile.js +27 -0
- package/src/models/transport/Container.js +11 -0
- package/src/models/transport/Transport.js +12 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const create_container_map = require('./factory/Container_Factory')
|
|
2
|
+
const clone = require('../../tools/Clone')
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* In-memory representation of one transport environment: a map of sequence → container model.
|
|
@@ -6,6 +7,7 @@ const create_container_map = require('./factory/Container_Factory')
|
|
|
6
7
|
class Transport
|
|
7
8
|
{
|
|
8
9
|
#containers = new Map()
|
|
10
|
+
#axle_env_template
|
|
9
11
|
/**
|
|
10
12
|
* @param {object} transport_data - First element shape from `input_data.envs` (includes `containers` array).
|
|
11
13
|
* @param {object|undefined} empty_space_finder_options - Optional merge tolerance for each {@link Container} finder.
|
|
@@ -13,6 +15,16 @@ class Transport
|
|
|
13
15
|
constructor(data)
|
|
14
16
|
{
|
|
15
17
|
this.#containers = create_container_map(data)
|
|
18
|
+
this.#axle_env_template = clone(data.transport_data)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Frozen-at-construction clone of the env JSON used by axle-load physics.
|
|
23
|
+
* @returns {object}
|
|
24
|
+
*/
|
|
25
|
+
get_axle_env_template()
|
|
26
|
+
{
|
|
27
|
+
return this.#axle_env_template
|
|
16
28
|
}
|
|
17
29
|
|
|
18
30
|
/**
|