I’m attempting to ensure the creation of XML files when launching the OSM web wizard. For example:
self.filename("config", ".sumocfg")
opts = [sumo, "-n", self.files_relative["net"], "--gui-settings-file", self.files_relative["guisettings"],
"--duration-log.statistics",
"--device.rerouting.adaptation-interval", "10",
"--emission-output","emissions.xml",
"--fcd-output","fcd-output.xml",
"--device.rerouting.adaptation-steps", "18",
"-v", "--no-step-log", "--save-configuration", self.files_relative["config"], "--ignore-route-errors"]
Here, I’ve ensured the creation of FCD and emission output files. However, I’m encountering difficulties in creating an additional output file. How can I achieve this?”
I found that the line adding the additional files to the options is:
if len(self.additionalFiles) > 0:
opts += ["-a", ",".join(self.getRelative(self.additionalFiles))]
However, this does not create the file.
I also attempted to force writing, but with no results:
with open("edge_emission_output.xml", "a") as f:
f.write("""
<additional>
<edgeData id="dump" type="emissions" file="emissions-dump.xml" excludeEmpty="true"/>
</additional>
""")
Zaiat Gui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.