Skip to content
Snippets Groups Projects
Commit b2eab862 authored by u214892's avatar u214892
Browse files

cleanup ci

parent 3c28b2d5
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ class GraphicsLayer(object): ...@@ -68,7 +68,7 @@ class GraphicsLayer(object):
def get_cmap(self, *args, **kwargs): def get_cmap(self, *args, **kwargs):
return plt.get_cmap(*args, **kwargs) return plt.get_cmap(*args, **kwargs)
def setRailAt(self, row, col, binTrans, iTarget=None,isSelected=False): def setRailAt(self, row, col, binTrans, iTarget=None, isSelected=False):
""" Set the rail at cell (row, col) to have transitions binTrans. """ Set the rail at cell (row, col) to have transitions binTrans.
The target argument can contain the index of the agent to indicate The target argument can contain the index of the agent to indicate
that agent's target is at that cell, so that a station can be that agent's target is at that cell, so that a station can be
...@@ -76,7 +76,7 @@ class GraphicsLayer(object): ...@@ -76,7 +76,7 @@ class GraphicsLayer(object):
""" """
pass pass
def setAgentAt(self, iAgent, row, col, iDirIn, iDirOut,isSelected=False): def setAgentAt(self, iAgent, row, col, iDirIn, iDirOut, isSelected=False):
pass pass
def resize(self, env): def resize(self, env):
......
...@@ -762,8 +762,7 @@ class RenderTool(object): ...@@ -762,8 +762,7 @@ class RenderTool(object):
if agent is None: if agent is None:
continue continue
dTargets[tuple(agent.target)] = iAgent dTargets[tuple(agent.target)] = iAgent
dSelected[tuple(agent.target)] = (iAgent==iSelectedAgent) dSelected[tuple(agent.target)] = (iAgent == iSelectedAgent)
# Draw each cell independently # Draw each cell independently
for r in range(env.height): for r in range(env.height):
...@@ -777,7 +776,7 @@ class RenderTool(object): ...@@ -777,7 +776,7 @@ class RenderTool(object):
target = None target = None
isSelected = False isSelected = False
self.gl.setRailAt(r, c, binTrans, iTarget=target,isSelected=isSelected) self.gl.setRailAt(r, c, binTrans, iTarget=target, isSelected=isSelected)
for iAgent, agent in enumerate(self.env.agents): for iAgent, agent in enumerate(self.env.agents):
...@@ -795,7 +794,7 @@ class RenderTool(object): ...@@ -795,7 +794,7 @@ class RenderTool(object):
# setAgentAt uses the agent index for the color # setAgentAt uses the agent index for the color
# cmap = self.gl.get_cmap('hsv', lut=max(len(self.env.agents), len(self.env.agents_static) + 1)) # cmap = self.gl.get_cmap('hsv', lut=max(len(self.env.agents), len(self.env.agents_static) + 1))
self.gl.setAgentAt(iAgent, *position, old_direction, direction, iSelectedAgent==iAgent) # ,color=cmap(iAgent)) self.gl.setAgentAt(iAgent, *position, old_direction, direction, iSelectedAgent == iAgent)
if show_observations: if show_observations:
self.renderObs(range(env.get_num_agents()), env.dev_obs_dict) self.renderObs(range(env.get_num_agents()), env.dev_obs_dict)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment