Problem with algorithm

Discussion in 'Programming' started by javaChick, Jul 10, 2008.

  1. javaChick

    javaChick New Member

    Joined:
    Jul 10, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    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?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Thread started in the wrong forum
     
  3. javaChick

    javaChick New Member

    Joined:
    Jul 10, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    hm..I thought this was the most common
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice