[sumo-user] route.add raises TraCIException(prefix[1], _RESULTS[prefix[2]], err)

2018-05-18 Thread Pedro Matuck
Hello,

I'm using Traci to assing dynamically routes to the vehichle which will be
inserted on the network.

However, sometimes (and I didn't find the pattern of this issue) the
instruction route.add(routeId, [route]) raises TraCIException(prefix[1],
_RESULTS[prefix[2]], err).

I looked for any bug fix on Sumo Logs and  also debug the code... without
success.

Maybe could be a SUMO issue.

Follow the error:

  File "C:\Users\Pedro
Matuck\Documents\GitHub\mestrado.sumo\speed_control\route_manager.py", line
142, in UpdateRoutes
traci.route.add(str(newRouteId), newRoute)
  File "C:\Program Files (x86)\DLR\Sumo\tools\traci\_route.py", line 47, in
add
self._connection._sendExact()
  File "C:\Program Files (x86)\DLR\Sumo\tools\traci\connection.py", line
105, in _sendExact
raise TraCIException(prefix[1], _RESULTS[prefix[2]], err)
traci.exceptions.TraCIException: Could not add route.
Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown
Quitting (on error).

Thanks.

-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] Dynamic User Assignment

2018-05-16 Thread Pedro Matuck
Jakob,

it is possible to insert the first behavior using Traci?

2018-05-15 18:18 GMT-03:00 Jakob Erdmann <namdre.s...@gmail.com>:

> Hello,
> - if you load that flow into duarouter than the route will be the fastest
> path using empty-network travel times.
> - if you load that flow into sumo, than the route will be the fastest
> route using aggregated short-term travel times in the network (accounting
> for other vehicles if there are any).
> regards,
> Jakob
>
> 2018-05-15 22:07 GMT+02:00 Pedro Matuck <pjmat...@gmail.com>:
>
>> Hi,
>>
>> When I set a flow with origin and destination TAZ, the route choosen by
>> cars are based on DUA?
>>
>> I'd like to make cars choose the fastest or shortest route ignoring the
>> presence of other vehicles on network (like usually humans do) and induce
>> traffic jams.
>>
>> Thanks.
>>
>> --
>> *Pedro J. Matuck*
>> Github <https://github.com/pjmatuck> - Linkedin
>> <https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
>> <http://www.youtube.com/c/AbreChaves>
>>
>> "The hardest battle lies within."
>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>>
>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/sumo-user
>
>


-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] Loading Files

2018-05-09 Thread Pedro Matuck
Hello,

I'm using Traci to generate a .rou.xml file. However, it's generated based
on number of nodes and edges which I get from GetIDList methods.

To access the GetIDList, I need to start the simulation using .sumocfg file
which reads a .rou.xml file. I need to create the rou.xml before load
.sumocfg.

It's possible to load the network file (to access the nodes and edges
information) and after some instructions start the simulation with .sumocfg
file?

Thanks.

-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] Add and Remove Routes in a Route Distribution

2018-03-23 Thread Pedro Matuck
Hi,

is it possible to Add/Enable and Remove/Disable routes in a Route
Distribution via TraCI?

Thanks.

-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] Car routing

2018-03-08 Thread Pedro Matuck
Jakob,

Grateful with the support so far. :)

these two parameters are enought to guarantee that all cars will have the
reroute devices and the "edges choice" will be randomly?






Another question... I didn't understand the parameter for
weights.random-factor. What is the difference if I set '10' or '1000'?

Thank you.

2018-03-08 4:37 GMT-03:00 Jakob Erdmann <namdre.s...@googlemail.com>:

> you can get stochasticity into the routing decisions by setting the option
> --weights.randomFactor.
> If you make that value large you should be able to elicit aribtrary turns.
> The option only takes effect when vehicles are equipped with a rerouting
> device and perform periodic rerouting. See http://sumo.dlr.de/wiki/
> Demand/Automatic_Routing
>
> 2018-03-08 0:01 GMT+01:00 Pedro Matuck <pjmat...@gmail.com>:
>
>> Jakob,
>>
>> there're any option where I can set the cars to choose the route based on
>> a stochastic way (or randomly)? (Example: As soon as it reach some
>> junction, the car could pick any way.)
>>
>> I can't assume that cars knows all the network status.
>>
>> Thanks
>>
>> 2018-03-02 3:41 GMT-03:00 Jakob Erdmann <namdre.s...@googlemail.com>:
>>
>>> Yes.
>>> - you can change the algorithm using option --routing.algorithm (
>>> http://sumo.dlr.de/wiki/Simulation/Routing#Routing_Algorithms)
>>> - you can change the assumed travel time values for each edge to affect
>>> the choice of fastest route (http://sumo.dlr.de/wiki/Simul
>>> ation/Routing#Travel-time_values_for_routing)
>>> - you can set another objective function (i.e. routing to minimize CO2
>>> emissions) (http://sumo.dlr.de/wiki/Simulation/Routing#Routing_by_effort
>>> )
>>>
>>> regards,
>>> Jakob
>>>
>>> 2018-03-02 0:11 GMT+01:00 Pedro Matuck <pjmat...@gmail.com>:
>>>
>>>> Hi Jakon,
>>>>
>>>> is it possible to change the algorithm used by cars to find the
>>>> destination path?
>>>>
>>>> Thanks.
>>>>
>>>> 2018-02-09 7:50 GMT-02:00 Jakob Erdmann <namdre.s...@googlemail.com>:
>>>>
>>>>> It may be helpful to read this documentation for a comprehensive
>>>>> explanation of the different routing and rerouting facilities:
>>>>> http://sumo.dlr.de/wiki/Simulation/Routing
>>>>>
>>>>> 2018-01-16 21:40 GMT+01:00 Michael Behrisch <o...@behrisch.de>:
>>>>>
>>>>>> Hi Pedro,
>>>>>> if you are using TraCI then you can set the weight (traveltime) for
>>>>>> the
>>>>>> edge directly
>>>>>> http://sumo.dlr.de/pydoc/traci._edge.html#EdgeDomain-adaptTraveltime
>>>>>> but
>>>>>> then you would also need to trigger the rerouting via TraCI. But if
>>>>>> you
>>>>>> need to run a lot of simulations (as you probably will when doing ML)
>>>>>> you might not wish to use TraCI because it slows down the simulation
>>>>>> considerably.
>>>>>>
>>>>>> Best regards
>>>>>> Michael
>>>>>>
>>>>>> Am 16.01.2018 um 15:32 schrieb Pedro Matuck:
>>>>>> > Hi Michael,
>>>>>> >
>>>>>> > I believe that you answered my question unintentionally.
>>>>>> >
>>>>>> > In summary the cars will always looking for the fastast way,
>>>>>> correct?
>>>>>> > So, everything that affect this will change the car decision:
>>>>>> > Traffic Jam
>>>>>> > Lane Max Speed
>>>>>> > Edge Length
>>>>>> >
>>>>>> > There're anything else that I could change via TraCi to affect  this
>>>>>> > situation?
>>>>>> >
>>>>>> > For my pourposes, the car sensitiveness is helpful because I don't
>>>>>> need
>>>>>> > to worry with them, just change the network status in order to
>>>>>> increase
>>>>>> > the number of arrived cars. The Machine Learn should learn the best
>>>>>> > situation by itself, considering all variables. However, in order
>>>>>> the
>>>>>> > accelerate the learning process, I can use some heuristics to help
>>>>>> the
>>>>>> > ML choose better actions faster.
&g

[sumo-user] Indicators of traffic jam

2018-03-07 Thread Pedro Matuck
Hi guys,

Which indicators of traffic jam can I access using Traci?

On Sumo-GUI, we have a panel (below right on screen), where is possible to
check departed and arrived cars, avg. speed, etc. Looking on Traci API, not
all of these patameters are accessible.

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


Re: [sumo-user] Car routing

2018-01-15 Thread Pedro Matuck
Hi Michael, thank you for the return. I'll try to be more clear and
specific.

I'm working in a Machine Learning that should help the traffic flow. In
summary, I configured a flow to start at some point of network and the cars
should arrive at the destination. In the middle of that, I calculate the
number of arrived cars and take an action after some fixed number of steps.

What I'm trying to do, is (as you said before) influence the travel time
changing the network aspects. For instance: At some point of simulation, if
some lane is with high occupancy, I decrease it 'MaxSpeed' in order to make
other lanes more interesting for the new inserted cars.

Correct me if I missunderstood, but cars use dijkstra to calculate the
fastest way, right? I just need to understand the conditions that affect
the weight of lanes to train my ML in a simple scenario: it involves just
single lanes, one type of cars and a grid network generated by
'netgenerate' (3x3 or 4x4 nodes).

Thank you again.

2018-01-14 17:44 GMT-02:00 Michael Behrisch <o...@behrisch.de>:

> Hi,
> the short answer is it takes the fastest route based on the current
> travel times in the network (this describes the edge part, the lane part
> is handled by the lane changing algorithm). There are multiple ways to
> influence which travel times it assumes when calculating the fastest
> path but maybe you can ask a more specific question here.
>
> Best regards,
> Michael
>
> Am 13.01.2018 um 03:02 schrieb Pedro Matuck:
> > Hello,
> >
> > Please, someone could indicate me the documentation where explain how
> > cars make a decision when we just declare a flow?
> >
> > For example:
> > I have the following declaration on my *.rou.xml file
> >
> > http://www.w3.org/2001/XMLSchema-instance;
> > xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd;>
> >  > speedFactor="0.9" speedDev="0.2" sigma="0.5" color="1,0,0"/>
> > * > from="0/0to1/0" to="1/2to2/2"/>*
> > 
> >
> > After a car is inserted on network, how it makes a decision for which
> > edge/lane it should take in order to get the destination?
> >
> > I read about weights, routing and randomness but nothing were clear
> enough.
> >
> > Thanks.
> >
> > --
> > */Pedro J. Matuck/*
> > Github <https://github.com/pjmatuck> - Linkedin
> > <https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
> > <http://www.youtube.com/c/AbreChaves>
> >
> > "The hardest battle lies within."
> >
> >
> > _______
> > sumo-user mailing list
> > sumo-user@eclipse.org
> > To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> > https://dev.eclipse.org/mailman/listinfo/sumo-user
> >
>
>
>


-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] Car routing

2018-01-12 Thread Pedro Matuck
Hello,

Please, someone could indicate me the documentation where explain how cars
make a decision when we just declare a flow?

For example:
I have the following declaration on my *.rou.xml file

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

* *


After a car is inserted on network, how it makes a decision for which
edge/lane it should take in order to get the destination?

I read about weights, routing and randomness but nothing were clear enough.

Thanks.

-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] Computational cheapest way to use flow of vehicles

2017-12-15 Thread Pedro Matuck
Hi guys,

I need to run a simulation over a hundred of thousands steps. While the
simulation is running, I need to keep one or more vehicles flows on the
network.

Looking network parameters, when the simulation reaches over 5000 vehicles
loaded, the simulation steps starts to take a little bit longer, and each
more loaded vehicles I get, more slow the simulation becomes.

There's any way to use the flows without kiiling the simulation performance?

I don't need to keep the cars instances, just to count how many of them
reach in certain network location.

Thank you.

-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] Retriving Vehicle Total Travel Time

2017-10-12 Thread Pedro Matuck
Hello Jakob,

thanks for the quickly answer. In fact I don't need to print the value, I
just need to store it in a variable (On TraCI) in order to perform some
calculations regarding to the reward function of my AI.

Is there any variable that holds this value before print on console? So I
can take the 'duration' value from there.

Thank you.

2017-10-12 2:46 GMT-03:00 Jakob Erdmann <namdre.s...@googlemail.com>:

> Hello,
> you can take the aggregated value from the standard log file if you set
> option --duration-log.statistics.
> see http://sumo.dlr.de/wiki/Simulation/Output#Aggregated_Traffic_Measures
>
> regards,
> Jakob
>
> 2017-10-12 7:39 GMT+02:00 Pedro Matuck <pjmat...@gmail.com>:
>
>> Hi,
>>
>> On my research, I need to calculate the mean travel time of my network.
>> So far, I'm retrieving this information from tripinfo output.
>>
>> For every simulation, I need to perform an I/O operation. Then, I read
>> and parse the xml, retrieving the information to calculate the average.
>>
>> This is extremely expensive, if you think that I need to run the
>> simulation thousands of time (maybe hundreds of thousands) in order to
>> train my AI.
>>
>> How retrieve this info without outputting the log?
>>
>> Thank you.
>>
>> --
>> *Pedro J. Matuck*
>> Github <https://github.com/pjmatuck> - Linkedin
>> <https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
>> <http://www.youtube.com/c/AbreChaves>
>>
>> "The hardest battle lies within."
>>
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>>
>
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/sumo-user
>
>


-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] Retriving Vehicle Total Travel Time

2017-10-11 Thread Pedro Matuck
Hi,

On my research, I need to calculate the mean travel time of my network. So
far, I'm retrieving this information from tripinfo output.

For every simulation, I need to perform an I/O operation. Then, I read and
parse the xml, retrieving the information to calculate the average.

This is extremely expensive, if you think that I need to run the simulation
thousands of time (maybe hundreds of thousands) in order to train my AI.

How retrieve this info without outputting the log?

Thank you.

-- 
*Pedro J. Matuck*
Github <https://github.com/pjmatuck> - Linkedin
<https://www.linkedin.com/in/pedro-matuck-79324323> - Youtube
<http://www.youtube.com/c/AbreChaves>

"The hardest battle lies within."
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user