Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the handling of Combined Heat and Power (CHP) technologies to support multiple, tech-specific CHP units rather than assuming a single, global CHP configuration. The changes consistently replace single-CHP parameter usage with per-CHP dictionaries and iterables, improving flexibility and accuracy when modeling multiple CHP units with different characteristics. The update touches all relevant constraints, cost calculations, and scenario structures.
The most important changes are:
CHP Constraint Refactoring and Tech-Specific Parameters
chp_constraints.jlnow loop through each CHP unit, usingp.chp_params[t]andp.max_sizes[t]for tech-specific parameters (e.g., efficiencies, supplementary firing, O&M costs, max sizes), instead of assuming a singlep.s.chpobject. This ensures constraints and costs are accurately applied per CHP unit. [1] [2] [3] [4]supplementary_firing_max_steam_ratio > 1.0.Cost Curve and Capital Cost Updates
cost_curve_constraints.jlis updated to loop over all CHP units, applying each unit's specific cost curves and supplementary firing capital costs. [1] [2]Demand Charge and Outage Constraint Updates
electric_utility_constraints.jlnow select only those CHP units that do not reduce demand charges, using each CHP'sreduces_demand_chargesproperty.Scenario and Input Structure Changes
BAUScenario,REoptInputs) now include an array of CHP objects and achp_paramsdictionary, even for BAU scenarios (where these are empty), ensuring consistent interface for all workflows. [1] [2] [3] [4]These changes collectively enable accurate modeling of multiple, distinct CHP units throughout the optimization workflow.