Skip to content

Commit

Permalink
corrected a bug in pnml output.
Browse files Browse the repository at this point in the history
in some cases the pnml output contained duplicate arc ids.
  • Loading branch information
dalzilio committed Feb 28, 2020
1 parent 186a60a commit b72c658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corenet/pnmlwrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ func (v Trans) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
e.EncodeToken(xml.EndElement{Name: start.Name})

for _, c := range v.in {
encodeArc(e, fmt.Sprintf("t%d-%d", v.count, c.count), c.Place.name, name, c.int)
encodeArc(e, fmt.Sprintf("tpt%d-%d", v.count, c.count), c.Place.name, name, c.int)
}
for _, c := range v.out {
encodeArc(e, fmt.Sprintf("t%d-%d", c.count, v.count), name, c.Place.name, c.int)
encodeArc(e, fmt.Sprintf("ttp%d-%d", c.count, v.count), name, c.Place.name, c.int)
}

return nil
Expand Down

0 comments on commit b72c658

Please sign in to comment.