Ability to input junctions at `ProjectInfo` initialisation
nikosavola opened this issue · 1 comments
nikosavola commented
Similarly to #103, I think junctions should be possible to give in ProjectInfo
initialisation as arguments.
Doing
pinfo.junctions['jAlice'] = {'Lj_variable':'Lj_alice', 'rect':'rect_alice', 'line': 'line_alice', 'Cj_variable':'Cj_alice'}
pinfo.junctions['jBob'] = {'Lj_variable':'Lj_bob', 'rect':'rect_bob', 'line': 'line_bob', 'Cj_variable':'Cj_bob'}
feels similarly hacky to #102 (though maybe not as much).
A syntax with dictionary of dictionaries could be supported
junctions = {
'jAlice': {'Lj_variable':'Lj_alice', 'rect':'rect_alice', 'line': 'line_alice', 'Cj_variable':'Cj_alice'},
'jBob': {'Lj_variable':'Lj_bob', 'rect':'rect_bob', 'line': 'line_bob', 'Cj_variable':'Cj_bob'}
}
pinfo = epr.ProjectInfo(..., junctions=junctions)
In this case pinfo.validate_junction_info()
could be called automatically and an Exception raised
zlatko-minev commented
This would be backwards compatible?