2 edited body

For my CS project I have to write simple circuit simulator, where I get list of edges of circuit as (a,R,b), where a and b are nodes at the end of the edge and R is it's resistance (it has a resistor R), and one pair (a,b) where the electromotive force E is put. I am also forbidden from using nodal analysis method.
I've

I've tried reading "Computer methods for circuit analysis and design" by Vlach and Singhal, and also I've tried using loop analysis. The problem with loop analysis is that getting list of all loops for any graph (they can be arbitrarily huge, e. g. 1, 2, 4 thousand edges) is algorithicallyalgorithmically very hard.

I also have to avoid getting overdetermined system of linear equations, so if I understand correctly I have to use both Kirchhoff's laws. Using them just as-is would generate too many equations though.
So

So to sum up: isSs there an algorithm that can produce equation system (not under- or overdetermined) for calculating currents and/or voltages in circuit without knowing it's shape beforehand, only resistances on it's edges and single EMF source?

For my CS project I have to write simple circuit simulator, where I get list of edges of circuit as (a,R,b), where a and b are nodes at the end of the edge and R is it's resistance (it has a resistor R), and one pair (a,b) where the electromotive force E is put. I am also forbidden from using nodal analysis method.
I've tried reading "Computer methods for circuit analysis and design" by Vlach and Singhal, and also I've tried using loop analysis. The problem with loop analysis is that getting list of all loops for any graph (they can be arbitrarily huge, e. g. 1, 2, 4 thousand edges) is algorithically very hard. I also have to avoid getting overdetermined system of linear equations, so if I understand correctly I have to use both Kirchhoff's laws. Using them just as-is would generate too many equations though.
So to sum up: is there an algorithm that can produce equation system (not under- or overdetermined) for calculating currents and/or voltages in circuit without knowing it's shape beforehand, only resistances on it's edges and single EMF source?

For my CS project I have to write simple circuit simulator, where I get list of edges of circuit as (a,R,b), where a and b are nodes at the end of the edge and R is it's resistance (it has a resistor R), and one pair (a,b) where the electromotive force E is put. I am also forbidden from using nodal analysis method.

I've tried reading "Computer methods for circuit analysis and design" by Vlach and Singhal, and also I've tried using loop analysis. The problem with loop analysis is that getting list of all loops for any graph (they can be arbitrarily huge, e. g. 1, 2, 4 thousand edges) is algorithmically very hard.

I also have to avoid getting overdetermined system of linear equations, so if I understand correctly I have to use both Kirchhoff's laws. Using them just as-is would generate too many equations though.

So to sum up: Ss there an algorithm that can produce equation system (not under- or overdetermined) for calculating currents and/or voltages in circuit without knowing it's shape beforehand, only resistances on it's edges and single EMF source?

1

Algorithm for getting currents and voltages from resistances in circuit as graph

For my CS project I have to write simple circuit simulator, where I get list of edges of circuit as (a,R,b), where a and b are nodes at the end of the edge and R is it's resistance (it has a resistor R), and one pair (a,b) where the electromotive force E is put. I am also forbidden from using nodal analysis method.
I've tried reading "Computer methods for circuit analysis and design" by Vlach and Singhal, and also I've tried using loop analysis. The problem with loop analysis is that getting list of all loops for any graph (they can be arbitrarily huge, e. g. 1, 2, 4 thousand edges) is algorithically very hard. I also have to avoid getting overdetermined system of linear equations, so if I understand correctly I have to use both Kirchhoff's laws. Using them just as-is would generate too many equations though.
So to sum up: is there an algorithm that can produce equation system (not under- or overdetermined) for calculating currents and/or voltages in circuit without knowing it's shape beforehand, only resistances on it's edges and single EMF source?