Problem with algorithm

javaChick's Avatar, Join Date: Jul 2008
Light Poster
I canít solve the problem with the software Iím working on.Itís a programme which based on electric elements user drag-and-drops, gives the solution of a circuit Ė all currents in it.All begins in xml file for which I need parser.Parser is almost done, except - how to recognize type of link beetwen elements.So, I have a complex electric circuit, described in xml file, and for getting equations to solve in matlab, parser has to specify what is and in what manner linked.
This is example of xml file:
Code:
<E1> vrednost='20   ' A='R2A,R3A' B='R1A' </E1>
<R1> vrednost='100  ' A='E1B' B='R2B,R3B' </R1>
<R2> vrednost='100  ' A='E1A,R3A' B='R1B,R3B' </R2> 
<R3> vrednost='100  ' A='E1A,R2A' B='R1B,R2B' </R3>
A and B: every element has two connectors, and for easier working I imported A and B as two connecting spots of every element.E.G, lets analyse first line, spot A of element E1 is linked to the spots A of R2 and R3 elements.But, there is a problem.How could parser know are the elements linked parallel or in series?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Thread started in the wrong forum
javaChick's Avatar, Join Date: Jul 2008
Light Poster
hm..I thought this was the most common