Skip to content

implementations for energy-based multimodal constraints are not complete #121

@robfitzgerald

Description

@robfitzgerald

while working on #120, i built out data structures to define energy-based constraints for trips, but discovered that the integration would require dealing with some technical debt around wiring in energy metrics (see table, below). with these updates, we can then un-comment the placeholders in constraint_config.rs and constraint.rs.

choosing energy fieldnames

constraint_config::EnergyStateVariable is provided as a constraint configuration that can let the user select whether to include liquid, electric, or both types of energy. by default, we should choose "both". if the user selects "liquid" or "electric", we should fail if the key is missing. if the user chooses "both", we should only fail if neither are set.

file changes

this may be a partial list, it was generated by Claude 4.6 Sonnet

File Change
fieldname.rs (both copies) Add mode_energy_fieldname (and optionally mode_energy_electric_fieldname / mode_energy_liquid_fieldname)
variable.rs Add multimodal_energy_variable_config
model.rs Register leg_energy + mode_energy in output_features
multimodal_traversal_ops.rs Read edge-level energy, accumulate into leg + mode energy slots in update_accumulators
multimodal_state_ops.rs Add get_mode_energy
constraint.rs Replace the todo!() in get_mode_energy with actual state read
Tests in model.rs Update expected_len / assertions to account for new energy state variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions