Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   Problem with algorithm (http://www.go4expert.com/forums/problem-with-algorithm-t11991/)

javaChick 10Jul2008 13:48

Problem with algorithm
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:

<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 10Jul2008 17:25

Re: Problem with algorithm
Thread started in the wrong forum

javaChick 10Jul2008 18:18

Re: Problem with algorithm
hm..I thought this was the most common

All times are GMT +5.5. The time now is 05:31.