Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Questions about duaiterate.py

Hi Mirko,

Thank you for your reply! I have a few follow up questions:
  1. Can you expand on what you mean by traffic volume scaling? Is it essentially the number of vehicles that would be in the simulation? For example, if there are originally 2 vehicles but the scaling min(options.incStart + options.incValue * float(step + 1) / options.incBase, options.incMax) = 1/2 would result in 2*(1/2) = 1 vehicle in the simulation.
  2. This works, thank you!
  3. I don't believe you answered this question, any insight would be appreciated: How do we tell if the iterations have reached an equilibrium? Which output variable should we observe?
  4. Attached is a sample file tripinfo_000.xml, which does not seem to have a duration section. How can I make sure it has a duration section?
    1. here is the command I am running for reference "python ../sumo/tools/assign/duaIterate.py -n siouxFalls.net.xml -t siouxFalls.trips.xml -l 10 --max-convergence-deviation 1 --convergence-iterations 2 --addweights siouxFalls.weight.xml --time-inc 5"
  5. Got it, thanks!
Please let me know if you have any additional insight. Thank you so much!

Best,
James

On Tue, Sep 12, 2023 at 1:01 AM Mirko Barthauer <m.barthauer@xxxxxxxxxxx> wrote:

Hi James,

 

you can discover more about the duaiterate.py options by calling it with --help. Many of your questions are addressed on this doc page.

 

1. --inc* options are about traffic volume scaling and provide components of the scale equation used in duaiterate: If --inc-base is defined, it's min(options.incStart + options.incValue * float(step + 1) / options.incBase, options.incMax), --inc-max otherwise. --time-inc (seconds) is about the simulation duration defined by the equation options.timeInc * (step + 1).

 

2. Options for duarouter can be passed by prepending "duarouter" to them and putting them at the end of the options. So it should read something like "duarouter--weight-attribute cost"

 

4. Could be that the duration section is missing. Cannot say more without the files.

 

 5. Currently not possible.

 

Best regards

Mirko

 

-----Original-Nachricht-----

Betreff: [sumo-user] Questions about duaiterate.py

Datum: 2023-09-07T22:10:50+0200

Von: "James Cheng via sumo-user" <sumo-user@xxxxxxxxxxx>

An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>

 

 

 

Dear SUMO Staff,

 

I am trying to use duaiterate.py and I have a few questions regarding its use:

  1. I am running into issues caused by long iteration times and am looking into ways to speed up iterations. What do the following flags do (short description) and what are their units (i.e. seconds, minutes, etc.)? Is there an example usage of these or is there a directory that contains more info about these flags that we can refer to?

  • --inc-start, --inc-base, --inc-max, --incrementation, --time-inc

  1. I’m trying to add weights for the duarouter section because I would like to use my own definition of cost = travel time + tolling as a weight. I am using the “--addweights” flag with a weight file for the additional weights, but how do I specify the weight attribute?

    1. Using duarouter, I was able to do “--weight-attribute cost”, but is there a flag like that for duaiterate.py?

  2. How do we tell if the iterations have reached an equilibrium? Which output variable should we observe?

  3. When I run 

python ../sumo/tools/assign/duaIterate.py -n siouxFalls.net.xml -t siouxFalls.trips.xml -l 10 --max-convergence-deviation 1 --convergence-iterations 2 --addweights siouxFalls.weight.xml --time-inc 5"

I get the following error after running through iteration 000: 

 

  File "...\sumo\tools\assign\duaIterate.py", line 688, in main

    avgTT.add(sum / count)

ZeroDivisionError: float division by zero


I am not sure why the count variable is zero –  could it be that my tripinfo_000.xml does not have a duration section? I would like to use the “--max-convergence-deviation” flag to automatically stop iterations after converging, but I am not sure how to fix this division by zero error.


  1. How do we store the duaiterate dump folders (e.g. 000, 001, 002, etc.) in a separate folder such as a dump_folder folder? Currently, it is dumping them into the current directory.


Please advise us on these questions, and let us know if you have any clarifications. Thank you so much for your help!

 

Best,

James




--
James Cheng
B.A. Computer Science and B.S. Business Administration
University of California, Berkeley
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2023-09-13 06:39:57 by Eclipse SUMO sumo Version 1.18.0
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd";>

    <input>
        <net-file value="000/../siouxFalls.net.xml"/>
        <route-files value="000/siouxFalls_000.rou.xml"/>
        <additional-files value="000/../edgedata.add.xml"/>
    </input>

    <output>
        <output-prefix value="000/"/>
        <summary-output value="000/../summary_000.xml"/>
        <tripinfo-output value="000/../tripinfo_000.xml"/>
    </output>

    <time>
        <begin value="0"/>
        <end value="5"/>
    </time>

    <processing>
        <route-steps value="200"/>
        <no-internal-links value="False"/>
        <time-to-teleport value="300"/>
        <time-to-teleport.highways value="0"/>
        <eager-insert value="False"/>
    </processing>

    <report>
        <verbose value="true"/>
        <no-warnings value="False"/>
        <log value="000/../iteration_000.sumo.log"/>
        <no-step-log value="true"/>
    </report>

    <random_number>
        <random value="False"/>
    </random_number>

</configuration>
-->

<tripinfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tripinfo_file.xsd";>
</tripinfos>

Back to the top