Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] SUMO is encountering Fatal Error

Hi Ifezue,

the vehicle '0' does exactly, what you defined:

it repeats its loop (with a cycle of 900 sec) 50 times, starting at 3600 seconds.

So at about 48600 seconds it disappears.

I would rewrite your traci loop as following

traci.start(sumoCmd)
step = 0
csvfile = open('passengers.csv', 'w')

while traci.simulation.getMinExpectedNumber() > 0:
  traci.simulationStep()

  # Execution for Beginning of Simulation
  # do nothing special
  # Execution for collecting Ridership within Bus Vehicles
  if 3600 <= step <= 46000:
        # This set of code gets the number of riders currently within the bus
        simulation_runtime = traci.simulation.getTime()
        list_of_ridership = [str(simulation_runtime)]
        for i in range(8):
          # take care, if vehicle does not exist
          try:
            ridership = traci.vehicle.getPersonNumber(str(i))
          except:
            ridership = 0
          list_of_ridership.append(str(ridership))
        # create a comma-separated list
        print(','.join(list_of_ridership), file=csvfile, flush=True)

  step += 1
csvfile.close()
traci.close()

Best regards, Harald

Am 09.10.21 um 18:16 schrieb Ifezue Obiako:
I just saw that and I fixed it, and the simulation is running all the way through when I run the SUMO gui, but when I run it with TraCI I seem to be getting a new set of errors that looks something like this: 

image.png
I am not sure why my vehicle 0 is throwing up an error at the timestep of 49493. I looked through the xml files and changed some things but I am still getting the same errors. For reference, I have attached the revised zip file to this email. 

On Sat, Oct 9, 2021 at 10:40 AM Harald Schaefer <fechsaer@xxxxxxxxx> wrote:

Hi Ifezue,

if you run your scenario with plain sumo (sumo -c test.sumocfg), you get these lines at the end

Warning: Teleporting vehicle 'Trad1113b.54'; collision with vehicle 'Trad1113a.71', lane='OldShellWB60_0', gap=-5.78, time=26677.00 stage=move.
Warning: Vehicle 'Trad1113b.54' teleports beyond arrival edge 'OldShellWB60', time 26677.00.
Warning: Vehicle 'Trad313a.34' performs emergency braking with decel=-7.47 wished=3.27 severity=1.00, time=26716.00.
Error: Another person with the id 'UCOM8a_Yellow1.0' exists. 24078 ACT 216 BUF 2)        
Quitting (on error).

So there exist two persons with the same id (in the file PersonFlowTest_Yellow1_BASE.rou.xml at line 162 and 168)

Regards, Harald

Am 08.10.21 um 22:35 schrieb Ifezue Obiako:

Hello Everyone

 

I was running SUMO through TraCI to see if my simulation would run all the way through its intended simulation time of 61200 seconds of sim time, but the SUMO gui closed (or crashed – not sure) and I received these errors in both the command line/Python IDE when the simulation closed:

 

image.png

 

I am not fully sure what the issue is with TraCI or my Python code. I went to my Python code and added an if else statement to hopefully fix the issue but I still received the same error message. Does anyone know what may be occurring with my simulation? For reference, I have attached my Python script. If there is any other additional information or questions, please let me know.

 

Thank you

Ifezue

 

Sent from Mail for Windows

 


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top