Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/byq-luo/Lane_change_RL
/ functions
Functions
111 in github.com/byq-luo/Lane_change_RL
⨍
Functions
111
◇
Types & classes
14
↓ 16 callers
Method
reset
reset env :param id: ego vehicle id :param tfc: int. 0:light; 1:medium; 2:dense :return: initial observation
env/LaneChangeEnv.py:306
↓ 15 callers
Method
step
Run one timestep of the environment's dynamics. When end of episode is reached, call `reset()` outside env!! to reset this environment
env/LaneChangeEnv.py:217
↓ 11 callers
Method
calc_acce
(self, v, s, v_leader)
env/IDM.py:16
↓ 11 callers
Method
changeLane
# make compulsory/default lane change, do not respect other vehicles if tgtlane == 0: traci.vehicle.setRouteID(self.veh_i
env/Ego.py:166
↓ 6 callers
Method
close
(self)
env/LaneChangeEnv.py:340
↓ 6 callers
Method
update_info
(self, rd, veh_dict)
env/Ego.py:37
↓ 4 callers
Function
_get_reward_safety
(ego, veh_temp)
others/garbage.py:251
↓ 4 callers
Method
_updateObservationSingle
:param name: 0:ego; 1:leader; 2:target leader; 3:target follower :param id: vehicle id corresponding to name :return:
env/LaneChangeEnv_v2.py:103
↓ 4 callers
Method
_updateObservationSingle
:param name: 0:ego; 1:leader; 2:target leader; 3:target follower :param id: vehicle id corresponding to name :return:
env/LaneChangeEnv.py:95
↓ 4 callers
Method
_updateObservationSingle
:param name: 0:ego; 1:leader; 2:target leader; 3:target follower :param id: vehicle id corresponding to name :return:
env/LaneChangeEnv3.py:104
↓ 4 callers
Method
updateLongitudinalSpeedIDM
use IDM to control vehicle speed :return: acceleration for next timestep
env/Ego.py:144
↓ 3 callers
Method
update
(self)
ppo_test/dppo.py:70
↓ 3 callers
Method
update_veh_dict
(self, veh_id_tuple)
env/LaneChangeEnv.py:80
↓ 2 callers
Method
_Q_function
(self, state, action, trainable=True, scope='Q_function')
dqn/RLAgent.py:82
↓ 2 callers
Method
__init__
(self, id=None, traffic=1, gui=False, seed=None)
env/LaneChangeEnv_v2.py:28
↓ 2 callers
Method
__init__
(self, id=None, traffic=1, gui=False, seed=None)
env/LaneChangeEnv3.py:29
↓ 2 callers
Method
_build_anet
(self, name, trainable)
ppo_old/PPO.py:84
↓ 2 callers
Method
_build_anet
(self, name, trainable)
ppo_test/ppo_pendulum.py:100
↓ 2 callers
Method
_build_anet
(self, name, trainable)
ppo_test/dppo.py:87
↓ 2 callers
Method
_build_state
(self, state, scope)
dqn/RLAgent.py:52
↓ 2 callers
Method
choose_action
(self, s)
ppo_test/dppo.py:94
↓ 2 callers
Function
policy_fn
(name, ob_space, ac_space)
ppo_new/run.py:22
↓ 2 callers
Function
train
(num_timesteps, is_train)
ppo_new/run.py:18
↓ 2 callers
Function
traj_segment_generator
(pi, env, horizon, stochastic)
ppo_new/ppo_sgd.py:15
↓ 2 callers
Method
updateObservation
(self)
env/LaneChangeEnv_v2.py:121
↓ 2 callers
Method
updateObservation
(self)
env/LaneChangeEnv.py:118
↓ 2 callers
Method
updateObservation
(self)
env/LaneChangeEnv3.py:122
↓ 2 callers
Method
updateReward
(self, action_lateral)
env/LaneChangeEnv.py:133
↓ 2 callers
Method
update_veh_dict
(self, veh_id_tuple)
env/LaneChangeEnv_v2.py:91
↓ 2 callers
Method
update_veh_dict
(self, veh_id_tuple)
env/LaneChangeEnv3.py:92
↓ 1 callers
Function
IDM_normal
()
plot/plot.py:48
↓ 1 callers
Method
__init__
(self, id=None, traffic=1, gui=False, seed=None)
env/LaneChangeEnv.py:20
↓ 1 callers
Method
_build_model
(self)
dqn/RLAgent.py:19
↓ 1 callers
Method
_build_network
(self, state_features, trainable=True, scope='network')
dqn/RLAgent.py:105
↓ 1 callers
Method
_get_state_features
(self, state)
dqn/RLAgent.py:78
↓ 1 callers
Function
add_vtarg_and_adv
Compute target value using TD(lambda) estimator, and advantage with GAE(lambda)(Generalize Advantage Estimation)
ppo_new/ppo_sgd.py:81
↓ 1 callers
Method
choose_action
(self, s)
ppo_old/PPO.py:92
↓ 1 callers
Method
choose_action
(self, s)
ppo_test/ppo_pendulum.py:109
↓ 1 callers
Method
close
(self)
env/LaneChangeEnv_v2.py:386
↓ 1 callers
Method
close
(self)
env/LaneChangeEnv3.py:398
↓ 1 callers
Method
get_acceNext
(self, action_longi)
env/Ego.py:133
↓ 1 callers
Method
get_v
(self, s)
ppo_old/PPO.py:98
↓ 1 callers
Method
get_v
(self, s)
ppo_test/ppo_pendulum.py:114
↓ 1 callers
Method
get_v
(self, s)
ppo_test/dppo.py:100
↓ 1 callers
Method
is_done
(self)
env/LaneChangeEnv_v2.py:235
↓ 1 callers
Method
is_done
(self)
env/LaneChangeEnv.py:189
↓ 1 callers
Method
is_done
(self)
env/LaneChangeEnv3.py:247
↓ 1 callers
Method
learn_actor
(self, s, a)
ppo_old/PPO.py:72
↓ 1 callers
Method
learn_critic
(self, s, r)
ppo_old/PPO.py:78
↓ 1 callers
Function
main
()
ppo_new/run.py:43
↓ 1 callers
Function
normal
(env)
others/test.py:15
↓ 1 callers
Method
preStep
(self)
env/LaneChangeEnv_v2.py:257
↓ 1 callers
Method
preStep
(self)
env/LaneChangeEnv.py:212
↓ 1 callers
Method
preStep
(self)
env/LaneChangeEnv3.py:269
↓ 1 callers
Method
seed
(self, seed=None)
env/LaneChangeEnv_v2.py:341
↓ 1 callers
Method
seed
(self, seed=None)
env/LaneChangeEnv.py:299
↓ 1 callers
Method
seed
(self, seed=None)
env/LaneChangeEnv3.py:353
↓ 1 callers
Method
setSpeedLimit
(self, new_sl)
env/IDM.py:13
↓ 1 callers
Method
setTrgtLane
(self, trgtlane)
env/Ego.py:130
↓ 1 callers
Method
update
(self, s, a, r)
ppo_test/ppo_pendulum.py:76
↓ 1 callers
Method
updateReward
(self)
env/LaneChangeEnv_v2.py:134
↓ 1 callers
Method
updateReward
(self)
env/LaneChangeEnv3.py:135
↓ 1 callers
Method
update_old_pi
(self, s, r)
ppo_old/PPO.py:67
Function
IDMCtrl
(env)
others/test.py:116
Function
IDMStep
(self)
others/garbage.py:25
Function
IDM_para
()
plot/plot.py:26
Method
__init__
(self, sess, pretrain=False, replay_memory_size=2000, learning_rate=0.0001)
dqn/RLAgent.py:10
Method
__init__
assume all lanes have the same width
env/Road.py:12
Method
__init__
(self, veh_id, rd)
env/Vehicle.py:15
Method
__init__
(self, v0=39.44)
env/IDM.py:5
Method
__init__
(self, veh_id, rd)
env/Ego.py:18
Method
__init__
(self, veh_id, rd)
env/Vehicle2.py:13
Method
__init__
(self, veh_id, rd)
env/Vehicle2.py:228
Method
__init__
(self, sess, S_DIM=12, A_NUM=6, A_LR=0.000
ppo_old/PPO.py:6
Method
__init__
(self)
ppo_test/ppo_pendulum.py:31
Method
__init__
(self)
ppo_test/dppo.py:35
Method
__init__
(self, wid)
ppo_test/dppo.py:106
Method
_state_sample_transform
(self, state_samples)
dqn/RLAgent.py:167
Function
badLongiCtrl
(env)
others/test.py:132
Function
calcAcce
(self)
others/garbage.py:1
Function
changeLane
(env)
others/test.py:40
Method
changeLane
if tgtlane == 0: traci.vehicle.setRouteID(self.veh_id, rd.rampExitRouteID) else: traci.vehicle.setRouteID(sel
env/Vehicle2.py:199
Method
changeLane
if tgtlane == 0: traci.vehicle.setRouteID(self.veh_id, rd.rampExitRouteID) else: traci.vehicle.setRouteID(sel
env/Vehicle2.py:414
Function
changeNback
(veh, cps)
others/test.py:54
Function
clipVelocity
(self, v)
others/garbage.py:54
Function
decision
(self)
others/garbage.py:37
Function
doubleCtrl
(env)
others/test.py:151
Function
extractAction
(testid, env, f)
others/test.py:100
Function
flatten_lists
(listoflists)
ppo_new/ppo_sgd.py:338
Method
get_best_action
(self, state_eval)
dqn/RLAgent.py:133
Method
get_chosen_action
(self, state_eval)
dqn/RLAgent.py:138
Function
laneChange
(low, high, origLane, tgtLane, rd)
others/test.py:53
Function
learn
(env, policy_fn, *, timesteps_per_actorbatch, # timesteps per actor per update clip_param
ppo_new/ppo_sgd.py:98
Function
longiCtrl
(self, action_longi)
others/garbage.py:63
Function
read_IDM_data
()
plot/plot.py:5
Method
remember
(self, state, action, reward, next_state)
dqn/RLAgent.py:147
Method
replay
(self, batch_size)
dqn/RLAgent.py:151
Method
reset
reset env :param id: ego vehicle id :param tfc: int. 0:light; 1:medium; 2:dense :return: initial observation
env/LaneChangeEnv_v2.py:348
Method
reset
reset env :param id: ego vehicle id :param tfc: int. 0:light; 1:medium; 2:dense :return: initial observation
env/LaneChangeEnv3.py:360
Method
step
Run one timestep of the environment's dynamics. When end of episode is reached, call `reset()` outside env!! to reset this environment
env/LaneChangeEnv_v2.py:262
next →
1–100 of 111, ranked by callers