21 lines
541 B
Python
21 lines
541 B
Python
from mesa.visualization.modules import CanvasGrid
|
|
from mesa.visualization.ModularVisualization import ModularServer
|
|
|
|
from ForkliftModel import ForkliftModel
|
|
|
|
|
|
def agent_portrayal(agent):
|
|
portrayal = {"Shape": "image.png", "scale": 1.0, "Layer": 0}
|
|
|
|
return portrayal
|
|
|
|
|
|
grid = CanvasGrid(agent_portrayal, 10, 10, 512, 512)
|
|
|
|
server = ModularServer(ForkliftModel,
|
|
[grid],
|
|
"Automatyczny Wózek Widłowy",
|
|
{"width": 10, "height": 10})
|
|
server.port = 8888
|
|
server.launch()
|