Hi Mohsen,

I had a similar problem, where I needed a time varying demand in SUMO. My
solution was to model the traffic flow distribution as a step function.
The details of the step function that I defined are available in a paper
that I have published (link below):
https://dl.dropboxusercontent.com/u/1535439/ALA2015/papers/ala15_mannion_learning.pdf

I hope this will be useful to you.

Kind regards,
Patrick

Patrick Mannion BEng HDipAppSc MIEI
PhD Candidate
Discipline of Information Technology
National University of Ireland, Galway

On Tue, Apr 28, 2015 at 11:07 AM, <[email protected]>
wrote:

> Send sumo-user mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.sourceforge.net/lists/listinfo/sumo-user
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sumo-user digest..."
>
>
> Today's Topics:
>
>    1. TraCI hangs while receiving information (Alberto D?az)
>    2. Re: TraCI hangs while receiving information (Jakob Erdmann)
>    3. Re: TraCI hangs while receiving information (Alberto D?az)
>    4. Re: TraCI hangs while receiving information (Jakob Erdmann)
>    5. Re: TraCI hangs while receiving information (Alberto D?az)
>    6. Arrival rate, Distribution of vehicles within an hour (mohsen hs)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 28 Apr 2015 09:12:33 +0200
> From: Alberto D?az <[email protected]>
> Subject: [sumo-user] TraCI hangs while receiving information
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain;       charset=utf-8
>
> Hi all,
>
> I?ve been trying to connect SUMO server from a python script using TraCI
> (the tutorial of traffic lights located in
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights>). The problem is
> TraCI hangs while receiving data from sumo, in line 272 of
> track/__init__.py:
>
> ?
> t = _connections[""].recv(4 - len(result))
> ?
>
> I don?t know where else look, but I?m sure somebody has suffered this
> problem before and I?s like to know if it?s related to the system where is
> installed (OS X Yosemite), the environment (python 2.7.9) or a known bug in
> SUMO (haven?t found any information about ir, so I don?t think so).
>
> Thank you very much in advance. Have a nice day,
>
> Alberto
>
> ------------------------------
>
> Message: 2
> Date: Tue, 28 Apr 2015 09:50:17 +0200
> From: Jakob Erdmann <[email protected]>
> Subject: Re: [sumo-user] TraCI hangs while receiving information
> To: Alberto D?az <[email protected]>
> Cc: sumo-user <[email protected]>
> Message-ID:
>         <CAMbUcbwhO-Nk7J91buRZB=sJVVWQnRka9c7ch_z85K5vwLAS=
> [email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> Hello,
> possibly the port is in use. Try using a different value for PORT in
> runner.py line 42
> regards,
> Jakob
>
> 2015-04-28 9:12 GMT+02:00 Alberto D?az <[email protected]>:
>
> > Hi all,
> >
> > I?ve been trying to connect SUMO server from a python script using TraCI
> > (the tutorial of traffic lights located in
> > http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> > http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights>). The problem is
> > TraCI hangs while receiving data from sumo, in line 272 of
> > track/__init__.py:
> >
> > ?
> > t = _connections[""].recv(4 - len(result))
> > ?
> >
> > I don?t know where else look, but I?m sure somebody has suffered this
> > problem before and I?s like to know if it?s related to the system where
> is
> > installed (OS X Yosemite), the environment (python 2.7.9) or a known bug
> in
> > SUMO (haven?t found any information about ir, so I don?t think so).
> >
> > Thank you very much in advance. Have a nice day,
> >
> > Alberto
> >
> >
> ------------------------------------------------------------------------------
> > One dashboard for servers and applications across Physical-Virtual-Cloud
> > Widest out-of-the-box monitoring support with 50+ applications
> > Performance metrics, stats and reports that give you Actionable Insights
> > Deep dive visibility with transaction tracing using APM Insight.
> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> > _______________________________________________
> > sumo-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/sumo-user
> >
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 28 Apr 2015 10:03:31 +0200
> From: Alberto D?az <[email protected]>
> Subject: Re: [sumo-user] TraCI hangs while receiving information
> To: Jakob Erdmann <[email protected]>
> Cc: sumo-user <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain;       charset=utf-8
>
> Hello Jacob,
>
> Unfortunately it didn?t work. When address:port is in use it fails loudly
> (a red message in SUMO). I?ve tried some other ports and still hangs.
> Launching it with ?trace option:
>
> ?
> lots of stuff
> ?
> __init__.py(466):             break
> __init__.py(469):     return getVersion()
>  --- modulename: __init__, funcname: getVersion
> __init__.py(491):     command = constants.CMD_GETVERSION
> __init__.py(492):     _message.queue.append(command)
> __init__.py(493):     _message.string += struct.pack("!BB", 1 + 1, command)
> __init__.py(494):     result = _sendExact()
>  --- modulename: __init__, funcname: _sendExact
> __init__.py(289):     if _embedded:
> __init__.py(292):         length = struct.pack("!i", len(_message.string)
> + 4)
> __init__.py(293):         _connections[""].send(length + _message.string)
> __init__.py(294):         result = _recvExact()
>  --- modulename: __init__, funcname: _recvExact
> __init__.py(269):     try:
> __init__.py(270):         result = ""
> __init__.py(271):         while len(result) < 4:
> __init__.py(272):             t = _connections[""].recv(4 - len(result))
>
> Here is where the program hangs and my heart breaks in two. Thanks,
>
> Alberto
>
> > On Apr 28, 2015, at 9:50 AM, Jakob Erdmann <[email protected]>
> wrote:
> >
> > Hello,
> > possibly the port is in use. Try using a different value for PORT in
> runner.py line 42
> > regards,
> > Jakob
> >
> > 2015-04-28 9:12 GMT+02:00 Alberto D?az <[email protected] <mailto:
> [email protected]>>:
> > Hi all,
> >
> > I?ve been trying to connect SUMO server from a python script using TraCI
> (the tutorial of traffic lights located in
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights> <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights>>). The problem is
> TraCI hangs while receiving data from sumo, in line 272 of
> track/__init__.py:
> >
> > ?
> > t = _connections[""].recv(4 - len(result))
> > ?
> >
> > I don?t know where else look, but I?m sure somebody has suffered this
> problem before and I?s like to know if it?s related to the system where is
> installed (OS X Yosemite), the environment (python 2.7.9) or a known bug in
> SUMO (haven?t found any information about ir, so I don?t think so).
> >
> > Thank you very much in advance. Have a nice day,
> >
> > Alberto
> >
> ------------------------------------------------------------------------------
> > One dashboard for servers and applications across Physical-Virtual-Cloud
> > Widest out-of-the-box monitoring support with 50+ applications
> > Performance metrics, stats and reports that give you Actionable Insights
> > Deep dive visibility with transaction tracing using APM Insight.
> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> > _______________________________________________
> > sumo-user mailing list
> > [email protected] <mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/sumo-user <
> https://lists.sourceforge.net/lists/listinfo/sumo-user>
> >
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 28 Apr 2015 10:30:08 +0200
> From: Jakob Erdmann <[email protected]>
> Subject: Re: [sumo-user] TraCI hangs while receiving information
> To: Alberto D?az <[email protected]>
> Cc: sumo-user <[email protected]>
> Message-ID:
>         <
> cambucbwoc8vkpgo_y3az-fb1h74turbapo6a_eftmf253yh...@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hello,
> I'm unfamiliar with this error case.
> recv() might hang due to some firewall dropping packets.
> Theoretically the error might also occur if SUMO doesn't talk to the client
> as it should. What is the state of the GUI while the runner hangs?
>
> 2015-04-28 10:03 GMT+02:00 Alberto D?az <[email protected]>:
>
> > Hello Jacob,
> >
> > Unfortunately it didn?t work. When address:port is in use it fails loudly
> > (a red message in SUMO). I?ve tried some other ports and still hangs.
> > Launching it with ?trace option:
> >
> > ?
> > lots of stuff
> > ?
> > __init__.py(466):             break
> > __init__.py(469):     return getVersion()
> >  --- modulename: __init__, funcname: getVersion
> > __init__.py(491):     command = constants.CMD_GETVERSION
> > __init__.py(492):     _message.queue.append(command)
> > __init__.py(493):     _message.string += struct.pack("!BB", 1 + 1,
> command)
> > __init__.py(494):     result = _sendExact()
> >  --- modulename: __init__, funcname: _sendExact
> > __init__.py(289):     if _embedded:
> > __init__.py(292):         length = struct.pack("!i", len(_message.string)
> > + 4)
> > __init__.py(293):         _connections[""].send(length + _message.string)
> > __init__.py(294):         result = _recvExact()
> >  --- modulename: __init__, funcname: _recvExact
> > __init__.py(269):     try:
> > __init__.py(270):         result = ""
> > __init__.py(271):         while len(result) < 4:
> > __init__.py(272):             t = _connections[""].recv(4 - len(result))
> >
> > Here is where the program hangs and my heart breaks in two. Thanks,
> >
> > Alberto
> >
> > On Apr 28, 2015, at 9:50 AM, Jakob Erdmann <[email protected]>
> > wrote:
> >
> > Hello,
> > possibly the port is in use. Try using a different value for PORT in
> > runner.py line 42
> > regards,
> > Jakob
> >
> > 2015-04-28 9:12 GMT+02:00 Alberto D?az <[email protected]>:
> >
> >> Hi all,
> >>
> >> I?ve been trying to connect SUMO server from a python script using TraCI
> >> (the tutorial of traffic lights located in
> >> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> >> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights>). The problem
> is
> >> TraCI hangs while receiving data from sumo, in line 272 of
> >> track/__init__.py:
> >>
> >> ?
> >> t = _connections[""].recv(4 - len(result))
> >> ?
> >>
> >> I don?t know where else look, but I?m sure somebody has suffered this
> >> problem before and I?s like to know if it?s related to the system where
> is
> >> installed (OS X Yosemite), the environment (python 2.7.9) or a known
> bug in
> >> SUMO (haven?t found any information about ir, so I don?t think so).
> >>
> >> Thank you very much in advance. Have a nice day,
> >>
> >> Alberto
> >>
> >>
> ------------------------------------------------------------------------------
> >> One dashboard for servers and applications across Physical-Virtual-Cloud
> >> Widest out-of-the-box monitoring support with 50+ applications
> >> Performance metrics, stats and reports that give you Actionable Insights
> >> Deep dive visibility with transaction tracing using APM Insight.
> >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> >> _______________________________________________
> >> sumo-user mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/sumo-user
> >>
> >
> >
> >
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 28 Apr 2015 11:05:03 +0200
> From: Alberto D?az <[email protected]>
> Subject: Re: [sumo-user] TraCI hangs while receiving information
> To: Jakob Erdmann <[email protected]>
> Cc: sumo-user <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain;       charset=utf-8
>
> Hello,
>
> I launch TraCI via python runner.py and, whereas it stops in the first
> recv it finds, the socket method ?connect? works (line 465, file
> track/__init__.py):
>
> _connections[label].connect((host, port))
>
> ? OMG!! I?ve realized what was the error. As usual, it?s an usersaurus
> error. I didn?t know I had to click ?start? to start the simulation. I
> thought that starting the simulation with TraCI would have do the same with
> the simulator.
>
> Thank you for your time, Jakob. Have a nice day,
>
> Alberto
>
>
> > On Apr 28, 2015, at 10:30 AM, Jakob Erdmann <[email protected]>
> wrote:
> >
> > Hello,
> > I'm unfamiliar with this error case.
> > recv() might hang due to some firewall dropping packets.
> > Theoretically the error might also occur if SUMO doesn't talk to the
> client as it should. What is the state of the GUI while the runner hangs?
> >
> > 2015-04-28 10:03 GMT+02:00 Alberto D?az <[email protected] <mailto:
> [email protected]>>:
> > Hello Jacob,
> >
> > Unfortunately it didn?t work. When address:port is in use it fails
> loudly (a red message in SUMO). I?ve tried some other ports and still
> hangs. Launching it with ?trace option:
> >
> > ?
> > lots of stuff
> > ?
> > __init__.py(466):             break
> > __init__.py(469):     return getVersion()
> >  --- modulename: __init__, funcname: getVersion
> > __init__.py(491):     command = constants.CMD_GETVERSION
> > __init__.py(492):     _message.queue.append(command)
> > __init__.py(493):     _message.string += struct.pack("!BB", 1 + 1,
> command)
> > __init__.py(494):     result = _sendExact()
> >  --- modulename: __init__, funcname: _sendExact
> > __init__.py(289):     if _embedded:
> > __init__.py(292):         length = struct.pack("!i",
> len(_message.string) + 4)
> > __init__.py(293):         _connections[""].send(length + _message.string)
> > __init__.py(294):         result = _recvExact()
> >  --- modulename: __init__, funcname: _recvExact
> > __init__.py(269):     try:
> > __init__.py(270):         result = ""
> > __init__.py(271):         while len(result) < 4:
> > __init__.py(272):             t = _connections[""].recv(4 - len(result))
> >
> > Here is where the program hangs and my heart breaks in two. Thanks,
> >
> > Alberto
> >
> >> On Apr 28, 2015, at 9:50 AM, Jakob Erdmann <[email protected]
> <mailto:[email protected]>> wrote:
> >>
> >> Hello,
> >> possibly the port is in use. Try using a different value for PORT in
> runner.py line 42
> >> regards,
> >> Jakob
> >>
> >> 2015-04-28 9:12 GMT+02:00 Alberto D?az <[email protected] <mailto:
> [email protected]>>:
> >> Hi all,
> >>
> >> I?ve been trying to connect SUMO server from a python script using
> TraCI (the tutorial of traffic lights located in
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights> <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights <
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights>>). The problem is
> TraCI hangs while receiving data from sumo, in line 272 of
> track/__init__.py:
> >>
> >> ?
> >> t = _connections[""].recv(4 - len(result))
> >> ?
> >>
> >> I don?t know where else look, but I?m sure somebody has suffered this
> problem before and I?s like to know if it?s related to the system where is
> installed (OS X Yosemite), the environment (python 2.7.9) or a known bug in
> SUMO (haven?t found any information about ir, so I don?t think so).
> >>
> >> Thank you very much in advance. Have a nice day,
> >>
> >> Alberto
> >>
> ------------------------------------------------------------------------------
> >> One dashboard for servers and applications across Physical-Virtual-Cloud
> >> Widest out-of-the-box monitoring support with 50+ applications
> >> Performance metrics, stats and reports that give you Actionable Insights
> >> Deep dive visibility with transaction tracing using APM Insight.
> >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> >> _______________________________________________
> >> sumo-user mailing list
> >> [email protected] <mailto:[email protected]
> >
> >> https://lists.sourceforge.net/lists/listinfo/sumo-user <
> https://lists.sourceforge.net/lists/listinfo/sumo-user>
> >>
> >
> >
>
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 28 Apr 2015 10:03:51 +0000 (UTC)
> From: mohsen hs <[email protected]>
> Subject: [sumo-user] Arrival rate, Distribution of vehicles within an
>         hour
> To: "[email protected]"
>         <[email protected]>
> Message-ID:
>         <[email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> Hello there
> I am looking for a method to simulate the vehicles' distributions within
> an hour. ?As far as I know, OD matrix distributes vehicles within an hour
> uniformly. I was wondering if anybody could kindly provide me with some
> information, papers, or formulas to improve this distribution within an
> hour. The data that I have, counted the number of vehicle per hours.
> Since,I need a distribution model for simulation within an hour. Any Help
> is highly appreciated.
>
> Kind regardsMohsen
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>
> ------------------------------
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
>
> End of sumo-user Digest, Vol 105, Issue 38
> ******************************************
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to