Hello!

To better track this problem, I reported it as a issue in sumo repository:
https://github.com/eclipse/sumo/issues/7856

Thanks!

Em seg., 23 de nov. de 2020 às 10:45, Tiago Silva <[email protected]>
escreveu:

> Dear all!
>
> To check parse behavior, I changed the value in overtaking.sumo.cfg to a 
> *invalid
> value*:
>
> ...
> <random_number>
>        *<random value='trsdue'/>*
> </random_number>
> ...
>
> And included a debug WRITE_WARNING in OptionsCont::set() function (
> https://github.com/eclipse/sumo/blob/master/src/utils/options/OptionsCont.cpp#L249
> ):
>
> *diff --git a/src/utils/options/OptionsCont.cpp 
> b/src/utils/options/OptionsCont.cpp**index 8061dfd1e0..d2ebe7ff91 100644**--- 
> a/src/utils/options/OptionsCont.cpp**+++ 
> b/src/utils/options/OptionsCont.cpp**@@ -247,6 +247,7 @@* 
> OptionsCont::getStringVector(const std::string& name) const {
>
>  bool
>  OptionsCont::set(const std::string& name, const std::string& value) {*+*     
>   *WRITE_WARNING("set '" + name + "' = '" + value + "'");*
>      Option* o = getSecure(name);
>      if (!o->isWriteable()) {
>          reportDoubleSetting(name);
>
> In sumo-gui directly, the tool tries to parse incorrect value and displays
> a error message (attached file):
> [image: image.png]
>
> but using TraCi it loads default value false to random (attached file):
> [image: image.png]
> Thanks in advance!
>
> Em seg., 23 de nov. de 2020 às 09:49, Tiago Silva <
> [email protected]> escreveu:
>
>> Hello!
>>
>> I did some debugging yesterday and found that when I load the network via
>> TraCi it *uses the OptionsParser* and when I load the network via *sumo-gui
>> it uses SAXParser*. This is because myArgC is 3 via Traci and 0 via
>> sumo-gui at this point in the code:
>> https://github.com/eclipse/sumo/blob/master/src/utils/options/OptionsIO.cpp#L131
>>
>> myArgV values using TraCi:
>> myArgV[0]: /home/tiago/src/sumo/bin/sumo-gui
>> myArgV[1]: -c
>> myArgV[2]: overtaking.sumo.cfg
>>
>> Does anyone know if this is the expected behavior? Do you know if the
>> OptionsParser can parse *random_number* correctly?
>>
>> Thanks in advance!
>>
>> Em dom., 22 de nov. de 2020 às 11:39, Tiago Silva <
>> [email protected]> escreveu:
>>
>>> Hello everyone!
>>>
>>> Forgiveness for the delay in returning. I performed some additional
>>> tests and found that the problem must be with the way I load the network. I
>>> noticed that if I load the network directly into the sumo-gui random works
>>> correctly. However if I use traci it is not working (which is my case). I
>>> use Omnet ++ with Veins. Therefore, the network is loaded via TraCi by
>>> Omnet ++.
>>> I continue to investigate the reason for this. However, if anyone has
>>> any tips I would appreciate it very much.
>>>
>>> Thanks in advance!
>>>
>>> Em qua., 21 de out. de 2020 às 16:40, Michael Behrisch <[email protected]>
>>> escreveu:
>>>
>>>> Hi,
>>>> I just tested the most recent build with --random and it works as
>>>> expected.
>>>>
>>>> Best regards,
>>>> Michael
>>>>
>>>> Am 21.10.20 um 20:32 schrieb Tiago Silva:
>>>> > Dear Andras and Lokesh,
>>>> >
>>>> > Thanks for your reply! Unfortunately, even with seed and random my
>>>> > simulation is generating the same flow in different simulation runs. I
>>>> > tested this in v1_7_0 tag and in master branch with all current
>>>> > changes. Is this working for you? If so, it's probably a problem in my
>>>> > build...
>>>> >
>>>> > thanks in advance!
>>>> >
>>>> > Em qua., 21 de out. de 2020 às 13:56, Lokesh Das <
>>>> [email protected]
>>>> > <mailto:[email protected]>> escreveu:
>>>> >
>>>> >     Hi Tiago,
>>>> >
>>>> >     From the heading, it seems that you want to change the vehicle
>>>> >     injection probability in every simulation run. If it is, you can
>>>> do
>>>> >     it in two ways: i) manually- every time change probability value
>>>> in
>>>> >     route file or ii) dynamically- change it using TraCI API. However,
>>>> >     if you want with the same probability every simulation should have
>>>> >     given you a different flow, just change the default seed value
>>>> >     (23423; see https://sumo.dlr.de/docs/Simulation/Randomness.html).
>>>> >     You can do it using <random value = "true" /> in *.sumocfg file.
>>>> It
>>>> >     simply uses the system current time as a seed value.
>>>> >
>>>> >     Thanks,
>>>> >     Lokesh
>>>> >
>>>> >     On Wed, Oct 21, 2020 at 8:15 AM Tiago Silva
>>>> >     <[email protected] <mailto:[email protected]>>
>>>> wrote:
>>>> >
>>>> >         hello,
>>>> >
>>>> >         I'm generating a flow of vehicles with probability='0.3' as
>>>> seen
>>>> >         in the code below:
>>>> >
>>>> >         / <flow id='flow_2' color="0,0,1" begin='0' end='4500'
>>>> >         probability='0.3' type='vehicleType_1'>
>>>> >                   <route edges='5to1 1to3'/>
>>>> >         </flow>/
>>>> >
>>>> >         It works correctly and generates the random flows I need
>>>> during
>>>> >         the simulation. However, I noticed that if I execute the
>>>> >         simulation again it will generate the same random flow as the
>>>> >         previous execution. Can you tell me if this is the expected
>>>> >         behavior of random flow? I need to generate different flows in
>>>> >         each simulation execution. Is there any way to do this?
>>>> >
>>>> >         Thanks in advance!
>>>> >
>>>> >         --
>>>> >         Att.
>>>> >         Tiago Alves Silva
>>>> >
>>>> >         _______________________________________________
>>>> >         sumo-user mailing list
>>>> >         [email protected] <mailto:[email protected]>
>>>> >         To unsubscribe from this list, visit
>>>> >         https://www.eclipse.org/mailman/listinfo/sumo-user
>>>> >
>>>> >     _______________________________________________
>>>> >     sumo-user mailing list
>>>> >     [email protected] <mailto:[email protected]>
>>>> >     To unsubscribe from this list, visit
>>>> >     https://www.eclipse.org/mailman/listinfo/sumo-user
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Att.
>>>> > Tiago Alves Silva
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > sumo-user mailing list
>>>> > [email protected]
>>>> > To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>> >
>>>>
>>>>
>>>> _______________________________________________
>>>> sumo-user mailing list
>>>> [email protected]
>>>> To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>
>>>
>>>
>>> --
>>> Atenciosamente,
>>>
>>> Tiago Alves Silva
>>>
>>>
>>
>> --
>> At.te,
>>
>>
>> *Tiago Alves Silva*
>>
>> Analista de Desenvolvimento de Sistemas
>>
>> Celular:+ 55 11 9 9819 7073
>>
>> Skype: tiago.silva1230
>>
>
>
> --
> At.te,
>
>
> *Tiago Alves Silva*
>
> Analista de Desenvolvimento de Sistemas
>
> Celular:+ 55 11 9 9819 7073
>
> Skype: tiago.silva1230
>


-- 
Atenciosamente,

Tiago Alves Silva
[image:
https://gm1.ggpht.com/LJr19TT2nRt0XIBDHwBNLKWcKb3DU-kWnCnN6Kze2H4dEGFrfZ9tL1BxQfknKzqbIIO4IGaTxT8BUl-9XoguKRRVI_4MayDBI0VH10uK5u54syDmfLTTK7-qa4YDq1Gn7hyAyKi_H1sJB8SHs0UtELq4Cvv28mniMU9CqupXoJXujCkhUJfIgWyGtoxb3eIS8ykTebtauQN--4W6i11-LAwDr4eQc-p5PH0EGZZ3bxsZC0bYzGZpS0CZKhIoLaiiJDLZdjzGhzd6I0Ez5sghUxZj6fE3ubcQcW-LXeI4CeO88BHxLlCutNFR1-H3Ev0QTYhmPmjbdAq1FHbjW4pBDBCXbbaIwaHEJfSatcC-9cx2WgTEz5zlt0IGLDMB2M8hydsibvBG5-3Y0ZhjovgI-0Y5q-5ANCe2R5qe8ujMOAOGmIOUS3p5EVG486Gk3aPqm-4C1M90KdbxNRU0KSlCOzPfRdzl-G6PdnHrfQsvgQv6V63r2wLqJtrcAQBa7myWP9yvv2qk-z7QW3rKYNIbWu_03dZESGUhj7K2P2FUVIPlCdAh_gCWSEpJI5NL2vtHuw3AlIVr1MYvjgIK65Xpzy8vaPdTaE6Xli7_WM2fYbIDVpPJe6p2FfA1mvf1kCgP0Gor8UY39OC8z0ogxJUgXhEoyEW8TDykoudQmHntuAGgjmrWtpxYD2cTP7vK0hXdV0inbKqYRdFhvcwu2sp_culNDIPMtN8ru5KA829oJleV1T-ViZYK4E1umYX95rOcC3xeSx6R=s0-l75-ft-l75-ft]
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to