Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] SUMO crashing when an added vehicle exits
  • From: Didac Busquets <didac.busquets@xxxxxxxxxx>
  • Date: Tue, 12 Sep 2023 07:17:39 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=immense.ai; dmarc=pass action=none header.from=immense.ai; dkim=pass header.d=immense.ai; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LXiE893u7lhCf3HOqsmxdhnI4+IYyGxdeC+7xSqEiQY=; b=jImRAf/IEJeDsy6+xCn1xkSb0xNYVYmsw+5o9IXlSPDMdr5h0KV8U0ZMwAaI+VsrMBkbzajqYKuSDAqysLyPuFeHa56wUJIXRdrr/rvf49VKXlE0USCcBE4hTpmg7jkTJrnW5RolENbSIxbs4wDbFJFIzGsSAG0BPkPbhcMOtu8CfcB/gpX5qKXu8RVG4/781vtKSqanlokjd9THouMWj8OLjGVMfoyuSMOeoP8uz9erHMJiH7HHQ1+aI0dEa9Y0YtFMy3ffjY2B8gF57kKN3GIC+ZzB4XEJtwCUfnACA0Do2HGduNLnD6RDNu6FK2RWv4TyAFpP46sSzkWTF//9Wg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XHuJEMFebcWh7rPvKAMpz/2hYF9eJPPe7qUQ2/ntuzU6/6ysdSYrr3ARZcXUWUSJ2jDb3hMLmfSKMBineoeBYbu7anLmT+z0IcoF4pIh7fwunzqyqpeZSAojJjPIW2pq3GMKpcxzmZ2ytC3S7lsiWEQpYfvLiH2Zt+tShRL8szPZG7M1LXe0VZS4o30hf/dRATEQ+4+bbH7VC6D9DDSyvN98Fcbl0wjxpHruP8D9claZY+BLQq/WN7E5VkSzPLk2qjpG/OzpRgI4dE/JnR8RtAEAhYO+oiiD/7SuuBGv+X+5U5V7XYE1cl8UtVC45tbLMTWQPcQEIWEcCAjheMv/bg==
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-user/>
  • List-help: <mailto:sumo-user-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=unsubscribe>
  • Msip_labels: MSIP_Label_c4b900a3-9924-4ac9-8e08-73c5aef8b397_Enabled=True;
  • Thread-index: AQHZ4wX1sYVt6vs/LUWoCCzc31v0DLAVgLUAgAFLdTM=
  • Thread-topic: [sumo-user] SUMO crashing when an added vehicle exits

Thank you Mirko,

That fixed it. I defined a new route (not a flow) and assign it to the new vehicle and it worked like a charm!

Regards,

Didac


From: Mirko Barthauer <m.barthauer@xxxxxxxxxxx>
Sent: 11 September 2023 13:30
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>; sumo-user@xxxxxxxxxxx <sumo-user@xxxxxxxxxxx>
Cc: Didac Busquets <didac.busquets@xxxxxxxxxx>
Subject: AW: [sumo-user] SUMO crashing when an added vehicle exits
 

This is related to your route definition. If you want to reuse a route outside a flow, better define it outside the flow, assign it an ID and refer to that ID in the flow or when adding a vehicle by TraCI. You can find an example of such a route definition here.

 

Best regards

Mirko

 

 

 

 

-----Original-Nachricht-----

Betreff: [sumo-user] SUMO crashing when an added vehicle exits

Datum: 2023-09-09T12:17:26+0200

Von: "Didac Busquets via sumo-user" <sumo-user@xxxxxxxxxxx>

An: "sumo-user@xxxxxxxxxxx" <sumo-user@xxxxxxxxxxx>

 

 

 

Hi,
 
I have a simple TraCI scripts that add a vehicle to a network composed of a single long link.
 
The vehicle is added correctly, but when that vehicle reaches the end of the link, SUMO crashes. 
 
The script is as follows (also attached, with the rest of the required network and config files).
 
Why is it crashing?     
 
import traci
 
sumo_binary = "sumo"
sumo_cmd = [sumo_binary, "-c", "single_highway.sumocfg"]
 
traci.start(sumo_cmd)
step = 0
route_id = "!type1"
 
while step < 300:
    traci.simulationStep()
    if step == 50:
        print(f"Adding vehicle at {step} route {route_id}")
        traci.vehicle.add(vehID="added_vehicle",
                          routeID=route_id)
        traci.vehicle.setColor(vehID="added_vehicle", color=(255,0,0))
    step += 1
 
traci.close()
The error when crashing is:
 
Traceback (most recent call last):
  File "/home/didac/development/SUMO/networks/single_highway/run.py", line 12, in <module>
    traci.simulationStep()
  File "/home/didac/development/sumo-1.2.0/tools/traci/__init__.py", line 126, in simulationStep
    responses = _connections[""].simulationStep(step)
  File "/home/didac/development/sumo-1.2.0/tools/traci/connection.py", line 329, in simulationStep
    result = self._sendExact()
  File "/home/didac/development/sumo-1.2.0/tools/traci/connection.py", line 105, in _sendExact
    raise FatalTraCIError("connection closed by SUMO")
traci.exceptions.FatalTraCIError: connection closed by SUMO
(notebooks-env) didac@didac-Precision-5530:~/development/SUM
 
 
Regards,
 
   Didac
 
 

Twitter  Facebook  LinkedIn 

Didac Busquets, PhD Chief Scientist and co-founder
didac.busquets@xxxxxxxxxx


Sign up to our newsletter here

www.immense.ai

Personal data: emails, by default, contain basic personal data and are not necessarily secure. If, in answering this email, you provide additional personal information, we will process that information for the purposes for which you have supplied it and as set out in our Privacy Policy, which also contains information about your rights.

This communication, and the information it contains, is (a) intended for the person(s) and/or organisation(s) to whom it is addressed and is for no other person(s) or organisation(s) and (b) may be confidential, legally privileged and protected by law, including law of copyright. Unauthorised use, copying, forwarding or disclosure of any of it may be unlawful. If you have received this communication in error, please contact us immediately at privacy@xxxxxxxxxx.

Immense Simulations Barcelona SL, ES B67427807, C/Corsega, 299, 6e, 08008 Barcelona, Spain is a subsidiary of Immense Simulations Limited, a limited company registered in England and Wales with registered number 09782647,
and registered address at International House, 36-38 Cornhill, London, England, EC3V 3NG..

 

 

 

 



Back to the top