Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] R: od2trips vehicle restrictions
  • From: Federico De Falco <defalco@xxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 14 Apr 2025 12:24:30 +0000
  • Accept-language: it-IT, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=laboratoriomister.it; dmarc=pass action=none header.from=laboratoriomister.it; dkim=pass header.d=laboratoriomister.it; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bf+Gnzct56s+gHAKfVhukrxFPPlXJrV7Dk5QKJVYUD4=; b=dgrl2gwhYHPqigrwgp/MQuMr7NeXzD9Nmv1Er/SE9WWvJEnQpli48krJ+M934OmgqTtMxTbLApkz26tJtNqCuN8q/2fC4nOUlbh9KfYM5JjdmEVFWl7V/T5GXfJUl4B0n4lmkHGHXXB6lPD4mY/b65elT8P6k8LCIPnjVQgtZV9PuOQDhls5JBCZiYNGfAQMsRR/GdYCw7w7s1aMiwaJQG3t/OEl+Ff7GrHcCXhVcyWo4VdisfCgyR5UVr3fA+SxeyZ0/Ng+AdFFfPGEy/ytoMpb2RMbDVBL7oFssgrkRjeZMJnbiA5IQMpIrc7KIICBQKPbxHTVttHo0Fdg8gvQ7Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RepmjPEz2o9EPIfsYlticRTvDYdgW1XV20xfHYMjHkn2vvTYLBswg6SV+ZAFPs6q4zu7IS67366YBS54rdgyi+rW8oLzS30no/RKwO3YGmYcCYBRNEryrrWK0exL7DX08ZubD3XJyWViq64DrT/H45uHcKChreh77y8SR5V8OuX0+ra6qBT0+YeoRt6rCiM4VFCTexD0wy1DKPkBu7zRbN+mD7/g+kpki0cCquWy7adh2MDTXC72CmgUTrCseew6RMFnJAwKKvKe5mB54PHnmtQBvD4m8GWwVcfwwqjdjivFY04YWohVMQtvM3FJj0YxBoksuE8ITWIFvxYzcP9FQQ==
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-user/>
  • List-help: <mailto:sumo-user-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHbo9m0CBBbb8qamEGdrAQNojKH37OQfo4AgBKTcXyAAArkAIAACD3C
  • Thread-topic: [sumo-user] od2trips vehicle restrictions

This are the steps I follow:
  1. Draw TAZ in netedit and obtain myscenario.add.xml whic contains, for example,
        <taz id="taz_0" shape="2710.71,11936.74 2678.73,11810.97 2829.37,11781.83 2852.11,11918.26 2714.26,11934.60 2714.26,11935.32 2710.72,11936.70 2710.71,11936.74" color="blue">
            <tazSource id="-23393174#0" weight="1.00"/>
            <tazSink id="-23393174#0" weight="0.00"/>
            <tazSource id="23393174#0" weight="0.00"/>
            <tazSink id="23393174#0" weight="1.00"/>
        </taz>
  2. Write a OD file like this:
    <data> 
        <interval id="passenger1" begin="0" end="3599.0"> 
           <tazRelation from="taz_1" to="taz_2" count="20"/> 
           <tazRelation from="taz_1" to="taz_33" count="10"/> 
           <tazRelation from="taz_2" to="taz_1" count="15"/> 
            ...
        </interval> 
    ... 
    </data> 
  3. Create a file with the edges in each district by running python $SUMO_HOME/tools/edgesInDistricts.py -n myscenario.net.xml -t myscenario.add.xml -o myscenario.taz.xml and obtain:
    <taz id="taz_0" color="blue" edges="-23393174#0 -454892515#2 23393174#0 454892515#2"/>
  4. Filter with python $SUMO_HOME/tools/district/filterDistricts.py -n myscenario.net.xml -t myscenario.taz.xml -o passengerTaz.taz.xml --vclass passenger and obtain:
    <taz color="blue" edges="-23393174#0 -454892515#2 23393174#0 454892515#2" id="taz_0"/>

I took as an example a taz with low number of edges just for simplicity so in this example no edges are filtered out, but it works correctly in other tazs where it filters out edges that are for trucks only. I don't think the problem is the filtering but that I am missing something before...am I correct?

 

 


FEDERICO 

DE FALCO 


Researcher
 

 

MISTER Smart Innovation
laboratoriomister.it 

Tecnopolo Bologna CNR 

tecnopolo.bo.cnr.it 

 

 

PHONE 

 

+39 051 639 9984

EMAIL 

defalco@xxxxxxxxxxxxxxxxxxxx 

ADDRESS 

Tecnopolo Bologna CNR 

 

Via Piero Gobetti, 101 

 

40129 - Bologna, Italy 

PRIVACY 

policy


 

LET’S CONNECT 

 

 MISTER

 

Tecnopolo


 

 








 


Da: Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Inviato: lunedì 14 aprile 2025 13:42
A: Federico De Falco <defalco@xxxxxxxxxxxxxxxxxxxx>
Cc: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Oggetto: Re: [sumo-user] od2trips vehicle restrictions
 
In our own tests, filtering preserves the distinction between <source> and <sink> edges.
Can you provide a minimal input example where filtering causes the loss of information?

Am Mo., 14. Apr. 2025 um 13:07 Uhr schrieb Federico De Falco <defalco@xxxxxxxxxxxxxxxxxxxx>:
Hi,

your solution worked, thank you!
Now I am facing another problem related to this one. I draw TAZs in netedit's TAZ mode, and I chose some edges that are sources and other taht are sinks, that are saved into a .add.xml file. Anyway, when I use od2trips and pass the filtered taz file as a parameter it contains all the edges, without any information about sources/sinks, and thus tries to generate trips that start from wrong edges.
Is there a way to generate trips from OD taking into account both sources/sinks and the vehicles allowed on each edge?

Thank you

 

 


FEDERICO 

DE FALCO 


Researcher
 

 

MISTER Smart Innovation
laboratoriomister.it 

Tecnopolo Bologna CNR 

tecnopolo.bo.cnr.it 

 

 

PHONE 

 

+39 051 639 9984

EMAIL 

defalco@xxxxxxxxxxxxxxxxxxxx 

ADDRESS 

Tecnopolo Bologna CNR 

 

Via Piero Gobetti, 101 

 

40129 - Bologna, Italy 

PRIVACY 

policy


 

LET’S CONNECT 

 

 MISTER

 

Tecnopolo


 

 








 


Da: sumo-user <sumo-user-bounces@xxxxxxxxxxx> per conto di Jakob Erdmann via sumo-user <sumo-user@xxxxxxxxxxx>
Inviato: mercoledì 2 aprile 2025 17:23
A: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Cc: Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Oggetto: Re: [sumo-user] od2trips vehicle restrictions
 
od2trips doesn't read a networks and thus doesn't take into account permissions.
You can use  https://sumo.dlr.de/docs/Tools/District.html#filterdistrictspy to obtain a suitable taz for each vClass.

Am Mi., 2. Apr. 2025 um 16:23 Uhr schrieb Federico De Falco via sumo-user <sumo-user@xxxxxxxxxxx>:
Hi everybody,

I am using od2trips to generate trips from a O/D and a TAZ file. My problem is that a TAZ may contain some edges that does not allow all types of vehicle. 
For example, in my case a TAZ contains some source/sink edges (the source/sinks are described in .add.xml file ... is this taken into account by od2trips?) that does not allow passenger vehicles. This is the command I am using:

od2trips --taz-files test.taz.xml -z tazCount.xml -o odOutput.xml

where the test.taz.xml looks like this:

<taz id="taz_0" color="blue" edges="-23393174#0 -454892515#2 23393174#0 454892515#2"/>

and the tazCount.xml like this:

<tazRelation from="taz_0" to="taz_2" count="41"/>

then I want to use duarouter (I am using the command duarouter -n test.net.xml --route-files odOutput.xml -o duarouter.rou.xml ) but I get some errors like Error: Vehicle '2620' is not allowed to depart on edge 'E243'. . Edge E243 in fact allows only trucks.

How can I solve this problem?

Thank you


 

 


FEDERICO 

DE FALCO 


Researcher
 

 

MISTER Smart Innovation
laboratoriomister.it 

Tecnopolo Bologna CNR 

tecnopolo.bo.cnr.it 

 

 

PHONE 

 

+39 051 639 9984

EMAIL 

defalco@xxxxxxxxxxxxxxxxxxxx 

ADDRESS 

Tecnopolo Bologna CNR 

 

Via Piero Gobetti, 101 

 

40129 - Bologna, Italy 

PRIVACY 

policy


 

LET’S CONNECT 

 

 MISTER

 

Tecnopolo


 

 








 

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top