NREL / infrasys

Data store for components and time series in support of Python-based modeling packages
https://nrel.github.io/infrasys/
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Add function_data classes from InfrastructureSystems #33

Closed jerrypotts closed 4 months ago

jerrypotts commented 5 months ago

Added new file (function_data.py) to include the function_data structs from InfrastructureSystems as python classes, which are necessary for parsing data for cost function inputs into Sienna. I included classes for linear and quadratic functions, as well as piecewise linear and piecewise step functions.

Note, we kept PiecewiseLinearData.points as a list of NamedTuples (rather than change it to two separate lists of x, y coordinates) to ensure it is consistent with the structs built on top of function_data in InfrastructureSystems and elsewhere.

pesap commented 4 months ago

@jerrypotts , we are working on a patch for the runner so that this can be tested. Let's leave the update of the fields to a following PR.