Bug 1 — Journal (solve_simulation.py simple workflow):
Expression lookup for p173 fails silently for derived/measurement
expressions, so _temp_mass.txt was never written. Added MeasureManager
fallback via extract_part_mass() (already used in assembly workflow).
Bug 2 — Extractor (extract_mass_from_expression.py):
Journal writes 'p173=<value>' format but extractor tried float() on
the whole content including 'p173='. Added key=value parsing.
Defense in depth — nx_interface.py:
Added stdout parsing fallback: if _temp_mass.txt still missing, parse
mass from journal output captured via solver.py stdout passthrough.
Files changed:
- optimization_engine/nx/solve_simulation.py — MeasureManager fallback
- optimization_engine/extractors/extract_mass_from_expression.py — key=value parse
- optimization_engine/nx/solver.py — include stdout in result dict
- projects/hydrotech-beam/studies/01_doe_landscape/nx_interface.py — stdout fallback
Tags: hydrotech-beam, mass-extraction
Root cause: Path.absolute() on Windows does NOT resolve '..' components.
sim_file_path was reaching NX as '...\studies\01_doe_landscape\..\..\models\Beam_sim1.sim'
NX likely can't resolve referenced parts from a path with '..' in it.
Fixes:
- nx_interface.py: glob from self.model_dir (resolved) not model_dir (raw)
- solver.py: sim_file.resolve() instead of sim_file.absolute()
- solve_simulation.py: os.path.abspath(sim_file_path) at entry point
- Diagnostic logging still in place for next run