json_flow_right.hpp file
JSON serialization for FlowRight objects.
The JSON binding accepts the legacy "discharge" key as an alias for the new "target" key. Setting both is an error. The legacy "use_value" key has been renamed to "uvalue" (no alias kept — the narrowing from OptTBRealFieldSched to OptTRealFieldSched is a compile-time visible change anyway).
The bound triple (fmin, fmax, target, and the legacy discharge alias) are bound as OptTBRealFieldSched so that round-tripped parquet output (one row per (scenario, stage, block)) parses without "duplicate uid" warnings. Scalar / 1-D shapes still parse via the variant fallback and broadcast across blocks. The cost fields (fcost, uvalue) are also OptTBRealFieldSched (since PR-C) so a per-(stage, block) cost surface round-trips through parquet; scalar shapes still broadcast. Block-duration weighting is applied at LP-build time via CostHelper::block_ecost.