Load region fixed-row summaries into save slices
This commit is contained in:
parent
9a4dd5d8d4
commit
1f305222b8
5 changed files with 279 additions and 14 deletions
|
|
@ -5784,6 +5784,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
|
|||
|
|
@ -1547,6 +1547,40 @@ fn project_save_slice_components(
|
|||
.to_string(),
|
||||
);
|
||||
}
|
||||
if let Some(summary) = &save_slice.region_fixed_row_run_summary {
|
||||
metadata.insert(
|
||||
"save_slice.region_fixed_row_run_source_kind".to_string(),
|
||||
summary.source_kind.clone(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.region_fixed_row_run_semantic_family".to_string(),
|
||||
summary.semantic_family.clone(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.region_fixed_row_run_candidate_count".to_string(),
|
||||
summary.candidates.len().to_string(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.region_fixed_row_run_target_row_stride_hex".to_string(),
|
||||
summary.target_row_stride_hex.clone(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.region_fixed_row_run_best_rows_offset_hex".to_string(),
|
||||
summary
|
||||
.candidates
|
||||
.first()
|
||||
.map(|candidate| candidate.rows_offset_hex.clone())
|
||||
.unwrap_or_default(),
|
||||
);
|
||||
metadata.insert(
|
||||
"save_slice.region_fixed_row_run_best_shape_signature".to_string(),
|
||||
summary
|
||||
.candidates
|
||||
.first()
|
||||
.map(|candidate| candidate.shape_signature.clone())
|
||||
.unwrap_or_default(),
|
||||
);
|
||||
}
|
||||
|
||||
let named_locomotive_cost = BTreeMap::new();
|
||||
let all_cargo_price_override = None;
|
||||
|
|
@ -5699,6 +5733,37 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
fn save_region_fixed_row_run_summary() -> crate::SmpLoadedRegionFixedRowRunSummary {
|
||||
crate::SmpLoadedRegionFixedRowRunSummary {
|
||||
source_kind: "save-region-fixed-row-run-candidates".to_string(),
|
||||
semantic_family: "scenario-save-region-fixed-row-run-summary".to_string(),
|
||||
target_row_count: 2,
|
||||
target_row_stride: 0xbc,
|
||||
target_row_stride_hex: "0xbc".to_string(),
|
||||
candidates: vec![crate::smp::SmpSaveRegionFixedRowRunCandidate {
|
||||
count_offset: 0x5300,
|
||||
count_offset_hex: "0x5300".to_string(),
|
||||
row_count: 2,
|
||||
row_stride: 0xbc,
|
||||
row_stride_hex: "0xbc".to_string(),
|
||||
rows_offset: 0x5310,
|
||||
rows_offset_hex: "0x5310".to_string(),
|
||||
rows_end_offset: 0x5488,
|
||||
rows_end_offset_hex: "0x5488".to_string(),
|
||||
distance_to_region_metadata_tag: 0x110,
|
||||
distance_to_region_metadata_tag_hex: "0x110".to_string(),
|
||||
dword_lane_summaries: vec![],
|
||||
shape_signature: "dword0:f32,dword1:zero".to_string(),
|
||||
shape_family_signature: "family-a".to_string(),
|
||||
trailing_byte_zero_count: 2,
|
||||
trailing_byte_nonzero_count: 0,
|
||||
trailing_byte_distinct_value_count: 1,
|
||||
trailing_byte_sample_values_hex: vec!["0x00".to_string()],
|
||||
best_probable_density_lane_relative_offset_hex: Some("0x24".to_string()),
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
fn save_chairman_profile_table() -> crate::SmpLoadedChairmanProfileTable {
|
||||
crate::SmpLoadedChairmanProfileTable {
|
||||
source_kind: "tracked-save-slice-chairman-profile-table".to_string(),
|
||||
|
|
@ -6199,6 +6264,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6249,6 +6315,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -6481,6 +6548,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: Some(crate::SmpLoadedSpecialConditionsTable {
|
||||
|
|
@ -7031,6 +7099,7 @@ mod tests {
|
|||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7084,6 +7153,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: Some(save_region_collection()),
|
||||
region_fixed_row_run_summary: Some(save_region_fixed_row_run_summary()),
|
||||
placed_structure_collection: Some(save_placed_structure_collection()),
|
||||
placed_structure_dynamic_side_buffer_summary: Some(
|
||||
save_placed_structure_dynamic_side_buffer_summary(),
|
||||
|
|
@ -7140,6 +7210,38 @@ mod tests {
|
|||
.map(String::as_str),
|
||||
Some("1")
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.metadata
|
||||
.get("save_slice.region_fixed_row_run_source_kind")
|
||||
.map(String::as_str),
|
||||
Some("save-region-fixed-row-run-candidates")
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.metadata
|
||||
.get("save_slice.region_fixed_row_run_candidate_count")
|
||||
.map(String::as_str),
|
||||
Some("1")
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.metadata
|
||||
.get("save_slice.region_fixed_row_run_best_rows_offset_hex")
|
||||
.map(String::as_str),
|
||||
Some("0x5310")
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
.metadata
|
||||
.get("save_slice.region_fixed_row_run_best_shape_signature")
|
||||
.map(String::as_str),
|
||||
Some("dword0:f32,dword1:zero")
|
||||
);
|
||||
assert_eq!(
|
||||
import
|
||||
.state
|
||||
|
|
@ -7257,6 +7359,7 @@ mod tests {
|
|||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7431,6 +7534,7 @@ mod tests {
|
|||
entries: Vec::new(),
|
||||
}),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7483,6 +7587,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7618,6 +7723,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7731,6 +7837,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7870,6 +7977,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -7970,6 +8078,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8138,6 +8247,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8396,6 +8506,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8489,6 +8600,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8606,6 +8718,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8696,6 +8809,7 @@ mod tests {
|
|||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8789,6 +8903,7 @@ mod tests {
|
|||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -8895,6 +9010,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9017,6 +9133,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9110,6 +9227,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9280,6 +9398,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9395,6 +9514,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9487,6 +9607,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9579,6 +9700,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9745,6 +9867,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9856,6 +9979,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -9946,6 +10070,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10046,6 +10171,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10155,6 +10281,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10272,6 +10399,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10378,6 +10506,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10470,6 +10599,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10632,6 +10762,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10804,6 +10935,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -10924,6 +11056,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11025,6 +11158,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11153,6 +11287,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11275,6 +11410,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11387,6 +11523,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11495,6 +11632,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11617,6 +11755,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11724,6 +11863,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11813,6 +11953,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -11907,6 +12048,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12006,6 +12148,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12105,6 +12248,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12220,6 +12364,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12326,6 +12471,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12479,6 +12625,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -12631,6 +12778,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13174,6 +13322,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13371,6 +13520,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13513,6 +13663,7 @@ mod tests {
|
|||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13654,6 +13805,7 @@ mod tests {
|
|||
company_roster: Some(save_company_roster()),
|
||||
chairman_profile_table: Some(save_chairman_profile_table()),
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13796,6 +13948,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -13922,6 +14075,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14123,6 +14277,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14232,6 +14387,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14343,6 +14499,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14525,6 +14682,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14690,6 +14848,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14796,6 +14955,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -14935,6 +15095,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -15062,6 +15223,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -15263,6 +15425,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
@ -15474,6 +15637,7 @@ mod tests {
|
|||
company_roster: None,
|
||||
chairman_profile_table: None,
|
||||
region_collection: None,
|
||||
region_fixed_row_run_summary: None,
|
||||
placed_structure_collection: None,
|
||||
placed_structure_dynamic_side_buffer_summary: None,
|
||||
special_conditions_table: None,
|
||||
|
|
|
|||
|
|
@ -112,20 +112,21 @@ pub use smp::{
|
|||
SmpLoadedPackedEventTextBandSummary, SmpLoadedPlacedStructureCollection,
|
||||
SmpLoadedPlacedStructureDynamicSideBufferSummary, SmpLoadedPlacedStructureEntry,
|
||||
SmpLoadedProfile, SmpLoadedRegionCollection, SmpLoadedRegionEntry,
|
||||
SmpLoadedRegionProfileCollection, SmpLoadedRegionProfileEntry, SmpLoadedSaveSlice,
|
||||
SmpLoadedSpecialConditionsTable, SmpLoadedWorldEconomicTuningState,
|
||||
SmpLoadedWorldFinanceNeighborhoodState, SmpLoadedWorldIssue37State,
|
||||
SmpLocomotivePolicyFieldObservation, SmpLocomotivePolicyFloatAlignmentCandidate,
|
||||
SmpLocomotivePolicyNeighborhoodProbe, SmpPackedProfileWordLane,
|
||||
SmpPeriodicCompanyServiceTraceReport, SmpPostSpecialConditionsScalarLane,
|
||||
SmpPostSpecialConditionsScalarProbe, SmpPostTextFieldNeighborhoodProbe,
|
||||
SmpPostTextFloatAlignmentCandidate, SmpPostTextGroundedFieldObservation,
|
||||
SmpPreRecipeScalarPlateauLane, SmpPreRecipeScalarPlateauProbe, SmpPreamble, SmpPreambleWord,
|
||||
SmpRecipeBookLineSummary, SmpRecipeBookSummaryBook, SmpRecipeBookSummaryProbe,
|
||||
SmpRegionServiceTraceReport, SmpRt3105PackedProfileBlock, SmpRt3105PackedProfileProbe,
|
||||
SmpRt3105PostSpanBridgeProbe, SmpRt3105SaveBridgePayloadProbe, SmpRt3105SaveNameTableEntry,
|
||||
SmpRt3105SaveNameTableProbe, SmpRuntimeAnchorCycleBlock, SmpRuntimePostSpanHeaderCandidate,
|
||||
SmpRuntimePostSpanProbe, SmpRuntimeTrailerBlock, SmpSaveAnchorRunBlock, SmpSaveBootstrapBlock,
|
||||
SmpLoadedRegionFixedRowRunSummary, SmpLoadedRegionProfileCollection,
|
||||
SmpLoadedRegionProfileEntry, SmpLoadedSaveSlice, SmpLoadedSpecialConditionsTable,
|
||||
SmpLoadedWorldEconomicTuningState, SmpLoadedWorldFinanceNeighborhoodState,
|
||||
SmpLoadedWorldIssue37State, SmpLocomotivePolicyFieldObservation,
|
||||
SmpLocomotivePolicyFloatAlignmentCandidate, SmpLocomotivePolicyNeighborhoodProbe,
|
||||
SmpPackedProfileWordLane, SmpPeriodicCompanyServiceTraceReport,
|
||||
SmpPostSpecialConditionsScalarLane, SmpPostSpecialConditionsScalarProbe,
|
||||
SmpPostTextFieldNeighborhoodProbe, SmpPostTextFloatAlignmentCandidate,
|
||||
SmpPostTextGroundedFieldObservation, SmpPreRecipeScalarPlateauLane,
|
||||
SmpPreRecipeScalarPlateauProbe, SmpPreamble, SmpPreambleWord, SmpRecipeBookLineSummary,
|
||||
SmpRecipeBookSummaryBook, SmpRecipeBookSummaryProbe, SmpRegionServiceTraceReport,
|
||||
SmpRt3105PackedProfileBlock, SmpRt3105PackedProfileProbe, SmpRt3105PostSpanBridgeProbe,
|
||||
SmpRt3105SaveBridgePayloadProbe, SmpRt3105SaveNameTableEntry, SmpRt3105SaveNameTableProbe,
|
||||
SmpRuntimeAnchorCycleBlock, SmpRuntimePostSpanHeaderCandidate, SmpRuntimePostSpanProbe,
|
||||
SmpRuntimeTrailerBlock, SmpSaveAnchorRunBlock, SmpSaveBootstrapBlock,
|
||||
SmpSaveChairmanRecordAnalysisEntry, SmpSaveCompanyChairmanAnalysisReport,
|
||||
SmpSaveCompanyRecordAnalysisEntry, SmpSaveDwordCandidate, SmpSaveLoadCandidateTableSummary,
|
||||
SmpSaveLoadSummary, SmpSavePlacedStructureDynamicSideBufferAlignmentProbe,
|
||||
|
|
|
|||
|
|
@ -1792,6 +1792,17 @@ pub struct SmpLoadedRegionCollection {
|
|||
pub entries: Vec<SmpLoadedRegionEntry>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpLoadedRegionFixedRowRunSummary {
|
||||
pub source_kind: String,
|
||||
pub semantic_family: String,
|
||||
pub target_row_count: usize,
|
||||
pub target_row_stride: usize,
|
||||
pub target_row_stride_hex: String,
|
||||
#[serde(default)]
|
||||
pub candidates: Vec<SmpSaveRegionFixedRowRunCandidate>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct SmpSaveRegionQueuedNoticeRecordEntryProbe {
|
||||
pub node_base_offset: usize,
|
||||
|
|
@ -4131,6 +4142,8 @@ pub struct SmpLoadedSaveSlice {
|
|||
#[serde(default)]
|
||||
pub region_collection: Option<SmpLoadedRegionCollection>,
|
||||
#[serde(default)]
|
||||
pub region_fixed_row_run_summary: Option<SmpLoadedRegionFixedRowRunSummary>,
|
||||
#[serde(default)]
|
||||
pub placed_structure_collection: Option<SmpLoadedPlacedStructureCollection>,
|
||||
#[serde(default)]
|
||||
pub placed_structure_dynamic_side_buffer_summary:
|
||||
|
|
@ -6997,6 +7010,19 @@ fn derive_loaded_region_collection_from_probe(
|
|||
}
|
||||
}
|
||||
|
||||
fn derive_loaded_region_fixed_row_run_summary_from_probe(
|
||||
probe: &SmpSaveRegionFixedRowRunCandidateProbe,
|
||||
) -> SmpLoadedRegionFixedRowRunSummary {
|
||||
SmpLoadedRegionFixedRowRunSummary {
|
||||
source_kind: probe.source_kind.clone(),
|
||||
semantic_family: "scenario-save-region-fixed-row-run-summary".to_string(),
|
||||
target_row_count: probe.target_row_count,
|
||||
target_row_stride: probe.target_row_stride,
|
||||
target_row_stride_hex: probe.target_row_stride_hex.clone(),
|
||||
candidates: probe.candidates.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
fn derive_loaded_placed_structure_dynamic_side_buffer_summary(
|
||||
probe: &SmpSavePlacedStructureDynamicSideBufferProbe,
|
||||
alignment: Option<&SmpSavePlacedStructureDynamicSideBufferAlignmentProbe>,
|
||||
|
|
@ -7174,6 +7200,10 @@ pub fn load_save_slice_from_report(
|
|||
.save_region_record_triplet_probe
|
||||
.as_ref()
|
||||
.map(derive_loaded_region_collection_from_probe);
|
||||
let region_fixed_row_run_summary = report
|
||||
.save_region_fixed_row_run_candidate_probe
|
||||
.as_ref()
|
||||
.map(derive_loaded_region_fixed_row_run_summary_from_probe);
|
||||
let placed_structure_collection = report
|
||||
.save_placed_structure_record_triplet_probe
|
||||
.as_ref()
|
||||
|
|
@ -7368,6 +7398,21 @@ pub fn load_save_slice_from_report(
|
|||
nonzero_reserved_count
|
||||
));
|
||||
}
|
||||
if let Some(summary) = ®ion_fixed_row_run_summary {
|
||||
notes.push(format!(
|
||||
"Save-slice projection now also carries the region fixed-row run summary with {} candidate row bands at target stride {}, best rows offset {:?}, and best shape signature {:?}.",
|
||||
summary.candidates.len(),
|
||||
summary.target_row_stride_hex,
|
||||
summary
|
||||
.candidates
|
||||
.first()
|
||||
.map(|candidate| candidate.rows_offset_hex.as_str()),
|
||||
summary
|
||||
.candidates
|
||||
.first()
|
||||
.map(|candidate| candidate.shape_signature.as_str())
|
||||
));
|
||||
}
|
||||
if let Some(probe) = &report.save_placed_structure_collection_header_probe {
|
||||
notes.push(format!(
|
||||
"Raw save tagged placed-structure header reports live_record_count={} and live_id_bound={} with serialized stride hint 0x{:x} at file offsets 0x{:x}/0x{:x}/0x{:x}.",
|
||||
|
|
@ -7515,6 +7560,7 @@ pub fn load_save_slice_from_report(
|
|||
company_roster,
|
||||
chairman_profile_table,
|
||||
region_collection,
|
||||
region_fixed_row_run_summary,
|
||||
placed_structure_collection,
|
||||
placed_structure_dynamic_side_buffer_summary,
|
||||
special_conditions_table,
|
||||
|
|
@ -25658,6 +25704,41 @@ mod tests {
|
|||
],
|
||||
evidence: vec![],
|
||||
});
|
||||
report.save_region_fixed_row_run_candidate_probe =
|
||||
Some(SmpSaveRegionFixedRowRunCandidateProbe {
|
||||
profile_family: "rt3-classic-save-container-v1".to_string(),
|
||||
source_kind: "save-region-fixed-row-run-candidates".to_string(),
|
||||
semantic_family: "scenario-save-region-fixed-row-run-candidates".to_string(),
|
||||
target_row_count: 2,
|
||||
target_row_stride: 0xbc,
|
||||
target_row_stride_hex: "0xbc".to_string(),
|
||||
scan_start_offset: 0x5200,
|
||||
scan_start_offset_hex: "0x5200".to_string(),
|
||||
scan_end_offset: 0x5600,
|
||||
scan_end_offset_hex: "0x5600".to_string(),
|
||||
candidates: vec![SmpSaveRegionFixedRowRunCandidate {
|
||||
count_offset: 0x5300,
|
||||
count_offset_hex: "0x5300".to_string(),
|
||||
row_count: 2,
|
||||
row_stride: 0xbc,
|
||||
row_stride_hex: "0xbc".to_string(),
|
||||
rows_offset: 0x5310,
|
||||
rows_offset_hex: "0x5310".to_string(),
|
||||
rows_end_offset: 0x5488,
|
||||
rows_end_offset_hex: "0x5488".to_string(),
|
||||
distance_to_region_metadata_tag: 0x110,
|
||||
distance_to_region_metadata_tag_hex: "0x110".to_string(),
|
||||
dword_lane_summaries: vec![],
|
||||
shape_signature: "dword0:f32,dword1:zero".to_string(),
|
||||
shape_family_signature: "family-a".to_string(),
|
||||
trailing_byte_zero_count: 2,
|
||||
trailing_byte_nonzero_count: 0,
|
||||
trailing_byte_distinct_value_count: 1,
|
||||
trailing_byte_sample_values_hex: vec!["0x00".to_string()],
|
||||
best_probable_density_lane_relative_offset_hex: Some("0x24".to_string()),
|
||||
}],
|
||||
evidence: vec![],
|
||||
});
|
||||
report.save_placed_structure_record_triplet_probe =
|
||||
Some(SmpSavePlacedStructureRecordTripletProbe {
|
||||
profile_family: "rt3-classic-save-container-v1".to_string(),
|
||||
|
|
@ -25839,6 +25920,18 @@ mod tests {
|
|||
.map(|collection| collection.entries.len()),
|
||||
Some(2)
|
||||
);
|
||||
let region_fixed_row_run_summary = slice
|
||||
.region_fixed_row_run_summary
|
||||
.expect("region fixed-row summary should project");
|
||||
assert_eq!(
|
||||
region_fixed_row_run_summary.source_kind,
|
||||
"save-region-fixed-row-run-candidates"
|
||||
);
|
||||
assert_eq!(region_fixed_row_run_summary.candidates.len(), 1);
|
||||
assert_eq!(
|
||||
region_fixed_row_run_summary.candidates[0].rows_offset_hex,
|
||||
"0x5310"
|
||||
);
|
||||
let collection = slice
|
||||
.placed_structure_collection
|
||||
.expect("placed structure collection should project");
|
||||
|
|
@ -25868,6 +25961,9 @@ mod tests {
|
|||
line.contains("loaded region triplet rows as first-class context")
|
||||
&& line.contains("3 embedded profile rows")
|
||||
}));
|
||||
assert!(slice.notes.iter().any(|line| {
|
||||
line.contains("region fixed-row run summary") && line.contains("Some(\"0x5310\")")
|
||||
}));
|
||||
assert!(slice.notes.iter().any(|line| {
|
||||
line.contains("placed-structure triplet rows as first-class context")
|
||||
&& line.contains("2")
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ Working rule:
|
|||
save-slice model as first-class `region_collection` context, carrying region names, the
|
||||
grounded policy lanes, reserved-policy dwords, and embedded profile rows instead of leaving
|
||||
region triplets inspection-only
|
||||
- the save-side fixed-row run candidate family is now also the next save-slice seam to keep
|
||||
first-class once grounded, because it is the closest save-native candidate family to the
|
||||
still-missing cached tri-lane inputs behind `[site+0x310/+0x338/+0x360]`
|
||||
- Direct disassembly now narrows that acquisition strip further:
|
||||
- `0x004014b0` scans the live placed-structure collection at `0x0062b26c`
|
||||
- `0x0041f6e0 -> 0x0042b2d0` is the center-cell token gate over the current region
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue