Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] getCompleteRedYellowGreenDefinition

Hi,

I am trying to obtain traffic light information so that I can change phase
durations permanently for a RL project I am working on. Since
/traci.trafficlight.setPhaseDuraction/ only sets the phase temporarily I am
forced to update the whole program. Below is a simple test of the
/getCompleteRedYellowGreenDefinition/ function in order to familiarize my
self with the required parameters to set the new program.

/phase = traci.trafficlight.getCompleteRedYellowGreenDefinition('tl1')
print('TL definition: '+str(phase))/

This generates the following error script:

/    print('Phase program: '+str(phase))
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\_trafficlight.py",
line 63, in __repr__
    (self.programID, self.type, self.currentPhaseIndex, self.phases,
self.subParameter))
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\_trafficlight.py",
line 34, in __repr__
    (self.duration, self.state, self.minDur, self.maxDur, self.__next__))
AttributeError: 'Phase' object has no attribute '__next__'/

Any help on this issue?

Regards,
Matthew 



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/


Back to the top