public static void main(final String[] args) {
        if (args.length > 0) {
            File pnmlDatei = new File(args[0]);
            PNMLWriter pnmlWriter = new PNMLWriter(pnmlDatei);
            pnmlWriter.startXMLDocument();


            for (String elem_id : PetriNetController.getPlaceIds()) {
                Place place = (Place)PetriNetController.getElementById(elem_id);
                Point2D position = place.getPosition();
                Double position_x = (double)(Math.round(position.getX()*100)/100);
                Double position_y = (double)(Math.round(position.getY()*100)/100);
                pnmlWriter.addPlace(place.getId(), place.getLabel(), String.valueOf(position_x), String.valueOf(position_y), String.valueOf(place.getTokenCount()));
            }

            for (String elem_id : PetriNetController.getTransitionIds()) {
                Transition transition = (Transition)PetriNetController.getElementById(elem_id);
                Point2D position = transition.getPosition();
                Double position_x = (double)(Math.round(position.getX()*100)/100);
                Double position_y = (double)(Math.round(position.getY()*100)/100);
                pnmlWriter.addTransition(transition.getId(), transition.getLabel(), String.valueOf(position_x), String.valueOf(position_y));
            }

            for (String elem_id : PetriNetController.getArcIds()) {
                Arc arc = (Arc)PetriNetController.getElementById(elem_id);
                if (arc.getTargetType() == Arc.TARGET_BOTH) {
                    pnmlWriter.addArc(arc.getId(), arc.getTransition().getId(),  arc.getPlace().getId());
                    pnmlWriter.addArc(arc.getId()+"_t2", arc.getPlace().getId(),  arc.getTransition().getId());
                } else {
                    pnmlWriter.addArc(arc.getId(), arc.getSourceId(), arc.getTargetId());
                }
            }


            pnmlWriter.finishXMLDocument();
        } else {
            System.out.println("Bitte eine Datei als Parameter angeben!");
        }
    }