Feature/fixed pole positions#20
Conversation
paulapreuss
left a comment
There was a problem hiding this comment.
Currently there is still the links missing for this implementation to fully do its thing. In general, I think we can keep it quite simple, so if we test around a bit and it works fine, that's good by me. What I am most concerned about currently is the link lengths getting a bit out of control without any safeguards. In a parallel PR, I am working on the poles along roads feature, and here the approach will more likely be to place the poles first and then run the optimization. However, this is also still WIP here
| def _extract_fixed_poles(self): | ||
| fixed = self.nodes[ | ||
| (self.nodes["node_type"] == "pole") & | ||
| (self.nodes["is_fixed"] == 1.0) |
There was a problem hiding this comment.
| (self.nodes["is_fixed"] == 1.0) | |
| (self.nodes["is_fixed"] == True) |
Isn't this usually a boolean? It evaluates correctly but just for clarity
| if nearest_pole_label is not None: | ||
| self.nodes.loc[nearest_pole_label, "latitude"] = lat_fixed | ||
| self.nodes.loc[nearest_pole_label, "longitude"] = lon_fixed |
There was a problem hiding this comment.
This works so far for the nodes but the links are missing, so the cables still point to the old coordinates (where there is now no pole)
Adds an initial implementation to keep manually moved poles (is_fixed = 1.0) in place after grid optimization.
This avoids changes to the core optimization logic.
Fixed pole coordinates are:
Limitations / TODOs: