when retrieving generic parameters, you can always pass a default value to
return when the key is missing (default return is ""). Either pass a
sensible default or check for the result "" and handle this before trying
to convert it to a number.

Am Di., 4. Feb. 2020 um 14:11 Uhr schrieb Manish Chaturvedi <
msc....@gmail.com>:

> Dear Jacob,
>
> Yes, You are right. The cause of error was that I forgot to edit the file
> SUMOVehicleParserHelper.cpp file. I made the following edits to this file
> as I do not need any additional parameter than Krauss car following model
> at this stage:
>
> std::set<SumoXMLAttr> kraussMymodelParams(kraussParams);
>         allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_MYMODEL =
> kraussMymodelParams;
>         allParams.insert(kraussMymodelParams.begin(),
> kraussMymodelParams.end());
>
> This removed the earlier error but generates a new one.
>
> *Now, three vehicles are able to complete their journey and when the
> fourth vehicle  is about to exit the first edge (enters the junction) in
> the route, the error occurs stating  "Error: Empty Data".*
>
> I found the following reason for this: I have defined a GenericParameter
> for lane which I am retrieving in the car-following model. As the vehicle
> is not on any edge (it is at junction), that parameter value is None.
>
> Is there any clean way to deal with behavior? Can I force the parameter
> read only when the vehicle is on Lane?
>
> Please help
>
> *Regards,*
>
>
> *Manish*
>
>
>
> What is missing this time?
>
> Regards,
>
> Manish
>
>
> On Tue, Feb 4, 2020 at 6:31 PM Jakob Erdmann <namdre.s...@gmail.com>
> wrote:
>
>> I'm guessing, that you did not add your model to
>> https://github.com/eclipse/sumo/blob/261c2832ab1dbe11c4c9d33562bca1347ac8a5f0/src/utils/xml/SUMOXMLDefinitions.cpp#L875-L892
>>
>> regards,
>> Jakob
>>
>> Am Di., 4. Feb. 2020 um 10:54 Uhr schrieb Manish Chaturvedi <
>> msc....@gmail.com>:
>>
>>> Following is my test route file:
>>> <routes>
>>>    <vType id="car"  vClass="passenger" length="5.0" maxSpeed="15.27"
>>> minGap="2.5" probability="1.0"/>
>>>    <route id="route1" edges="gneE0 gneE4 gneE1 gneE5 "/>
>>>    <flow id="1" type="car" beg="0" end="21599" route="route1"
>>> vehsPerHour="500"/>
>>> </routes>
>>>
>>> On Tue, Feb 4, 2020 at 12:26 PM Jakob Erdmann <namdre.s...@gmail.com>
>>> wrote:
>>>
>>>> how are you defining your vType car?
>>>>
>>>> Am Di., 4. Feb. 2020 um 07:43 Uhr schrieb Manish Chaturvedi <
>>>> msc....@gmail.com>:
>>>>
>>>>> Dear SUMO Users and Jacob,
>>>>>
>>>>> I am trying to develop a new car-following model under SUMO as per
>>>>> https://sumo.dlr.de/docs/Developer/How_To/Car-Following_Model.html
>>>>>
>>>>> When I make and run the simulation with --carfollow.model MyModel,
>>>>>
>>>>> I get the following error message:
>>>>>
>>>>>  Unknown car following model carFollowing-MyModel when parsing vType
>>>>> 'car'
>>>>>
>>>>> I think I am missing some configuration step in development but unable
>>>>> to recognize
>>>>>
>>>>> Please guide
>>>>>
>>>>> Regards,
>>>>>
>>>>> Manish
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> sumo-user mailing list
>>>>> sumo-user@eclipse.org
>>>>> To change your delivery options, retrieve your password, or
>>>>> unsubscribe from this list, visit
>>>>> https://www.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://www.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://www.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://www.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://www.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://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to