Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Sumolib : Find Alternate routes and route wise total length

Dear,

Thanks for reply.
I have wrote simple algorithm to find_all the routes. Its my humble request to guide me if i am doing right or not?

Find_Route(Start_Node)
{
Outgoing_Edge = Get all the out going edge of Start_Node
For Each Outgoing_Edge
{
Next_Node  = get Next_Node of all the Outgoing_Edge
if Next_Node is not in Visisted_node_list and Next_Node !=Last_Node
{
Store Next_Node in Visisted_node_list 
Store Outgoing_Edge to Final_Route_list
Call Find_Route(Next_Node)
}
}
}

On Thu, May 16, 2019 at 7:33 PM <sumo-user-request@xxxxxxxxxxx> wrote:
Send sumo-user mailing list submissions to
        sumo-user@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://www.eclipse.org/mailman/listinfo/sumo-user
or, via email, send a message with subject or body 'help' to
        sumo-user-request@xxxxxxxxxxx

You can reach the person managing the list at
        sumo-user-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sumo-user digest..."


Today's Topics:

   1. Error when loading a instance of a new vehicle type
      (Azise Oumar Diallo)
   2. Sumolib : Find Alternate routes and route wise total      length
      (Bijal)
   3. Re: Sumolib : Find Alternate routes and route wise total
      length (sumo@xxxxx)
   4. Re: Error when loading a instance of a new vehicle type
      (sumo@xxxxx)


----------------------------------------------------------------------

Message: 1
Date: Thu, 16 May 2019 12:12:07 +0200
From: Azise Oumar Diallo <diallitoz@xxxxxxxxx>
To: sumo-user@xxxxxxxxxxx
Subject: [sumo-user] Error when loading a instance of a new vehicle
        type
Message-ID:
        <CAH7Lq__AQzLZHZ0=5N4PieWZhobxEi7Zr1+LNNGHmFTY+H9hpw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Hello,

I would like to test a new type of vehicle named *trotinette* that means
scooter in English to implement his driving on road network.

So I created this new vType based on *bicycle* vType class within the files
SUMOVehicleClass (.h, .cpp) and SUMOVTypeParameter (.cpp).

Here is the error message that I get when I try loading it with sumo-gui :

Loading done.
Error: Vehicle 'vh1' has no valid route. Edge 'e1' prohibits.
Quitting (on error).

Are there any other major files to modify to make it work?

Find attached config, net and route files.

Best regards,
Azise
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/8b8261df/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trotiNet.net.xml
Type: text/xml
Size: 1368 bytes
Desc: not available
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/8b8261df/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: troti.rou.xml
Type: text/xml
Size: 666 bytes
Desc: not available
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/8b8261df/attachment-0001.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: troti.sumocfg
Type: application/octet-stream
Size: 151 bytes
Desc: not available
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/8b8261df/attachment.obj>

------------------------------

Message: 2
Date: Thu, 16 May 2019 18:39:18 +0800
From: Bijal <bijal.varia88@xxxxxxxxx>
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Subject: [sumo-user] Sumolib : Find Alternate routes and route wise
        total   length
Message-ID:
        <CABbss+jVfLMiFQfr-DHFbOE102Sp4_QhJdzvaarJ9HvnBFXRyQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Dear Listing,

I am using Sumolib. [Converted net file to graph].

*My question :* How to get the list of the alternate possible routes from
Source node to destination node.

Moreover this i need to know the total length of the edges
[edge.getLength()] for each routes,source to Destination. *[So that i can
identify that the route which i am getting through my algorithm, is
shortest or not]*

For example Output for Source node: 2 to  Destination node:9 should look
like this :

*2-3-8-9 : Total Length = 400mtr*
*2-4-5-3-9 :Total Length = 300mtr Etc..*

Please help me to get this information out of the graph.

--
*:)*
Bijal Varia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/f494ca7a/attachment.html>

------------------------------

Message: 3
Date: Thu, 16 May 2019 13:16:42 +0200
From: sumo@xxxxx
To: sumo-user@xxxxxxxxxxx
Subject: Re: [sumo-user] Sumolib : Find Alternate routes and route
        wise total      length
Message-ID: <984fc830-b73b-4574-9e93-702270277aeb@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Dear Bijal,

I guess that you will have to build routes by yourself, as far as I know Sumolib offers only "getShortestPath" method.

Building a random set of routes is not complicated if you allow cycles, see e.g. https://stackoverflow.com/questions/37953983/. As the route is a python list of edges, you may easily iterate over the list the get the total route length.

Jan

On Thu, 16 May 2019, at 12:39 PM, Bijal wrote:
> Dear Listing,
>
> I am using Sumolib. [Converted net file to graph].
>
> *My question :* How to get the list of the alternate possible routes from Source node to destination node.
>
> Moreover this i need to know the total length of the edges [edge.getLength()] for each routes,source to Destination. *[So that i can identify that the route which i am getting through my algorithm, is shortest or not]*
>
> For example Output for Source node: 2 to Destination node:9 should look like this :
>
> *2-3-8-9 : Total Length = 400mtr*
> *2-4-5-3-9 :Total Length = 300mtr Etc..*
>
> Please help me to get this information out of the graph.
>
> --
> *:)*
> Bijal Varia
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/8af2d7ac/attachment.html>

------------------------------

Message: 4
Date: Thu, 16 May 2019 13:33:23 +0200
From: sumo@xxxxx
To: sumo-user@xxxxxxxxxxx
Subject: Re: [sumo-user] Error when loading a instance of a new
        vehicle type
Message-ID: <64dc82e6-47ba-4163-bf1c-31301779ab8a@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Dear Azise,

it seems that your "trotinette" is not allowed to drive over the network edge "e1". It may be because SUMO still thinks it is a bicycle and bicycles are disallowed on that edge or because you did not alter your network edges to allow this vehicle type. Try to open your test network in NETEDIT and have a look which vehicle types are (dis)allowed on the given edge.

Jan

On Thu, 16 May 2019, at 12:06 PM, Azise Oumar Diallo wrote:
> Hello,
>
> I would like to test a new type of vehicle named *trotinette* that means scooter in English to implement his driving on road network.
>
> So I created this new vType based on *bicycle* vType class within the files SUMOVehicleClass (.h, .cpp) and SUMOVTypeParameter (.cpp).
>
> Here is the error message that I get when I try loading it with sumo-gui :
>
> Loading done.
> Error: Vehicle 'vh1' has no valid route. Edge 'e1' prohibits.
> Quitting (on error).
>
> Are there any other major files to modify to make it work? ****__
> ****__
> Find attached config, net and route files.
>
> Best regards,
> Azise
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
>
> *Attachments:*
>  * trotiNet.net.xml
>  * troti.rou.xml
>  * troti.sumocfg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190516/61a03b8b/attachment.html>

------------------------------

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user


End of sumo-user Digest, Vol 23, Issue 48
*****************************************


--
:)
Bijal Varia

Back to the top