Skip to content

Kip gas elect updates#339

Draft
tolga-akan wants to merge 16 commits intomainfrom
kip_gas_elect_updates
Draft

Kip gas elect updates#339
tolga-akan wants to merge 16 commits intomainfrom
kip_gas_elect_updates

Conversation

@tolga-akan
Copy link
Collaborator

@tolga-akan tolga-akan commented Aug 18, 2025

  • electricity cable integer sizing is implemented
  • new test is added for cable sizing. old test is updated to adapt them to updated gas_elect_workflow
  • NL wide hydrogen versus electricity transmission grid case study is created
  • [ ]

Comment on lines 54 to 57
if (
self.esdl_assets[self.esdl_asset_name_to_id_map[p]].attributes["state"]
== AssetStateEnum.ENABLED
):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The state of the cable is in the parameters of the problem parameters[f"{p}.state"]. Also for all state checks you do below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. Check is done via : cable_state = self.parameters(0)[f"{p}.state"]

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def electricity_cable_classes(self, p):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "p" use "c" or "cable" for clarity.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.


base_folder = Path(example.__file__).resolve().parent.parent

class GasElectProblemExpensiveCable(GasElectProblem):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the updating/adapting of these classes to the model/gas_electricity_network/src/ directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Adapted classes are moved to regarding models directory

]
return cable_list

class GasElectProblemCheapCable(GasElectProblem):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can inherit from the previous class and just change the costs of the cable classes. Makes it easier to track the differences between these classes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently both of the cheap and expensive cable classes inherit from the original cable class in in the gas_elect_workflow. But I can completly remove the expensive cable class and directly use the original cable class given in the gas_Elect_workflow

Comment on lines 224 to 229
def bounds(self):
bounds = super().bounds()
for c in self.energy_system_components.get("electricity_cable", []):
bounds.update({f"{c}__investment_cost": (0.0, np.inf)})

return bounds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These bounds are updated here, but should be in asset sizing. and with dictionary. However, typically if no value had been provided, the investment costs bounds would have been nan or np.inf. So I'm wondering why this is added.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You state it was removed but you did not state why it was here and if the required np.inf is indeed in place already?

Comment on lines 340 to 347
for ensemble_member in range(self.ensemble_size):
d = self.__electricity_cable_topo_max_current_resistance_parameters[
ensemble_member
]

d[f"{cable}.max_current"] = np.nan
d[f"{cable}.resistance"] = np.nan

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you make the parameters nan?
Check if this part in the pre (the loop over all cables) is really needed this extensively, or whether things can be simplified.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tolga-akan I see you have not replied to this one yet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. This part is removed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not say it should be removed. The question is why is it here. Is it needed here?

Comment on lines 81 to 82
esdl_file_name="EG_onshore_NL_gas_elec_case_study_drc_efvc_.esdl",
profile_reader=ProfileReaderFromFile,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have this code on github, then it should include an esdl and csv that are available on github as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is case is for the Dutch hydrogen / electricity grid case study. I have removed the esdl from mesido after we talk about that. I kept the run file there if anyone like to run using the regarding esdl in share point. I can completely remove the run file from mesido as well.

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.

3 participants