I'm writing a circuit simulation program as an exercise and I'm using the nodal method. The nodal method requires every branch current to be a function of some branch voltage so the circuit can be solved through the KCL.
What do we do with dependent voltage sources though? The only way I can think of implementing them is by transforming them into current sources, but that needs a resistor in series of the voltage source.