deleted: testing/test.py

sql
ketrptr 2024-12-09 10:58:32 +01:00
parent aee1a3129f
commit dc63379e4f
1 changed files with 0 additions and 24 deletions

View File

@ -1,24 +0,0 @@
components = {
"U1": ("0Ohm", "10V", "IU1"),
"R1": ("1e3Ohm", "UR1", "IR1"),
"R2": ("5e3Ohm", "UR2", "IR2"),
}
nodes = {"n1", "n2"}
connections = {
"U1": ["n1"],
"n1": ["R1", "R2"],
"R1": ["n2"],
"R2": ["n2"],
"n2": ["U1"],
}
nodeCoeffs = {}
for n in nodes:
nodeCoeffs[n] = [
f"-{components[k][2]}" if n in v else f"{components[x][2]}"
for k, v in connections.items()
for x in v
if k == n or n in v
]
print(nodeCoeffs)