Program structure - HolgerStenberg/KTH_KEX-jobb_2021 GitHub Wiki

this is where the project is described

Warehouse_Environment

The environment of the RL simulation can be found implemented in warehouse_environments.py. This module is responsible to generate a modelled environment that is later used in the main module, to set up the rules of how the agents can behave in the "world".

As of now the plan is to implement a few default environment maps, that can be chosen via parameters in main. The default maps will grow in complexity and size, adding more obstacles and small passages.

The end goal is to have the choice to generate a map that is randomised with a few key parameters to decide the amount of obstacle filled areas and size.

Interface

because a matrix will be created, each element of the matrix can have a certain value.

  • 0: accessible slots
  • 1: shelves/walls
  • a,b,c,..,z : agents
  • A,B,C,...,Z: agent targets note : The amount of 0 slots will depend on how many agents that will be inserted into the simulation.

Warehouse class

The "Warehouse" class, inside "warehouse_environments/warehouse.py" is the map creator tool used in this project. When running a simulation, this class will be responsible to generate a map that can then be used by the rest of the program. The end goal is for this class to be able to autogenerate maps with some parameters as input to decide size and how many agents there will be. For now, it serves as the tool for another module called "default_warehouses.py" that uses the class to generate a class object containing one of 4 different maps.

The maps are the following:

  • default_warehouse_1 - 4x4, 1 agent.
  • default_warehouse_2 - 6x6, 2 agents.
  • default_warehouse_3 - 8x8, 3 agents.
  • default_warehouse_4 - 10x10, 4 agents.

these can be loaded into a main function or a test module by the following lines of code:

  1. import sys
  2. sys.path.append('../')
  3. from warehouse_environments.default_warehouses import *

Usage: obj = default_warehouse_x()