Skip to content

Simdrivelabel (get_label_fe) SimParams inputs#251

Open
kylecarow wants to merge 6 commits into
fastsim-3from
f3/simdrivelabel-params
Open

Simdrivelabel (get_label_fe) SimParams inputs#251
kylecarow wants to merge 6 commits into
fastsim-3from
f3/simdrivelabel-params

Conversation

@kylecarow

@kylecarow kylecarow commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

Resolves https://github.nrel.gov/MBAP/fastsim/issues/413

Adds optional SimParams input to get_label_fe in Python and Rust.

Usage:

import fastsim

veh = fastsim.Vehicle.from_resource("2026_Chrysler_Pacifica_Select.yaml")

custom_params_dict = fastsim.SimParams.default().to_pydict()
custom_params_dict["trace_miss_opts"] = "AllowChecked"
custom_params = fastsim.SimParams.from_pydict(custom_params_dict)

# e.g. not supplying custom params, rely on the default
fastsim.get_label_fe(veh)

# e.g. supplying custom params for all simulations
fastsim.get_label_fe(
    veh,
    sim_params={
        "udds": custom_params,
        "hwy": custom_params,
        "accel": custom_params,
    }
)

# e.g. supplying custom params for a subset of simulations
fastsim.get_label_fe(
    veh,
    sim_params={
        "hwy": custom_params,
    }
)

# e.g. supplying custom params for an invalid key name (causes RuntimeError)
# `RuntimeError: Unknown sim_params key: "will the real slim shady please stand up"`
fastsim.get_label_fe(
    veh,
    sim_params={
        "will the real slim shady please stand up": custom_params,
    }
)

I notice there are no references to get_label_fe_phev except for its function definition, which is a bit odd.

@kylecarow kylecarow changed the title add simparams input to simdrivelabel functions, python api is missing still Simdrivelabel (get_label_fe) SimParams inputs Jul 13, 2026
@kylecarow

Copy link
Copy Markdown
Collaborator Author

@robinsteuteville this PR should be finalized and ready to review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants