Skip to content

Conversation

@Damowerko
Copy link
Owner

No description provided.

Copy link
Owner Author

@Damowerko Damowerko left a comment

Choose a reason for hiding this comment

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

Overall good implementation of OPFDataset. One branch is not handled. Commented out code and debug logic should be removed. Some other comments.

data["gen"].Sg = self.Sg[index]
if self.dual_graph:
data["branch"].Sf = self.Sf[index]
data["branch"].St = self.St[index]
Copy link
Owner Author

Choose a reason for hiding this comment

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

This case isn't handled.

data["bus", "branch", "bus"].Sf = self.Sf[index]
data["bus", "branch", "bus"].St = self.St[index]
# remove any branches with br_status=0
br_mask = self.br_status[index].bool()
Copy link
Owner Author

Choose a reason for hiding this comment

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

Rename to branch_mask

def case_path(self):
return Path(self.data_dir / f"{self.case_name}.json")
# TODO: eventually move this to front end
if self.case_name == "case118_ieee":
Copy link
Owner Author

Choose a reason for hiding this comment

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

Is this logic necessary? Can't I simply provide case_name case118_ieee_removed_branch?


Sd = torch.zeros((n_samples, n_bus, 2))
Sd[:, self.powerflow_parameters.load_bus_ids, :] = load
# branch_status = self.powerflow_parameters ...??
Copy link
Owner Author

Choose a reason for hiding this comment

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

don't commit commented out code

)
# I am indexing from the end, so that I can change the size of the training dataset
# without changing wich samples are used for testing and validation
# # I am indexing from the end, so that I can change the size of the training dataset
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove double # #

# no... this is in NOT solved... missing some logic here
continue
end
println("branch $br_removed_index found to be feasibile")
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove the debug logging.

network_data["branch"][branch_to_remove]["br_status"] = 0
branch_to_remove = rand(keys(_network_data["branch"]))
_network_data["branch"][branch_to_remove]["br_status"] = 0
# br_removed_index = parse(Int, branch_to_remove)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove the comented out code.

"solve_time" => Array{Float64}(undef, n_samples),
"objective" => Array{Float64}(undef, n_samples),
)
br_removed_index = ""
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove

result, solved = label_network(network_data, load)
result, solved = label_network(_network_data, load)
if !solved
# no... this is in NOT solved... missing some logic here
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove


check_assumptions!(network_data)

# data = generate_samples_numpy(network_data, n_samples, min_load, max_load, remove_random_branch)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove the debug logic

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