Compare commits

..

60 Commits

Author SHA1 Message Date
69df0198da Merge pull request 'order_visualization' (#5) from order_visualization into master
Reviewed-on: #5
2022-06-10 08:56:02 +02:00
Aleksander Szamałek
9443c03e0a grid changes 2022-06-10 08:52:43 +02:00
xVulpeSx
530b221763 added sorting -> cut orders and orders to fill 2022-06-10 01:40:40 +02:00
Aleksander Szamałek
868ba1bfd7 fix 2022-06-10 01:28:40 +02:00
Aleksander Szamałek
5004058725 rework of forklift agent loop 2022-06-10 01:16:43 +02:00
Aleksander Szamałek
b37847b304 item display row 2022-06-09 22:38:02 +02:00
23950ba5b5 ItemDisplayAgent 2022-06-09 22:37:36 +02:00
Aleksander Szamałek
153f16bcc0 visual changes 2022-06-09 22:36:28 +02:00
Makrellka
d0cde0beab Packing stations refactor 2022-06-09 22:24:46 +02:00
3ae78c6ee5 Merge pull request 'genetic -> master' (#4) from genetic into master
Reviewed-on: #4
2022-06-09 22:05:44 +02:00
6866e825ce fin implemented DecisionTree and GeneticOrder 2022-06-09 21:54:18 +02:00
Makrellka
abd60f9c15 fix - added sum/time TODO implement tree client recognision 2022-06-08 14:57:37 +02:00
xVulpeSx
5cb4dee25e wip -> working genetic sorting 2022-06-07 23:15:04 +02:00
xVulpeSx
53cf8c9937 wip 2022-06-07 01:07:49 +02:00
Jakub-Prus
566a8cd868 small fix 2022-06-06 23:46:27 +02:00
Jakub-Prus
e5a7a975e8 . 2022-06-02 11:13:21 +02:00
Jakub-Prus
c5e0b65445 model for image classification from file 2022-06-02 11:11:57 +02:00
Jakub-Prus
e67aa84f1f . 2022-06-02 01:56:52 +02:00
Jakub-Prus
8f9d89b908 image classification to file without training 2022-06-02 01:56:09 +02:00
Jakub-Prus
ff968efae6 big image database update
saved model importt
2022-05-27 11:23:07 +02:00
Jakub-Prus
84b3bd5a13 big image database update
saved model import
2022-05-27 11:21:06 +02:00
Aleksander Szamałek
9fde24439c tuple from typing 2022-05-27 00:18:58 +02:00
Aleksander Szamałek
13e5c5d62c agent - item recognition loop 2022-05-27 00:03:24 +02:00
Makrellka
bc5bdf6fa4 fix 2022-05-26 19:27:40 +02:00
Makrellka
bf4d4aaeaa pathByEnum util added 2022-05-26 19:22:51 +02:00
Makrellka
52bfb06608 item images upload 2022-05-26 18:52:26 +02:00
b944eab69a Merge pull request 'engine_improvements' (#3) from engine_improvements into master
Reviewed-on: #3
2022-05-25 23:54:39 +02:00
Aleksander Szamałek
668ed6edf9 visual improvements 2022-05-25 23:52:03 +02:00
Aleksander Szamałek
ed1262930c order execution 2022-05-25 23:52:03 +02:00
Jakub-Prus
c568bc02df class from imageClasification.py and images for refrigerators 2022-05-25 21:16:09 +02:00
Jakub-Prus
cfe781ce79 small changes in imageClasification 2022-05-25 14:16:31 +02:00
Jakub-Prus
5ad15bcd82 Merge remote-tracking branch 'origin/master' 2022-05-25 14:13:17 +02:00
Jakub-Prus
b5084a11ec image base shelf 2022-05-25 14:12:47 +02:00
Jakub-Prus
bcbc769825 image base cow 2022-05-25 14:12:15 +02:00
Jakub-Prus
1b013d400c image base doors 2022-05-25 14:11:21 +02:00
Jakub-Prus
7a4b228583 image base 2022-05-25 14:09:34 +02:00
bbc168af80 Prześlij pliki do 'imageClasification/Images/cow' 2022-05-25 13:04:50 +02:00
Jakub-Prus
a767b8b0ea build image clasification and update requirements 2022-05-25 08:48:28 +02:00
Jakub-Prus
89a1a4399d Building dataset and resizing images 2022-05-25 08:11:49 +02:00
Aleksander Szamałek
522b29269d engine improvements 2022-05-22 16:27:36 +02:00
xVulpeSx
4504d0d412 resolved problems with Direction class 2022-05-14 15:05:43 +02:00
xVulpeSx
2c63d5f5a5 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	main.py
2022-05-14 15:04:11 +02:00
xVulpeSx
353b5f0174 separate decisionTree from main() 2022-05-14 15:03:29 +02:00
876832c0e0 fixed data 2022-05-13 10:04:09 +02:00
xVulpeSx
f7cccd4b4d decisionTree final update 2022-05-12 19:52:13 +02:00
df2bc2a04f client factory added better data creation 2022-05-12 17:05:12 +02:00
xVulpeSx
77625d79e4 decisionTree update 2022-05-11 19:05:44 +02:00
f7b6da279d zajecia drzewa decyzyjne 2022-05-09 15:51:48 +02:00
Makrellka
d72364e069 clean-up, rotation weight fix 2022-04-28 21:22:19 +02:00
Makrellka
718362190f weighted puddles, fixed wall destination 2022-04-28 20:34:03 +02:00
Makrellka
7324fc47d9 pudlles implementation without weights 2022-04-28 14:03:53 +02:00
Aleksander Szamałek
f6a07386a8 implemented movement on states 2022-04-28 02:09:41 +02:00
Aleksander Szamałek
88d2ebe087 review 2022-04-28 01:50:56 +02:00
Makrellka
3c5dfc2e34 minor fixes 2022-04-28 00:29:29 +02:00
Makrellka
4caef2e9ae minor implementations of state logic 2022-04-28 00:05:12 +02:00
xVulpeSx
952123366f pathFinder on states init 2022-04-27 01:26:25 +02:00
Aleksander Szamałek
3cd1af516d note 2022-04-22 10:30:23 +02:00
Aleksander Szamałek
650b5ab787 decision structure 2022-04-16 15:55:43 +02:00
Aleksander Szamałek
11f73635d6 agents structure improvements 2022-04-16 14:55:25 +02:00
ab11d2725e Merge pull request 'jer_test' (#1) from jer_test into master
Reviewed-on: #1
2022-04-14 23:29:46 +02:00
3437 changed files with 2144 additions and 349 deletions

2
.gitignore vendored
View File

@ -50,7 +50,7 @@ MANIFEST
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
# Unit pathfinding / coverage reports
htmlcov/
.tox/
.nox/

14
AgentBase.py Normal file
View File

@ -0,0 +1,14 @@
from mesa import Agent, Model
from util.AgentIdFactory import AgentIdFactory
class AgentBase(Agent):
def __init__(self, model: Model):
unique_id = AgentIdFactory.get_next_id()
super().__init__(unique_id, model)
self.creation_log()
def creation_log(self):
pass

View File

@ -1,54 +1,147 @@
from typing import Tuple
from copy import deepcopy
from typing import Tuple, List
from mesa import Agent
from data.Direction import Direction
from AgentBase import AgentBase
from PatchAgent import PatchAgent
from PatchType import PatchType
from data.GameConstants import GameConstants
from data.Item import Item
from data.Order import Order
from data.enum.Direction import Direction
from data.enum.ItemType import ItemType
from decision.Action import Action
from decision.ActionType import ActionType
from pathfinding.PathFinderState import PathFinderState
from pathfinding.PathfinderOnStates import PathFinderOnStates
from util.PathDefinitions import GridLocation, GridWithWeights
class ForkliftAgent(Agent):
class ForkliftAgent(AgentBase):
def __init__(self, unique_id, model):
super().__init__(unique_id, model)
self.movement_queue = [Tuple[int, int]]
def __init__(self, model, game_constants: GameConstants, client_delivery: PatchAgent, drop_off: PatchAgent,
graph: GridWithWeights):
super().__init__(model)
self.action_queue: List[Action] = []
self.current_position = Tuple[int, int]
self.current_rotation = Direction.right
print("Created forklift Agent with ID: {}".format(unique_id))
self.orderList = []
self.fulfilled_orders: List[Order] = []
self.client_delivery: PatchAgent = client_delivery
self.drop_off: PatchAgent = drop_off
self.graph = graph
self.game_constants = game_constants
self.item_station_completed = False
self.current_order_delivered_items: List[Item] = []
self.ready_for_execution = False
self.last_delviered_item = None
def assign_new_movement_task(self, movement_list):
self.movement_queue = []
self.current_item: Item = None
self.current_order = None
self.base: GridLocation = None
self.goal: GridLocation = None
for m in movement_list:
self.movement_queue.append(m)
def set_base(self, drop_off: PatchAgent):
self.drop_off = drop_off
self.base = self.drop_off.location
self.goal = self.base
print("Assigned new movement queue to forklift agent")
def get_proper_rotation(self, next_pos: Tuple[int, int]) -> Direction:
if next_pos[0] < self.current_position[0]:
return Direction.left
elif next_pos[0] > self.current_position[0]:
return Direction.right
elif next_pos[1] > self.current_position[1]:
return Direction.top
elif next_pos[1] < self.current_position[1]:
return Direction.down
elif next_pos == self.current_position:
return self.current_rotation
def queue_movement_actions(self, movement_actions: List[Action]):
self.action_queue.extend(movement_actions)
def move(self):
if len(self.movement_queue) > 0:
next_pos = self.movement_queue.pop(0)
if len(self.action_queue) > 0:
action = self.action_queue.pop(0)
action_type = action.action_type
dir = self.get_proper_rotation(next_pos)
if action_type == ActionType.ROTATE_UP:
# print("rotate {} --> {}".format(self.current_rotation, action_type))
self.current_rotation = Direction.top
if dir == self.current_rotation:
print("move {} --> {}".format(self.current_position, next_pos))
self.current_position = next_pos
else:
print("rotate {} --> {}".format(self.current_rotation, dir))
self.current_rotation = dir
self.movement_queue.insert(0, next_pos)
elif action_type == ActionType.ROTATE_RIGHT:
# print("rotate {} --> {}".format(self.current_rotation, action_type))
self.current_rotation = Direction.right
elif action_type == ActionType.ROTATE_DOWN:
# print("rotate {} --> {}".format(self.current_rotation, action_type))
self.current_rotation = Direction.down
elif action_type == ActionType.ROTATE_LEFT:
# print("rotate {} --> {}".format(self.current_rotation, action_type))
self.current_rotation = Direction.left
elif action_type == ActionType.MOVE:
if self.current_rotation == Direction.top:
# print("move {} --> {}".format(self.current_position, action_type))
self.current_position = (self.current_position[0], self.current_position[1] + 1)
elif self.current_rotation == Direction.down:
# print("move {} --> {}".format(self.current_position, action_type))
self.current_position = (self.current_position[0], self.current_position[1] - 1)
elif self.current_rotation == Direction.right:
# print("move {} --> {}".format(self.current_position, action_type))
self.current_position = (self.current_position[0] + 1, self.current_position[1])
elif self.current_rotation == Direction.left:
# print("move {} --> {}".format(self.current_position, action_type))
self.current_position = (self.current_position[0] - 1, self.current_position[1])
def step(self) -> None:
print("forklift step")
self.move()
if len(self.action_queue) > 0:
self.move()
elif self.ready_for_execution:
if self.current_position != self.goal:
pathFinder = PathFinderOnStates(
self.game_constants,
self.goal,
PathFinderState(self.current_position,
self.current_rotation,
0,
Action(
desired_item=None,
action_type=ActionType.PICK_ITEM
),
[])
)
actions = pathFinder.get_action_list()
self.queue_movement_actions(actions)
else:
if self.current_order is not None and self.goal == self.base:
self.current_item = self.current_order.items.pop(0)
packing_station: GridLocation = None
stations = dict(self.graph.packingStations)
if self.current_item.real_type == ItemType.SHELF:
packing_station = stations[PatchType.packingShelf]
elif self.current_item.real_type == ItemType.REFRIGERATOR:
packing_station = stations[PatchType.packingRefrigerator]
elif self.current_item.real_type == ItemType.DOOR:
packing_station = stations[PatchType.packingDoor]
self.goal = packing_station
elif self.goal in [i[1] for i in self.graph.packingStations]:
self.goal = self.client_delivery.location
elif self.goal == self.client_delivery.location:
if self.current_order is not None and len(self.current_order.items) == 0:
self.current_order_delivered_items.append(self.current_item)
self.current_order.items = deepcopy(self.current_order_delivered_items)
self.fulfilled_orders.append(self.current_order)
self.current_item = None
self.current_order = None
self.goal = self.base
else:
self.current_order_delivered_items.append(self.current_item)
self.goal = self.base
self.current_item = None
elif self.goal == self.base and self.current_order is None:
self.current_order_delivered_items.clear()
self.current_order = self.orderList.pop(0)
def creation_log(self):
print("Created Forklift Agent [id: {}]".format(self.unique_id))

View File

@ -1,66 +1,301 @@
import copy
from enum import Enum
from typing import List, Tuple
from mesa import Model
from mesa.space import MultiGrid
from mesa.time import RandomActivation
from AgentBase import AgentBase
from ForkliftAgent import ForkliftAgent
from InitialStateFactory import InitialStateFactory
from ItemDisplayAgent import ItemDisplayAgent
from PatchAgent import PatchAgent
from PatchType import PatchType
from util.PathDefinitions import inverse_y
from util.PathVisualiser import draw_grid, reconstruct_path
from util.Pathfinder import a_star_search
from PictureVisualizationAgent import PictureVisualizationAgent
from data.GameConstants import GameConstants
from data.Item import Item
from data.Order import Order
from data.enum.ItemType import ItemType
from decision.Action import Action
from decision.ActionType import ActionType
from genetic_order.GeneticOrder import GeneticOrder
from imageClasification.Classificator import image_classification
from pathfinding.PathfinderOnStates import PathFinderOnStates, PathFinderState
from tree.DecisionTree import DecisionTree
from util.PathByEnum import PathByEnum
from util.PathDefinitions import GridLocation, GridWithWeights
class Phase(Enum):
INIT = 1
ITEM_RECOGNITION = 2
CLIENT_SORTING = 3
PLAN_MOVEMENT = 4
EXECUTION = 5
class GameModel(Model):
def __init__(self, width, height, graph):
def __init__(self, width, height, graph: GridWithWeights, items: int, orders: int, classificator,
item_display_pos: List[GridLocation]):
# self.num_agents = 5
self.first = True
self.item_recognised = False
self.running = True
self.grid = MultiGrid(height, width, True)
self.schedule = RandomActivation(self)
self.agents = []
self.current_item_recognition = None
self.current_item = None
self.client_delivery: PatchAgent = None
self.drop_off: PatchAgent = None
self.graph = graph
self.cut_orders : List[Order] = []
self.game_constants = GameConstants(
width,
height,
graph.walls,
graph.puddles
)
self.agents = [AgentBase]
self.forklift_agent = ForkliftAgent(
self,
self.game_constants,
self.client_delivery,
self.drop_off,
self.graph
)
self.forklift_agent = ForkliftAgent(0, self)
self.schedule.add(self.forklift_agent)
self.agents.append(self.forklift_agent)
self.item_display_agents: List[ItemDisplayAgent] = []
# INITIALIZATION #
print("############## INITIALIZATION ##############")
self.phase = Phase.INIT
self.initialize_grid(graph, item_display_pos)
self.orderList: List[Order] = InitialStateFactory.generate_order_list(orders)
self.fulfilled_orders: List[Order] = []
self.forklift_agent.fulfilled_orders = self.fulfilled_orders
self.forklift_agent.set_base(self.drop_off)
self.classificator = classificator
print("############## RECOGNISE ITEMS ##############")
self.phase = Phase.ITEM_RECOGNITION
self.provided_items = InitialStateFactory.generate_item_list(items)
self.items_for_recognization = copy.deepcopy(self.provided_items)
self.recognised_items: List[Item] = []
self.current_order_delivered_items = self.forklift_agent.current_order_delivered_items
print("Relocate forklift agent to loading area for item recognition")
pathFinder = PathFinderOnStates(
self.game_constants,
self.drop_off.location,
PathFinderState(self.forklift_agent.current_position, self.forklift_agent.current_rotation, 0,
Action(ActionType.NONE), [])
)
actions = pathFinder.get_action_list()
print("PATHFINDING")
print(actions)
self.forklift_agent.queue_movement_actions(actions)
self.current_order = self.forklift_agent.current_order
def initialize_grid(self, graph: GridWithWeights, item_display_pos):
print("INITIALIZING GRID")
# Add the agent to a random grid cell
x = 5
y = 5
self.grid.place_agent(self.forklift_agent, (x, y))
self.forklift_agent.current_position = (x, y)
start, goal = (x, y), (2, 1)
came_from, cost_so_far = a_star_search(graph, start, goal)
draw_grid(graph, point_to=came_from, start=start, goal=goal)
self.picture_visualization = PictureVisualizationAgent(
self,
(1, 11),
)
self.schedule.add(self.picture_visualization)
self.grid.place_agent(self.picture_visualization, self.picture_visualization.location)
self.agents.append(self.picture_visualization)
path = map(lambda t: (t[0], inverse_y(height, t[1])),
reconstruct_path(came_from=came_from, start=start, goal=goal))
self.place_logistics()
self.place_dividers()
self.place_walls_agents(graph.walls)
self.place_puddles(graph.puddles)
self.place_packing_stations(graph.packingStations)
self.place_order_items_display(item_display_pos)
print("cam from: {}".format(came_from))
print("costerino: {}".format(cost_so_far))
draw_grid(graph, path=reconstruct_path(came_from, start=start, goal=goal))
def place_dividers(self):
for i in range(0, 10):
for j in range(10, 13):
agent = PatchAgent(self, (i, j), PatchType.divider)
self.agents.append(agent)
self.grid.place_agent(agent, (i, j))
self.forklift_agent.assign_new_movement_task(path)
agent = PatchAgent(1, self, PatchType.pickUp)
# self.schedule.add(agent)
self.grid.place_agent(agent, (self.grid.width - 1, self.grid.height - 1))
def place_logistics(self):
agent = PatchAgent(self, (self.grid.width - 1, int(self.grid.height / 2)), PatchType.pickUp)
self.schedule.add(agent)
self.grid.place_agent(agent, agent.location)
self.agents.append(agent)
self.client_delivery = agent
self.forklift_agent.client_delivery = self.client_delivery
agent = PatchAgent(2, self, PatchType.dropOff)
# self.schedule.add(agent)
self.grid.place_agent(agent, (0, self.grid.height - 1))
agent = PatchAgent(self, (0, int(self.grid.height / 2)), PatchType.dropOff)
self.grid.place_agent(agent, agent.location)
self.agents.append(agent)
self.drop_off = agent
self.forklift_agent.drop_off = self.drop_off
for i in range(3):
a = PatchAgent(i + 3, self, PatchType.item)
self.agents.append(a)
self.grid.place_agent(a, (i, 0))
def place_walls_agents(self, walls: List[GridLocation]):
for w in walls:
agent = PatchAgent(self, w, PatchType.wall)
self.agents.append(agent)
self.grid.place_agent(agent, w)
def place_puddles(self, puddles: List[GridLocation]):
for p in puddles:
agent = PatchAgent(self, p, PatchType.diffTerrain)
self.agents.append(agent)
self.grid.place_agent(agent, p)
def place_packing_stations(self, packing_stations: List[Tuple[PatchType, GridLocation]]):
for p in packing_stations:
agent = PatchAgent(self, p[1], p[0])
self.agents.append(agent)
self.grid.place_agent(agent, p[1])
def place_order_items_display(self, item_positions: List[GridLocation]):
for p in item_positions:
agent = ItemDisplayAgent(self, p)
self.item_display_agents.append(agent)
self.grid.place_agent(agent, p)
def update_item_display(self):
self.current_item = self.forklift_agent.current_item
for i in range(4):
self.item_display_agents[i].image = None
if len(self.forklift_agent.current_order_delivered_items) > i:
self.item_display_agents[i].image = self.forklift_agent.current_order_delivered_items[i].image
def step(self):
self.schedule.step()
print("update multiGrid")
self.grid.remove_agent(self.forklift_agent)
self.grid.place_agent(self.forklift_agent, self.forklift_agent.current_position)
self.update_item_display()
if self.phase == Phase.ITEM_RECOGNITION:
if not self.item_recognised and self.forklift_agent.current_position == self.drop_off.location:
if len(self.items_for_recognization) == 0:
print("FINISHED ITEM RECOGNITION")
self.item_recognised = True
self.phase = Phase.CLIENT_SORTING
self.forklift_agent.ready_for_execution = True
else:
print("BEGIN ITEM RECOGNITION, left: {}".format(len(self.items_for_recognization)))
item_to_recognise = self.items_for_recognization.pop()
self.picture_visualization.img = PathByEnum.get_random_path(item_to_recognise.real_type)
recognised = self.recognise_item(item_to_recognise)
self.recognised_items.append(recognised)
if self.phase == Phase.CLIENT_SORTING:
orders: [Order] = self.orderList
tree: DecisionTree = DecisionTree()
# CLIENT RECOGNITION
orders_with_prio = tree.get_data_good(orders)
# print("before:" )
# for i in range(len(orders_with_prio)):
# print("ORDER {}, PRIO: {}".format(orders_with_prio[i].id, orders_with_prio[i].priority))
# GENERICS SORTING
genericOrder: GeneticOrder = GeneticOrder(orders_with_prio)
new_orders = genericOrder.get_orders_sorted(orders)
# print("after:" )
# for i in range(len(new_orders)):
# print("ORDER {}, PRIO: {}".format(new_orders[i].id, new_orders[i].priority))
self.orderList = new_orders
self.count_recognised_items()
self.sort_orders()
self.forklift_agent.orderList = self.orderList
print("FINISHED CLIENT ORDER SORTING")
self.phase = Phase.EXECUTION
if self.phase == Phase.EXECUTION:
self.current_order = self.forklift_agent.current_order
pass
# print("Execution")
def sort_orders(self):
orders_to_fill: [Order] = []
cut_orders: [Order] = []
for i in range(len(self.orderList)):
o: Order = self.orderList[i]
refrige = self.count_item_type(o, ItemType.REFRIGERATOR)
shelf = self.count_item_type(o, ItemType.SHELF)
door = self.count_item_type(o, ItemType.DOOR)
if self.count_shelf - shelf >= 0 and self.count_refrige - refrige >= 0 and self.count_door - door >= 0:
self.count_shelf -= shelf
self.count_door -= door
self.count_refrige -= refrige
orders_to_fill.append(o)
else:
cut_orders.append(o)
self.cut_orders = cut_orders
self.orderList = orders_to_fill
self.forklift_agent.orderList = orders_to_fill
def count_item_type(self, o: Order, itemType: ItemType) -> int:
res = 0
for i in range(len(o.items)):
it: Item = o.items[i]
if it.guessed_type == itemType:
res += 1
return res
def count_recognised_items(self):
count_refrige: int = 0
count_door: int = 0
count_shelf: int = 0
for i in range(len(self.recognised_items)):
item: Item = self.recognised_items[i]
if item.guessed_type == ItemType.DOOR:
count_door += 1
elif item.guessed_type == ItemType.SHELF:
count_shelf += 1
else:
count_refrige += 1
self.count_door = count_door
self.count_shelf = count_shelf
self.count_refrige = count_refrige
def recognise_item(self, item: Item):
val = image_classification(self.picture_visualization.img, self.classificator)
print("VAL: {}".format(val))
if val == ItemType.DOOR:
item.guessed_type = ItemType.DOOR
elif val == ItemType.REFRIGERATOR:
item.guessed_type = ItemType.REFRIGERATOR
elif val == ItemType.SHELF:
item.guessed_type = ItemType.SHELF
return item

89
InitialStateFactory.py Normal file
View File

@ -0,0 +1,89 @@
import random
from data.Item import Item
from data.Order import Order
from data.enum.ItemType import ItemType
from data.enum.Priority import Priority
from util.ClientParamsFactory import ClientParamsFactory
from util.PathByEnum import PathByEnum
class InitialStateFactory:
@staticmethod
def generate_item_list(output_list_size: int):
item_list: [Item] = []
for i in range(output_list_size):
item_list.append(InitialStateFactory.__generate_item())
return item_list
@staticmethod
def generate_order_list(output_order_list_size: int):
order_list: [Order] = []
for i in range(output_order_list_size):
order_list.append(InitialStateFactory.__generate_order())
return order_list
@staticmethod
def generate_order_list_XD(output_order_list_size: int):
order_list: [Order] = []
for i in range(output_order_list_size):
order_list.append(InitialStateFactory.__generate_order_XD())
return order_list
@staticmethod
def __generate_order_XD() -> Order:
order_size = random.randint(1, 4)
items: [Item] = []
for i in range(order_size):
items.append(InitialStateFactory.__generate_item())
time_base = random.randint(8, 20)
final_time = time_base * order_size
client_params = ClientParamsFactory.get_client_params()
x = random.randint(0, 3)
type = Priority.LOW
if x == 0:
type = Priority.MEDIUM
elif x == 1:
type = Priority.HIGH
x = random.randint(20, 300)
return Order(final_time, items, type, x, client_params)
@staticmethod
def __generate_order() -> Order:
order_size = random.randint(1, 4)
items: [Item] = []
for i in range(order_size):
items.append(InitialStateFactory.__generate_item())
time_base = random.randint(8, 20)
final_time = time_base * order_size
client_params = ClientParamsFactory.get_client_params()
return Order(final_time, items, Priority.LOW, 0, client_params)
@staticmethod
def generate_input_sequence(self, input_sequence_size):
sequence: [Item] = []
for i in range(0, input_sequence_size):
sequence.append(self.__generate_item())
return sequence
@staticmethod
def __generate_item() -> Item:
randomly_picked_type = random.choice(list(ItemType))
item = Item(randomly_picked_type, PathByEnum.get_random_path(randomly_picked_type))
item.guessed_type = item.real_type
return item

10
ItemDisplayAgent.py Normal file
View File

@ -0,0 +1,10 @@
from PatchAgent import PatchAgent
from PatchType import PatchType
from util.PathDefinitions import GridLocation
class ItemDisplayAgent(PatchAgent):
def __init__(self, model, location: GridLocation):
self.image = None
super().__init__(model, location, patch_type=PatchType.itemDisplay)

View File

@ -1,11 +1,14 @@
from mesa import Agent, Model
from AgentBase import AgentBase
from PatchType import PatchType
from util.PathDefinitions import GridLocation
class PatchAgent(Agent):
class PatchAgent(AgentBase):
def __init__(self, unique_id, model, type: PatchType):
super().__init__(unique_id, model)
self.type = type
print("Created Patch Agent with ID: {}".format(unique_id))
def __init__(self, model, location: GridLocation, patch_type: PatchType):
self.location = location
self.patch_type = patch_type
super().__init__(model)
def creation_log(self):
print("Created Patch Agent [id: {} ,type: {}]".format(self.unique_id, self.patch_type))

View File

@ -4,4 +4,11 @@ import enum
class PatchType(enum.Enum):
dropOff = 1
pickUp = 2
item = 3
item = 3
wall = 4
diffTerrain = 5
packingShelf = 6
packingRefrigerator = 7
packingDoor = 8
divider = 9
itemDisplay = 10

View File

@ -0,0 +1,13 @@
from AgentBase import AgentBase
from util.PathDefinitions import GridLocation
class PictureVisualizationAgent(AgentBase):
def __init__(self, model, location: GridLocation):
self.location = location
self.img = ""
super().__init__(model)
def creation_log(self):
print("Created Patch Agent [id: {} ,img: {}]".format(self.unique_id, self.img))

View File

@ -1,8 +0,0 @@
from enum import Enum
class CATEGORY(Enum):
PIZZA = 1
PASTA = 2
EGG = 3
UNKNOWN = 4

21
data/ClientParams.py Normal file
View File

@ -0,0 +1,21 @@
from data.enum.CompanySize import CompanySize
class ClientParams:
def __init__(self,
payment_delay: int,
net_worth: int,
infuelnce_rate: int,
payed: bool,
is_skarbowka: bool,
membership: bool,
is_hat: bool,
company_size: CompanySize) -> None:
self.payment_delay = payment_delay
self.payed = payed
self.net_worth = net_worth
self.is_skarbowka = is_skarbowka
self.infuence_rate = infuelnce_rate
self.membership = membership
self.company_size = company_size
self.is_hat = is_hat

View File

@ -1,37 +0,0 @@
from data import Direction
from data.CATEGORY import CATEGORY
from data.Item import Item
from data.Order import Order
from typing import Dict
class Game:
def __init__(self, id: int, agentPos: (int, int), agentDirection: Direction, deliveryPos: (int, int), orderPos: (int,int), stockPilePos: Dict,
deliveryItem: Item, carriedItem: Item, orderStock: Dict, orderList: [Order]):
self.agentDirection = agentDirection
self.id = id
self.agentPos = agentPos
self.deliveryPos = deliveryPos
self.orderPos = orderPos
self.stockPilePos = stockPilePos
self.deliveryItem = deliveryItem
self.carriedItem = carriedItem
self.orderStock = orderStock
self.orderList = orderList
def getCopy(self):
newGame = Game(self)
return newGame
# def move(self, x: int, y: int):
# self.agentPos = (x, y)
#
# def pickUp(self, item: Item):
# self.deliveryItem = item
#
# def drop(self, item: Item):
# self.deliveryItem = -1
#
# def identify(item: Item, category: CATEGORY):
# item.category = category
#
# def finishOrder(order: Order):
# order.id = -1

20
data/GameConstants.py Normal file
View File

@ -0,0 +1,20 @@
from typing import Dict
from data.Item import Item
from data.Order import Order
from data.enum.ItemType import ItemType
from util.PathDefinitions import GridLocation
class GameConstants:
def __init__(
self,
grid_width: int,
grid_height: int,
walls: [GridLocation],
diffTerrain: [GridLocation]
):
self.grid_width = grid_width
self.grid_height = grid_height
self.walls = walls
self.diffTerrain = diffTerrain

View File

@ -1,8 +1,16 @@
from data.CATEGORY import CATEGORY
from itertools import count
from data.enum.ItemType import ItemType
class Item:
def __init__(self, id: int, category: CATEGORY, price: int):
self.id = id
self.category = category
self.price = price
id_counter = count(start=0)
def __init__(self, item_type: ItemType, image):
self.id = next(self.id_counter)
self.real_type = item_type
self.image = image
self.guessed_type = None
def __repr__(self) -> str:
return "|real: {} -- guessed: {}| \n".format(self.real_type, self.guessed_type)

View File

@ -1,7 +0,0 @@
from enum import Enum
class JOB(Enum):
FISHERMAN = 1
FIREFIGHTER = 2
POLICEMAN = 3

View File

@ -1,8 +1,26 @@
from data.JOB import JOB
from itertools import count
from typing import List
from data.ClientParams import ClientParams
from data.Item import Item
from data.enum.Priority import Priority
class Order:
def __init__(self, id: int, money: int, job: JOB):
self.id = id
self.money = money
self.job = job
id_counter = count(start=0)
def __init__(self, time: int, items: [Item], priority: Priority, sum: int, client_params: ClientParams):
self.id = next(self.id_counter)
self.time = time
self.items: List[Item] = items
self.client_params = client_params
self.priority = priority
self.sum = sum
# def sum_items(self, items: [Item]):
# result = 0
# for i in range(len(items)):
# result += items[i]
def __repr__(self) -> str:
return "items: {} priority: {}".format(self.items, self.priority)

View File

@ -1,9 +1,9 @@
from data.CATEGORY import CATEGORY
from data.enum.ItemType import ItemType
from data.Item import Item
class StockPile:
def __init__(self, id: int, category: CATEGORY, itemList: [Item]):
def __init__(self, id: ItemType, pos: (int, int), itemList: [Item], ):
self.id = id
self.category = category
self.pos = pos
self.itemList = itemList

240
data/TEST/importedData.csv Normal file
View File

@ -0,0 +1,240 @@
DELAY,PAYED,NET-WORTH,INFLUENCE,SKARBOWKA,MEMBER,HAT,SIZE,PRIORITY
13,TRUE,13,20,FALSE,FALSE,TRUE,CompanySize.BIG,MEDIUM
3,FALSE,93,31,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
2,TRUE,8,93,FALSE,FALSE,FALSE,CompanySize.SMALL,MEDIUM
8,TRUE,43,77,TRUE,TRUE,TRUE,CompanySize.SMALL,HIGH
5,FALSE,79,71,FALSE,TRUE,TRUE,CompanySize.BIG,LOW
2,TRUE,14,46,FALSE,FALSE,FALSE,CompanySize.NORMAL,LOW
0,FALSE,18,16,TRUE,FALSE,TRUE,CompanySize.GIGANTISHE,HIGH
9,TRUE,33,79,FALSE,FALSE,TRUE,CompanySize.HUGE,HIGH
2,TRUE,38,48,FALSE,TRUE,TRUE,CompanySize.HUGE,HIGH
0,TRUE,79,66,FALSE,FALSE,FALSE,CompanySize.SMALL,MEDIUM
6,FALSE,21,33,FALSE,FALSE,FALSE,CompanySize.NORMAL,LOW
1,TRUE,79,43,FALSE,TRUE,TRUE,CompanySize.HUGE,HIGH
0,TRUE,42,60,TRUE,TRUE,TRUE,CompanySize.SMALL,HIGH
1,FALSE,59,25,TRUE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
3,TRUE,88,50,FALSE,FALSE,TRUE,CompanySize.HUGE,HIGH
6,FALSE,0,4,FALSE,TRUE,TRUE,CompanySize.NO,LOW
13,FALSE,67,9,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
10,TRUE,53,38,FALSE,TRUE,FALSE,CompanySize.NORMAL,MEDIUM
5,TRUE,26,64,FALSE,TRUE,TRUE,CompanySize.SMALL,MEDIUM
9,TRUE,32,79,FALSE,TRUE,FALSE,CompanySize.GIGANTISHE,MEDIUM
13,TRUE,95,94,FALSE,TRUE,FALSE,CompanySize.GIGANTISHE,HIGH
10,TRUE,0,58,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,MEDIUM
6,TRUE,86,91,FALSE,TRUE,TRUE,CompanySize.BIG,HIGH
8,TRUE,52,5,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,MEDIUM
8,TRUE,1,46,FALSE,FALSE,FALSE,CompanySize.HUGE,MEDIUM
6,TRUE,80,10,FALSE,TRUE,TRUE,CompanySize.NORMAL,HIGH
4,FALSE,29,53,FALSE,TRUE,TRUE,CompanySize.BIG,LOW
3,TRUE,49,35,TRUE,FALSE,TRUE,CompanySize.NORMAL,HIGH
4,TRUE,38,1,FALSE,TRUE,FALSE,CompanySize.BIG,MEDIUM
8,FALSE,88,96,FALSE,FALSE,FALSE,CompanySize.NO,LOW
6,TRUE,64,27,FALSE,FALSE,FALSE,CompanySize.HUGE,MEDIUM
5,TRUE,87,50,FALSE,FALSE,FALSE,CompanySize.BIG,MEDIUM
1,FALSE,87,29,TRUE,TRUE,TRUE,CompanySize.SMALL,HIGH
3,FALSE,63,52,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
14,FALSE,74,33,FALSE,FALSE,FALSE,CompanySize.HUGE,LOW
10,TRUE,81,22,FALSE,FALSE,FALSE,CompanySize.NORMAL,LOW
14,TRUE,78,85,TRUE,TRUE,FALSE,CompanySize.HUGE,HIGH
0,TRUE,76,91,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
8,TRUE,54,11,FALSE,FALSE,TRUE,CompanySize.BIG,MEDIUM
8,TRUE,52,92,FALSE,TRUE,FALSE,CompanySize.GIGANTISHE,MEDIUM
0,TRUE,86,29,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
9,TRUE,15,94,TRUE,FALSE,TRUE,CompanySize.HUGE,HIGH
14,FALSE,90,84,FALSE,TRUE,TRUE,CompanySize.NO,LOW
3,TRUE,68,30,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
9,TRUE,14,39,FALSE,TRUE,TRUE,CompanySize.BIG,MEDIUM
5,TRUE,19,40,FALSE,FALSE,FALSE,CompanySize.NO,LOW
1,TRUE,17,71,FALSE,TRUE,FALSE,CompanySize.HUGE,MEDIUM
0,FALSE,41,97,FALSE,FALSE,TRUE,CompanySize.HUGE,LOW
2,FALSE,22,3,FALSE,TRUE,FALSE,CompanySize.NO,LOW
8,TRUE,14,64,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
4,TRUE,10,46,FALSE,FALSE,TRUE,CompanySize.NO,LOW
6,TRUE,39,75,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
6,TRUE,96,68,FALSE,FALSE,TRUE,CompanySize.HUGE,HIGH
5,TRUE,60,10,TRUE,FALSE,TRUE,CompanySize.HUGE,HIGH
13,TRUE,6,73,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
2,FALSE,21,10,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,LOW
4,FALSE,34,59,FALSE,FALSE,TRUE,CompanySize.SMALL,LOW
11,TRUE,5,57,TRUE,FALSE,FALSE,CompanySize.HUGE,HIGH
5,TRUE,84,34,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,MEDIUM
7,TRUE,23,23,FALSE,TRUE,TRUE,CompanySize.HUGE,MEDIUM
1,TRUE,10,38,TRUE,TRUE,FALSE,CompanySize.SMALL,HIGH
3,TRUE,36,89,TRUE,TRUE,TRUE,CompanySize.BIG,HIGH
1,TRUE,12,33,FALSE,TRUE,TRUE,CompanySize.BIG,MEDIUM
4,FALSE,21,72,FALSE,FALSE,FALSE,CompanySize.NO,LOW
2,FALSE,34,44,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,LOW
8,TRUE,25,29,FALSE,TRUE,TRUE,CompanySize.HUGE,MEDIUM
2,TRUE,96,94,FALSE,FALSE,FALSE,CompanySize.NORMAL,MEDIUM
13,TRUE,91,0,FALSE,FALSE,TRUE,CompanySize.NO,LOW
13,TRUE,26,24,FALSE,FALSE,TRUE,CompanySize.BIG,MEDIUM
3,FALSE,96,43,TRUE,TRUE,FALSE,CompanySize.BIG,HIGH
12,TRUE,48,97,FALSE,FALSE,TRUE,CompanySize.SMALL,HIGH
10,TRUE,23,5,FALSE,TRUE,FALSE,CompanySize.NO,LOW
4,FALSE,77,98,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,LOW
4,FALSE,95,39,FALSE,FALSE,FALSE,CompanySize.HUGE,LOW
1,TRUE,33,40,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,MEDIUM
9,TRUE,2,11,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
6,TRUE,90,62,TRUE,TRUE,FALSE,CompanySize.HUGE,HIGH
13,TRUE,53,62,FALSE,FALSE,FALSE,CompanySize.NORMAL,MEDIUM
9,TRUE,3,15,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
7,TRUE,5,2,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
6,TRUE,14,59,FALSE,FALSE,FALSE,CompanySize.BIG,MEDIUM
10,TRUE,93,58,FALSE,FALSE,FALSE,CompanySize.NORMAL,MEDIUM
8,TRUE,95,23,FALSE,TRUE,TRUE,CompanySize.SMALL,MEDIUM
14,TRUE,6,37,FALSE,TRUE,TRUE,CompanySize.HUGE,MEDIUM
9,TRUE,71,3,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
8,TRUE,4,5,FALSE,FALSE,FALSE,CompanySize.SMALL,LOW
0,FALSE,32,8,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
8,TRUE,20,43,FALSE,TRUE,TRUE,CompanySize.HUGE,MEDIUM
13,TRUE,50,44,FALSE,TRUE,TRUE,CompanySize.HUGE,MEDIUM
11,TRUE,59,93,FALSE,FALSE,FALSE,CompanySize.NO,MEDIUM
4,TRUE,65,34,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,LOW
12,FALSE,47,100,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,LOW
10,TRUE,65,97,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
9,FALSE,81,42,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,LOW
13,FALSE,28,21,FALSE,FALSE,FALSE,CompanySize.NO,LOW
9,FALSE,93,93,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
7,TRUE,64,26,TRUE,TRUE,TRUE,CompanySize.HUGE,HIGH
10,FALSE,28,72,FALSE,TRUE,FALSE,CompanySize.HUGE,LOW
0,FALSE,34,50,FALSE,TRUE,TRUE,CompanySize.HUGE,LOW
9,FALSE,36,44,FALSE,FALSE,FALSE,CompanySize.HUGE,LOW
11,TRUE,63,1,FALSE,TRUE,TRUE,CompanySize.HUGE,MEDIUM
8,FALSE,38,34,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
3,TRUE,57,7,FALSE,FALSE,TRUE,CompanySize.HUGE,MEDIUM
14,FALSE,12,23,TRUE,FALSE,TRUE,CompanySize.NO,HIGH
4,TRUE,16,98,FALSE,TRUE,FALSE,CompanySize.GIGANTISHE,HIGH
5,TRUE,39,69,FALSE,FALSE,FALSE,CompanySize.NO,LOW
0,TRUE,82,77,TRUE,FALSE,FALSE,CompanySize.GIGANTISHE,HIGH
11,TRUE,84,64,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
12,TRUE,71,77,TRUE,TRUE,FALSE,CompanySize.BIG,HIGH
8,TRUE,42,54,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
1,TRUE,23,93,FALSE,FALSE,FALSE,CompanySize.NO,MEDIUM
1,TRUE,38,40,FALSE,TRUE,TRUE,CompanySize.NORMAL,MEDIUM
1,FALSE,33,11,FALSE,TRUE,TRUE,CompanySize.BIG,LOW
0,TRUE,5,56,FALSE,TRUE,TRUE,CompanySize.NO,MEDIUM
13,TRUE,49,71,FALSE,FALSE,TRUE,CompanySize.NO,MEDIUM
9,TRUE,64,29,FALSE,FALSE,TRUE,CompanySize.BIG,MEDIUM
8,TRUE,44,95,FALSE,TRUE,FALSE,CompanySize.BIG,MEDIUM
0,TRUE,40,3,FALSE,FALSE,FALSE,CompanySize.SMALL,LOW
2,TRUE,49,39,FALSE,TRUE,TRUE,CompanySize.NO,LOW
10,TRUE,4,94,FALSE,TRUE,TRUE,CompanySize.BIG,MEDIUM
0,TRUE,90,86,FALSE,TRUE,FALSE,CompanySize.SMALL,MEDIUM
14,TRUE,61,74,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,MEDIUM
3,TRUE,86,27,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
0,FALSE,47,19,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
7,FALSE,60,30,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
13,TRUE,96,89,FALSE,FALSE,FALSE,CompanySize.NO,MEDIUM
7,TRUE,83,73,FALSE,TRUE,TRUE,CompanySize.HUGE,HIGH
7,TRUE,21,30,FALSE,FALSE,TRUE,CompanySize.NO,LOW
10,TRUE,26,41,FALSE,TRUE,TRUE,CompanySize.NO,LOW
13,FALSE,73,16,FALSE,TRUE,FALSE,CompanySize.NO,LOW
12,TRUE,30,54,TRUE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
12,FALSE,9,52,FALSE,FALSE,FALSE,CompanySize.NORMAL,LOW
12,TRUE,28,10,FALSE,FALSE,FALSE,CompanySize.SMALL,LOW
2,FALSE,23,34,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
6,TRUE,50,85,FALSE,TRUE,FALSE,CompanySize.NO,MEDIUM
10,TRUE,86,74,FALSE,TRUE,TRUE,CompanySize.SMALL,MEDIUM
10,TRUE,4,39,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,HIGH
3,TRUE,11,66,FALSE,TRUE,FALSE,CompanySize.NORMAL,MEDIUM
6,FALSE,31,1,FALSE,FALSE,TRUE,CompanySize.NO,LOW
8,TRUE,77,29,FALSE,FALSE,TRUE,CompanySize.BIG,MEDIUM
0,TRUE,85,91,FALSE,FALSE,FALSE,CompanySize.NO,MEDIUM
0,FALSE,51,68,FALSE,FALSE,FALSE,CompanySize.NORMAL,LOW
6,TRUE,54,32,FALSE,FALSE,TRUE,CompanySize.BIG,MEDIUM
8,FALSE,2,78,FALSE,FALSE,FALSE,CompanySize.HUGE,LOW
0,FALSE,92,47,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
0,TRUE,9,34,TRUE,FALSE,TRUE,CompanySize.GIGANTISHE,HIGH
11,TRUE,3,40,FALSE,TRUE,TRUE,CompanySize.HUGE,HIGH
5,TRUE,6,58,FALSE,TRUE,TRUE,CompanySize.HUGE,HIGH
5,TRUE,27,61,FALSE,FALSE,TRUE,CompanySize.NO,LOW
2,TRUE,70,98,FALSE,TRUE,FALSE,CompanySize.NO,MEDIUM
6,TRUE,2,11,FALSE,FALSE,FALSE,CompanySize.HUGE,MEDIUM
3,TRUE,64,14,FALSE,TRUE,FALSE,CompanySize.NORMAL,MEDIUM
5,TRUE,63,84,FALSE,TRUE,TRUE,CompanySize.SMALL,HIGH
5,TRUE,72,32,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
8,TRUE,48,7,TRUE,TRUE,FALSE,CompanySize.GIGANTISHE,HIGH
11,FALSE,4,96,TRUE,FALSE,FALSE,CompanySize.NORMAL,HIGH
8,TRUE,60,76,FALSE,FALSE,FALSE,CompanySize.SMALL,LOW
4,TRUE,17,24,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,MEDIUM
9,TRUE,59,88,FALSE,TRUE,FALSE,CompanySize.NORMAL,HIGH
10,TRUE,95,79,FALSE,TRUE,FALSE,CompanySize.SMALL,MEDIUM
2,TRUE,59,20,FALSE,TRUE,FALSE,CompanySize.NO,LOW
7,TRUE,75,61,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,HIGH
1,TRUE,10,89,TRUE,FALSE,TRUE,CompanySize.GIGANTISHE,HIGH
6,TRUE,69,78,TRUE,TRUE,TRUE,CompanySize.NO,HIGH
5,TRUE,98,43,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
4,TRUE,14,1,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
3,FALSE,56,85,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,LOW
0,TRUE,22,0,FALSE,FALSE,FALSE,CompanySize.BIG,MEDIUM
2,TRUE,28,61,FALSE,FALSE,FALSE,CompanySize.BIG,HIGH
14,TRUE,99,34,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,HIGH
3,TRUE,90,96,FALSE,TRUE,TRUE,CompanySize.BIG,HIGH
1,TRUE,25,98,FALSE,FALSE,TRUE,CompanySize.HUGE,HIGH
5,TRUE,16,49,FALSE,TRUE,TRUE,CompanySize.NORMAL,MEDIUM
0,TRUE,40,97,FALSE,TRUE,FALSE,CompanySize.SMALL,MEDIUM
0,TRUE,31,17,FALSE,TRUE,TRUE,CompanySize.NORMAL,MEDIUM
1,TRUE,43,4,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
5,TRUE,69,65,FALSE,TRUE,FALSE,CompanySize.SMALL,LOW
2,TRUE,45,9,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
5,FALSE,24,41,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
0,TRUE,0,25,FALSE,TRUE,FALSE,CompanySize.BIG,MEDIUM
13,TRUE,41,91,TRUE,FALSE,TRUE,CompanySize.NORMAL,HIGH
5,TRUE,15,10,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,MEDIUM
5,TRUE,91,94,FALSE,TRUE,TRUE,CompanySize.HUGE,HIGH
9,TRUE,83,98,FALSE,TRUE,FALSE,CompanySize.HUGE,HIGH
12,TRUE,58,56,FALSE,FALSE,FALSE,CompanySize.BIG,MEDIUM
8,TRUE,78,39,FALSE,TRUE,FALSE,CompanySize.BIG,HIGH
12,TRUE,8,80,FALSE,TRUE,FALSE,CompanySize.NORMAL,MEDIUM
3,TRUE,80,52,FALSE,FALSE,TRUE,CompanySize.NORMAL,MEDIUM
12,TRUE,23,47,FALSE,TRUE,FALSE,CompanySize.BIG,MEDIUM
6,FALSE,21,94,TRUE,TRUE,FALSE,CompanySize.GIGANTISHE,HIGH
3,TRUE,32,58,FALSE,FALSE,FALSE,CompanySize.HUGE,MEDIUM
3,TRUE,74,26,FALSE,TRUE,FALSE,CompanySize.BIG,MEDIUM
0,TRUE,7,2,FALSE,TRUE,TRUE,CompanySize.BIG,MEDIUM
7,TRUE,90,32,FALSE,FALSE,FALSE,CompanySize.NO,LOW
8,TRUE,81,21,TRUE,FALSE,TRUE,CompanySize.NORMAL,HIGH
14,TRUE,84,54,FALSE,FALSE,FALSE,CompanySize.GIGANTISHE,HIGH
5,TRUE,99,96,FALSE,FALSE,TRUE,CompanySize.NO,MEDIUM
14,TRUE,93,12,TRUE,TRUE,FALSE,CompanySize.HUGE,HIGH
5,TRUE,17,34,FALSE,FALSE,FALSE,CompanySize.SMALL,LOW
3,TRUE,78,76,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,HIGH
9,FALSE,37,65,FALSE,TRUE,FALSE,CompanySize.GIGANTISHE,LOW
12,FALSE,61,84,FALSE,FALSE,FALSE,CompanySize.NO,LOW
11,FALSE,72,6,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,LOW
1,TRUE,54,38,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,MEDIUM
9,FALSE,35,72,FALSE,TRUE,FALSE,CompanySize.NORMAL,LOW
6,TRUE,77,86,FALSE,FALSE,FALSE,CompanySize.NO,MEDIUM
7,TRUE,52,75,FALSE,FALSE,FALSE,CompanySize.NORMAL,MEDIUM
5,TRUE,50,14,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,HIGH
13,FALSE,88,14,FALSE,FALSE,TRUE,CompanySize.BIG,LOW
13,FALSE,81,15,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,LOW
9,FALSE,99,73,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
9,FALSE,18,50,FALSE,TRUE,FALSE,CompanySize.NO,LOW
9,FALSE,51,2,FALSE,FALSE,TRUE,CompanySize.NO,LOW
6,TRUE,30,68,FALSE,TRUE,FALSE,CompanySize.BIG,MEDIUM
7,FALSE,24,12,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,LOW
7,FALSE,22,3,FALSE,TRUE,TRUE,CompanySize.NORMAL,LOW
5,TRUE,95,61,FALSE,FALSE,FALSE,CompanySize.HUGE,LOW
12,FALSE,68,33,FALSE,FALSE,TRUE,CompanySize.NORMAL,LOW
7,TRUE,12,25,FALSE,TRUE,TRUE,CompanySize.NORMAL,LOW
8,FALSE,63,4,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,LOW
8,TRUE,82,18,FALSE,FALSE,TRUE,CompanySize.HUGE,HIGH
5,TRUE,56,85,FALSE,FALSE,FALSE,CompanySize.HUGE,MEDIUM
7,FALSE,96,29,FALSE,FALSE,TRUE,CompanySize.GIGANTISHE,LOW
9,FALSE,24,46,FALSE,TRUE,TRUE,CompanySize.BIG,LOW
9,FALSE,38,35,FALSE,TRUE,TRUE,CompanySize.NO,LOW
5,TRUE,52,89,FALSE,FALSE,FALSE,CompanySize.HUGE,MEDIUM
12,FALSE,94,52,FALSE,FALSE,FALSE,CompanySize.BIG,LOW
7,TRUE,36,27,FALSE,TRUE,TRUE,CompanySize.GIGANTISHE,MEDIUM
7,FALSE,78,76,FALSE,FALSE,FALSE,CompanySize.HUGE,LOW
8,FALSE,83,93,TRUE,FALSE,FALSE,CompanySize.NO,HIGH
9,FALSE,47,66,FALSE,TRUE,FALSE,CompanySize.HUGE,LOW
11,FALSE,39,78,FALSE,TRUE,FALSE,CompanySize.GIGANTISHE,LOW
9,FALSE,8,41,FALSE,TRUE,TRUE,CompanySize.NORMAL,LOW
10,FALSE,86,97,TRUE,FALSE,FALSE,CompanySize.HUGE,HIGH
7,TRUE,85,98,TRUE,FALSE,FALSE,CompanySize.GIGANTISHE,HIGH
11,FALSE,9,25,FALSE,TRUE,TRUE,CompanySize.NORMAL,LOW
3,TRUE,11,57,FALSE,TRUE,FALSE,CompanySize.BIG,LOW
13,FALSE,72,4,FALSE,FALSE,TRUE,CompanySize.NO,LOW
8,TRUE,24,28,FALSE,TRUE,TRUE,CompanySize.NO,LOW
1 DELAY PAYED NET-WORTH INFLUENCE SKARBOWKA MEMBER HAT SIZE PRIORITY
2 13 TRUE 13 20 FALSE FALSE TRUE CompanySize.BIG MEDIUM
3 3 FALSE 93 31 FALSE TRUE FALSE CompanySize.SMALL LOW
4 2 TRUE 8 93 FALSE FALSE FALSE CompanySize.SMALL MEDIUM
5 8 TRUE 43 77 TRUE TRUE TRUE CompanySize.SMALL HIGH
6 5 FALSE 79 71 FALSE TRUE TRUE CompanySize.BIG LOW
7 2 TRUE 14 46 FALSE FALSE FALSE CompanySize.NORMAL LOW
8 0 FALSE 18 16 TRUE FALSE TRUE CompanySize.GIGANTISHE HIGH
9 9 TRUE 33 79 FALSE FALSE TRUE CompanySize.HUGE HIGH
10 2 TRUE 38 48 FALSE TRUE TRUE CompanySize.HUGE HIGH
11 0 TRUE 79 66 FALSE FALSE FALSE CompanySize.SMALL MEDIUM
12 6 FALSE 21 33 FALSE FALSE FALSE CompanySize.NORMAL LOW
13 1 TRUE 79 43 FALSE TRUE TRUE CompanySize.HUGE HIGH
14 0 TRUE 42 60 TRUE TRUE TRUE CompanySize.SMALL HIGH
15 1 FALSE 59 25 TRUE TRUE TRUE CompanySize.GIGANTISHE HIGH
16 3 TRUE 88 50 FALSE FALSE TRUE CompanySize.HUGE HIGH
17 6 FALSE 0 4 FALSE TRUE TRUE CompanySize.NO LOW
18 13 FALSE 67 9 FALSE TRUE FALSE CompanySize.NORMAL LOW
19 10 TRUE 53 38 FALSE TRUE FALSE CompanySize.NORMAL MEDIUM
20 5 TRUE 26 64 FALSE TRUE TRUE CompanySize.SMALL MEDIUM
21 9 TRUE 32 79 FALSE TRUE FALSE CompanySize.GIGANTISHE MEDIUM
22 13 TRUE 95 94 FALSE TRUE FALSE CompanySize.GIGANTISHE HIGH
23 10 TRUE 0 58 FALSE FALSE FALSE CompanySize.GIGANTISHE MEDIUM
24 6 TRUE 86 91 FALSE TRUE TRUE CompanySize.BIG HIGH
25 8 TRUE 52 5 FALSE FALSE FALSE CompanySize.GIGANTISHE MEDIUM
26 8 TRUE 1 46 FALSE FALSE FALSE CompanySize.HUGE MEDIUM
27 6 TRUE 80 10 FALSE TRUE TRUE CompanySize.NORMAL HIGH
28 4 FALSE 29 53 FALSE TRUE TRUE CompanySize.BIG LOW
29 3 TRUE 49 35 TRUE FALSE TRUE CompanySize.NORMAL HIGH
30 4 TRUE 38 1 FALSE TRUE FALSE CompanySize.BIG MEDIUM
31 8 FALSE 88 96 FALSE FALSE FALSE CompanySize.NO LOW
32 6 TRUE 64 27 FALSE FALSE FALSE CompanySize.HUGE MEDIUM
33 5 TRUE 87 50 FALSE FALSE FALSE CompanySize.BIG MEDIUM
34 1 FALSE 87 29 TRUE TRUE TRUE CompanySize.SMALL HIGH
35 3 FALSE 63 52 FALSE FALSE FALSE CompanySize.BIG LOW
36 14 FALSE 74 33 FALSE FALSE FALSE CompanySize.HUGE LOW
37 10 TRUE 81 22 FALSE FALSE FALSE CompanySize.NORMAL LOW
38 14 TRUE 78 85 TRUE TRUE FALSE CompanySize.HUGE HIGH
39 0 TRUE 76 91 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
40 8 TRUE 54 11 FALSE FALSE TRUE CompanySize.BIG MEDIUM
41 8 TRUE 52 92 FALSE TRUE FALSE CompanySize.GIGANTISHE MEDIUM
42 0 TRUE 86 29 FALSE TRUE FALSE CompanySize.SMALL LOW
43 9 TRUE 15 94 TRUE FALSE TRUE CompanySize.HUGE HIGH
44 14 FALSE 90 84 FALSE TRUE TRUE CompanySize.NO LOW
45 3 TRUE 68 30 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
46 9 TRUE 14 39 FALSE TRUE TRUE CompanySize.BIG MEDIUM
47 5 TRUE 19 40 FALSE FALSE FALSE CompanySize.NO LOW
48 1 TRUE 17 71 FALSE TRUE FALSE CompanySize.HUGE MEDIUM
49 0 FALSE 41 97 FALSE FALSE TRUE CompanySize.HUGE LOW
50 2 FALSE 22 3 FALSE TRUE FALSE CompanySize.NO LOW
51 8 TRUE 14 64 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
52 4 TRUE 10 46 FALSE FALSE TRUE CompanySize.NO LOW
53 6 TRUE 39 75 FALSE FALSE FALSE CompanySize.BIG LOW
54 6 TRUE 96 68 FALSE FALSE TRUE CompanySize.HUGE HIGH
55 5 TRUE 60 10 TRUE FALSE TRUE CompanySize.HUGE HIGH
56 13 TRUE 6 73 FALSE TRUE FALSE CompanySize.SMALL LOW
57 2 FALSE 21 10 FALSE TRUE TRUE CompanySize.GIGANTISHE LOW
58 4 FALSE 34 59 FALSE FALSE TRUE CompanySize.SMALL LOW
59 11 TRUE 5 57 TRUE FALSE FALSE CompanySize.HUGE HIGH
60 5 TRUE 84 34 FALSE FALSE TRUE CompanySize.GIGANTISHE MEDIUM
61 7 TRUE 23 23 FALSE TRUE TRUE CompanySize.HUGE MEDIUM
62 1 TRUE 10 38 TRUE TRUE FALSE CompanySize.SMALL HIGH
63 3 TRUE 36 89 TRUE TRUE TRUE CompanySize.BIG HIGH
64 1 TRUE 12 33 FALSE TRUE TRUE CompanySize.BIG MEDIUM
65 4 FALSE 21 72 FALSE FALSE FALSE CompanySize.NO LOW
66 2 FALSE 34 44 FALSE FALSE FALSE CompanySize.GIGANTISHE LOW
67 8 TRUE 25 29 FALSE TRUE TRUE CompanySize.HUGE MEDIUM
68 2 TRUE 96 94 FALSE FALSE FALSE CompanySize.NORMAL MEDIUM
69 13 TRUE 91 0 FALSE FALSE TRUE CompanySize.NO LOW
70 13 TRUE 26 24 FALSE FALSE TRUE CompanySize.BIG MEDIUM
71 3 FALSE 96 43 TRUE TRUE FALSE CompanySize.BIG HIGH
72 12 TRUE 48 97 FALSE FALSE TRUE CompanySize.SMALL HIGH
73 10 TRUE 23 5 FALSE TRUE FALSE CompanySize.NO LOW
74 4 FALSE 77 98 FALSE FALSE TRUE CompanySize.GIGANTISHE LOW
75 4 FALSE 95 39 FALSE FALSE FALSE CompanySize.HUGE LOW
76 1 TRUE 33 40 FALSE TRUE TRUE CompanySize.GIGANTISHE MEDIUM
77 9 TRUE 2 11 FALSE FALSE FALSE CompanySize.BIG LOW
78 6 TRUE 90 62 TRUE TRUE FALSE CompanySize.HUGE HIGH
79 13 TRUE 53 62 FALSE FALSE FALSE CompanySize.NORMAL MEDIUM
80 9 TRUE 3 15 FALSE TRUE FALSE CompanySize.NORMAL LOW
81 7 TRUE 5 2 FALSE TRUE FALSE CompanySize.NORMAL LOW
82 6 TRUE 14 59 FALSE FALSE FALSE CompanySize.BIG MEDIUM
83 10 TRUE 93 58 FALSE FALSE FALSE CompanySize.NORMAL MEDIUM
84 8 TRUE 95 23 FALSE TRUE TRUE CompanySize.SMALL MEDIUM
85 14 TRUE 6 37 FALSE TRUE TRUE CompanySize.HUGE MEDIUM
86 9 TRUE 71 3 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
87 8 TRUE 4 5 FALSE FALSE FALSE CompanySize.SMALL LOW
88 0 FALSE 32 8 FALSE TRUE FALSE CompanySize.NORMAL LOW
89 8 TRUE 20 43 FALSE TRUE TRUE CompanySize.HUGE MEDIUM
90 13 TRUE 50 44 FALSE TRUE TRUE CompanySize.HUGE MEDIUM
91 11 TRUE 59 93 FALSE FALSE FALSE CompanySize.NO MEDIUM
92 4 TRUE 65 34 FALSE TRUE TRUE CompanySize.GIGANTISHE LOW
93 12 FALSE 47 100 FALSE TRUE TRUE CompanySize.GIGANTISHE LOW
94 10 TRUE 65 97 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
95 9 FALSE 81 42 FALSE FALSE FALSE CompanySize.GIGANTISHE LOW
96 13 FALSE 28 21 FALSE FALSE FALSE CompanySize.NO LOW
97 9 FALSE 93 93 FALSE FALSE FALSE CompanySize.BIG LOW
98 7 TRUE 64 26 TRUE TRUE TRUE CompanySize.HUGE HIGH
99 10 FALSE 28 72 FALSE TRUE FALSE CompanySize.HUGE LOW
100 0 FALSE 34 50 FALSE TRUE TRUE CompanySize.HUGE LOW
101 9 FALSE 36 44 FALSE FALSE FALSE CompanySize.HUGE LOW
102 11 TRUE 63 1 FALSE TRUE TRUE CompanySize.HUGE MEDIUM
103 8 FALSE 38 34 FALSE TRUE FALSE CompanySize.SMALL LOW
104 3 TRUE 57 7 FALSE FALSE TRUE CompanySize.HUGE MEDIUM
105 14 FALSE 12 23 TRUE FALSE TRUE CompanySize.NO HIGH
106 4 TRUE 16 98 FALSE TRUE FALSE CompanySize.GIGANTISHE HIGH
107 5 TRUE 39 69 FALSE FALSE FALSE CompanySize.NO LOW
108 0 TRUE 82 77 TRUE FALSE FALSE CompanySize.GIGANTISHE HIGH
109 11 TRUE 84 64 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
110 12 TRUE 71 77 TRUE TRUE FALSE CompanySize.BIG HIGH
111 8 TRUE 42 54 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
112 1 TRUE 23 93 FALSE FALSE FALSE CompanySize.NO MEDIUM
113 1 TRUE 38 40 FALSE TRUE TRUE CompanySize.NORMAL MEDIUM
114 1 FALSE 33 11 FALSE TRUE TRUE CompanySize.BIG LOW
115 0 TRUE 5 56 FALSE TRUE TRUE CompanySize.NO MEDIUM
116 13 TRUE 49 71 FALSE FALSE TRUE CompanySize.NO MEDIUM
117 9 TRUE 64 29 FALSE FALSE TRUE CompanySize.BIG MEDIUM
118 8 TRUE 44 95 FALSE TRUE FALSE CompanySize.BIG MEDIUM
119 0 TRUE 40 3 FALSE FALSE FALSE CompanySize.SMALL LOW
120 2 TRUE 49 39 FALSE TRUE TRUE CompanySize.NO LOW
121 10 TRUE 4 94 FALSE TRUE TRUE CompanySize.BIG MEDIUM
122 0 TRUE 90 86 FALSE TRUE FALSE CompanySize.SMALL MEDIUM
123 14 TRUE 61 74 FALSE FALSE FALSE CompanySize.GIGANTISHE MEDIUM
124 3 TRUE 86 27 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
125 0 FALSE 47 19 FALSE TRUE FALSE CompanySize.SMALL LOW
126 7 FALSE 60 30 FALSE TRUE FALSE CompanySize.NORMAL LOW
127 13 TRUE 96 89 FALSE FALSE FALSE CompanySize.NO MEDIUM
128 7 TRUE 83 73 FALSE TRUE TRUE CompanySize.HUGE HIGH
129 7 TRUE 21 30 FALSE FALSE TRUE CompanySize.NO LOW
130 10 TRUE 26 41 FALSE TRUE TRUE CompanySize.NO LOW
131 13 FALSE 73 16 FALSE TRUE FALSE CompanySize.NO LOW
132 12 TRUE 30 54 TRUE TRUE TRUE CompanySize.GIGANTISHE HIGH
133 12 FALSE 9 52 FALSE FALSE FALSE CompanySize.NORMAL LOW
134 12 TRUE 28 10 FALSE FALSE FALSE CompanySize.SMALL LOW
135 2 FALSE 23 34 FALSE TRUE FALSE CompanySize.NORMAL LOW
136 6 TRUE 50 85 FALSE TRUE FALSE CompanySize.NO MEDIUM
137 10 TRUE 86 74 FALSE TRUE TRUE CompanySize.SMALL MEDIUM
138 10 TRUE 4 39 FALSE FALSE TRUE CompanySize.GIGANTISHE HIGH
139 3 TRUE 11 66 FALSE TRUE FALSE CompanySize.NORMAL MEDIUM
140 6 FALSE 31 1 FALSE FALSE TRUE CompanySize.NO LOW
141 8 TRUE 77 29 FALSE FALSE TRUE CompanySize.BIG MEDIUM
142 0 TRUE 85 91 FALSE FALSE FALSE CompanySize.NO MEDIUM
143 0 FALSE 51 68 FALSE FALSE FALSE CompanySize.NORMAL LOW
144 6 TRUE 54 32 FALSE FALSE TRUE CompanySize.BIG MEDIUM
145 8 FALSE 2 78 FALSE FALSE FALSE CompanySize.HUGE LOW
146 0 FALSE 92 47 FALSE TRUE FALSE CompanySize.NORMAL LOW
147 0 TRUE 9 34 TRUE FALSE TRUE CompanySize.GIGANTISHE HIGH
148 11 TRUE 3 40 FALSE TRUE TRUE CompanySize.HUGE HIGH
149 5 TRUE 6 58 FALSE TRUE TRUE CompanySize.HUGE HIGH
150 5 TRUE 27 61 FALSE FALSE TRUE CompanySize.NO LOW
151 2 TRUE 70 98 FALSE TRUE FALSE CompanySize.NO MEDIUM
152 6 TRUE 2 11 FALSE FALSE FALSE CompanySize.HUGE MEDIUM
153 3 TRUE 64 14 FALSE TRUE FALSE CompanySize.NORMAL MEDIUM
154 5 TRUE 63 84 FALSE TRUE TRUE CompanySize.SMALL HIGH
155 5 TRUE 72 32 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
156 8 TRUE 48 7 TRUE TRUE FALSE CompanySize.GIGANTISHE HIGH
157 11 FALSE 4 96 TRUE FALSE FALSE CompanySize.NORMAL HIGH
158 8 TRUE 60 76 FALSE FALSE FALSE CompanySize.SMALL LOW
159 4 TRUE 17 24 FALSE FALSE TRUE CompanySize.GIGANTISHE MEDIUM
160 9 TRUE 59 88 FALSE TRUE FALSE CompanySize.NORMAL HIGH
161 10 TRUE 95 79 FALSE TRUE FALSE CompanySize.SMALL MEDIUM
162 2 TRUE 59 20 FALSE TRUE FALSE CompanySize.NO LOW
163 7 TRUE 75 61 FALSE FALSE FALSE CompanySize.GIGANTISHE HIGH
164 1 TRUE 10 89 TRUE FALSE TRUE CompanySize.GIGANTISHE HIGH
165 6 TRUE 69 78 TRUE TRUE TRUE CompanySize.NO HIGH
166 5 TRUE 98 43 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
167 4 TRUE 14 1 FALSE TRUE FALSE CompanySize.SMALL LOW
168 3 FALSE 56 85 FALSE TRUE TRUE CompanySize.GIGANTISHE LOW
169 0 TRUE 22 0 FALSE FALSE FALSE CompanySize.BIG MEDIUM
170 2 TRUE 28 61 FALSE FALSE FALSE CompanySize.BIG HIGH
171 14 TRUE 99 34 FALSE FALSE FALSE CompanySize.GIGANTISHE HIGH
172 3 TRUE 90 96 FALSE TRUE TRUE CompanySize.BIG HIGH
173 1 TRUE 25 98 FALSE FALSE TRUE CompanySize.HUGE HIGH
174 5 TRUE 16 49 FALSE TRUE TRUE CompanySize.NORMAL MEDIUM
175 0 TRUE 40 97 FALSE TRUE FALSE CompanySize.SMALL MEDIUM
176 0 TRUE 31 17 FALSE TRUE TRUE CompanySize.NORMAL MEDIUM
177 1 TRUE 43 4 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
178 5 TRUE 69 65 FALSE TRUE FALSE CompanySize.SMALL LOW
179 2 TRUE 45 9 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
180 5 FALSE 24 41 FALSE FALSE FALSE CompanySize.BIG LOW
181 0 TRUE 0 25 FALSE TRUE FALSE CompanySize.BIG MEDIUM
182 13 TRUE 41 91 TRUE FALSE TRUE CompanySize.NORMAL HIGH
183 5 TRUE 15 10 FALSE TRUE TRUE CompanySize.GIGANTISHE MEDIUM
184 5 TRUE 91 94 FALSE TRUE TRUE CompanySize.HUGE HIGH
185 9 TRUE 83 98 FALSE TRUE FALSE CompanySize.HUGE HIGH
186 12 TRUE 58 56 FALSE FALSE FALSE CompanySize.BIG MEDIUM
187 8 TRUE 78 39 FALSE TRUE FALSE CompanySize.BIG HIGH
188 12 TRUE 8 80 FALSE TRUE FALSE CompanySize.NORMAL MEDIUM
189 3 TRUE 80 52 FALSE FALSE TRUE CompanySize.NORMAL MEDIUM
190 12 TRUE 23 47 FALSE TRUE FALSE CompanySize.BIG MEDIUM
191 6 FALSE 21 94 TRUE TRUE FALSE CompanySize.GIGANTISHE HIGH
192 3 TRUE 32 58 FALSE FALSE FALSE CompanySize.HUGE MEDIUM
193 3 TRUE 74 26 FALSE TRUE FALSE CompanySize.BIG MEDIUM
194 0 TRUE 7 2 FALSE TRUE TRUE CompanySize.BIG MEDIUM
195 7 TRUE 90 32 FALSE FALSE FALSE CompanySize.NO LOW
196 8 TRUE 81 21 TRUE FALSE TRUE CompanySize.NORMAL HIGH
197 14 TRUE 84 54 FALSE FALSE FALSE CompanySize.GIGANTISHE HIGH
198 5 TRUE 99 96 FALSE FALSE TRUE CompanySize.NO MEDIUM
199 14 TRUE 93 12 TRUE TRUE FALSE CompanySize.HUGE HIGH
200 5 TRUE 17 34 FALSE FALSE FALSE CompanySize.SMALL LOW
201 3 TRUE 78 76 FALSE TRUE TRUE CompanySize.GIGANTISHE HIGH
202 9 FALSE 37 65 FALSE TRUE FALSE CompanySize.GIGANTISHE LOW
203 12 FALSE 61 84 FALSE FALSE FALSE CompanySize.NO LOW
204 11 FALSE 72 6 FALSE FALSE TRUE CompanySize.GIGANTISHE LOW
205 1 TRUE 54 38 FALSE FALSE TRUE CompanySize.GIGANTISHE MEDIUM
206 9 FALSE 35 72 FALSE TRUE FALSE CompanySize.NORMAL LOW
207 6 TRUE 77 86 FALSE FALSE FALSE CompanySize.NO MEDIUM
208 7 TRUE 52 75 FALSE FALSE FALSE CompanySize.NORMAL MEDIUM
209 5 TRUE 50 14 FALSE FALSE TRUE CompanySize.GIGANTISHE HIGH
210 13 FALSE 88 14 FALSE FALSE TRUE CompanySize.BIG LOW
211 13 FALSE 81 15 FALSE FALSE TRUE CompanySize.GIGANTISHE LOW
212 9 FALSE 99 73 FALSE FALSE FALSE CompanySize.BIG LOW
213 9 FALSE 18 50 FALSE TRUE FALSE CompanySize.NO LOW
214 9 FALSE 51 2 FALSE FALSE TRUE CompanySize.NO LOW
215 6 TRUE 30 68 FALSE TRUE FALSE CompanySize.BIG MEDIUM
216 7 FALSE 24 12 FALSE TRUE TRUE CompanySize.GIGANTISHE LOW
217 7 FALSE 22 3 FALSE TRUE TRUE CompanySize.NORMAL LOW
218 5 TRUE 95 61 FALSE FALSE FALSE CompanySize.HUGE LOW
219 12 FALSE 68 33 FALSE FALSE TRUE CompanySize.NORMAL LOW
220 7 TRUE 12 25 FALSE TRUE TRUE CompanySize.NORMAL LOW
221 8 FALSE 63 4 FALSE FALSE TRUE CompanySize.GIGANTISHE LOW
222 8 TRUE 82 18 FALSE FALSE TRUE CompanySize.HUGE HIGH
223 5 TRUE 56 85 FALSE FALSE FALSE CompanySize.HUGE MEDIUM
224 7 FALSE 96 29 FALSE FALSE TRUE CompanySize.GIGANTISHE LOW
225 9 FALSE 24 46 FALSE TRUE TRUE CompanySize.BIG LOW
226 9 FALSE 38 35 FALSE TRUE TRUE CompanySize.NO LOW
227 5 TRUE 52 89 FALSE FALSE FALSE CompanySize.HUGE MEDIUM
228 12 FALSE 94 52 FALSE FALSE FALSE CompanySize.BIG LOW
229 7 TRUE 36 27 FALSE TRUE TRUE CompanySize.GIGANTISHE MEDIUM
230 7 FALSE 78 76 FALSE FALSE FALSE CompanySize.HUGE LOW
231 8 FALSE 83 93 TRUE FALSE FALSE CompanySize.NO HIGH
232 9 FALSE 47 66 FALSE TRUE FALSE CompanySize.HUGE LOW
233 11 FALSE 39 78 FALSE TRUE FALSE CompanySize.GIGANTISHE LOW
234 9 FALSE 8 41 FALSE TRUE TRUE CompanySize.NORMAL LOW
235 10 FALSE 86 97 TRUE FALSE FALSE CompanySize.HUGE HIGH
236 7 TRUE 85 98 TRUE FALSE FALSE CompanySize.GIGANTISHE HIGH
237 11 FALSE 9 25 FALSE TRUE TRUE CompanySize.NORMAL LOW
238 3 TRUE 11 57 FALSE TRUE FALSE CompanySize.BIG LOW
239 13 FALSE 72 4 FALSE FALSE TRUE CompanySize.NO LOW
240 8 TRUE 24 28 FALSE TRUE TRUE CompanySize.NO LOW

10
data/enum/CompanySize.py Normal file
View File

@ -0,0 +1,10 @@
from enum import Enum
class CompanySize(Enum):
BIG = 1
NORMAL = 2
SMALL = 3
NO = 4
HUGE = 5
GIGANTISHE = 6

View File

@ -0,0 +1,7 @@
from enum import Enum
class GeneticMutationType(Enum):
MUTATION = 1
CROSS = 2
REVERSE = 3

7
data/enum/ItemType.py Normal file
View File

@ -0,0 +1,7 @@
from enum import Enum
class ItemType(Enum):
DOOR = "door"
SHELF = "shelf"
REFRIGERATOR = "refrigerator"

7
data/enum/Priority.py Normal file
View File

@ -0,0 +1,7 @@
from enum import Enum
class Priority(Enum):
HIGH = 1
MEDIUM = 2
LOW = 3

9
decision/Action.py Normal file
View File

@ -0,0 +1,9 @@
from data.Item import Item
from decision.ActionType import ActionType
class Action:
def __init__(self, action_type: ActionType, desired_item: Item = None):
self.desired_item = desired_item
self.action_type = action_type

13
decision/ActionType.py Normal file
View File

@ -0,0 +1,13 @@
from enum import Enum
class ActionType(Enum):
MOVE = 1
ROTATE_RIGHT = 2
ROTATE_DOWN = 3
ROTATE_LEFT = 4
ROTATE_UP = 5
PICK_ITEM = 6
DROP_ITEM = 7
SPECIAL = 8
NONE = 9

23
decision/State.py Normal file
View File

@ -0,0 +1,23 @@
from data.enum.Direction import Direction
from data.Item import Item
from data.Order import Order
from data.enum.Priority import Priority
from decision.ActionType import ActionType
from util.PathDefinitions import GridLocation
class State:
def __init__(self,
action_taken: ActionType,
forklift_position: GridLocation,
forklift_rotation: Direction,
pending_orders: [Priority, [Order]],
filled_orders: [Order],
input_items: [Item]
):
self.action_taken = action_taken
self.forklift_position = forklift_position
self.forklift_rotation = forklift_rotation
self.pending_orders = pending_orders
self.filled_orders = filled_orders
self.input_items = input_items

View File

@ -0,0 +1,9 @@
from data.GameConstants import GameConstants
class ForkliftActions:
def __init__(self, game: GameConstants,
) -> None:
self.game = game

2
drzewo.md Normal file
View File

@ -0,0 +1,2 @@
# Parametry drzewa(klienta):
1.

View File

@ -0,0 +1,218 @@
import itertools
import random
from data.Order import Order
from data.enum.GeneticMutationType import GeneticMutationType
from data.enum.Priority import Priority
class GeneticOrder:
mutation_chance = 10
reverse_chance = 60
cross_chance = 5
best_fit_special = 50
best_fit_super_special = 20
population_size = 200
number_of_populations = 1000
punish_low = 500
punish_med = 300
punish_sum = 50
def __init__(self, orders: [Order]) -> None:
self.orders = orders
def get_mutation_type(self) -> GeneticMutationType:
x = random.randint(0, self.mutation_chance + self.cross_chance + self.reverse_chance)
if x < self.mutation_chance:
return GeneticMutationType.MUTATION
if x > self.mutation_chance + self.cross_chance:
return GeneticMutationType.REVERSE
return GeneticMutationType.CROSS
def mutation(self, population: [int]) -> [int]:
x = random.randint(0, len(population) - 1)
y = random.randint(0, len(population) - 1)
while x == y:
y = random.randint(0, len(population) - 1)
result = population
pom = population[x]
result[x] = population[y]
result[y] = pom
if (result[x] == result[y]):
print("PIZDA I CHUJ")
return result
def cross(self, population: [int]) -> [int]:
x = random.randint(1, len(population) - 1)
result = []
for i in range(len(population)):
result.append(population[(i + x) % len(population)])
return result
def reverse(self, population: [int]) -> [int]:
x = random.randint(0, len(population))
y = random.randint(0, len(population) - 1)
while y - x > 2 or x >= y:
x = random.randint(0, len(population))
y = random.randint(0, len(population) - 1)
result = []
# print("X: ", x, " y: ", y)
for i in range(len(population)):
if x <= i <= y:
new_i = i - x
# print("len:", len(population), " new_i: ", new_i)
result.append(population[y - new_i])
else:
result.append(population[i])
return result
def generate_first_population(self, k: int) -> [[int]]:
result = []
s = range(len(self.orders))
p = itertools.permutations(s)
while len(result) < k:
n = p.__next__()
if n not in result:
result.append(n)
return [list(x) for x in result]
# result = itertools.permutations(range(len(self.orders)))
#
# return [list(x) for x in result]
def correct_sum(self, last_prio: Priority, last_sum: float, o: Order) -> bool:
if o.priority == last_prio:
return last_sum > o.sum / o.time
return True
def sum_wrong(self, member: [int]) -> int:
last_high = 0
last_med = 0
last_prio = Priority.HIGH
last_sum = 0
counter = 0
for i in range(len(member)):
o: Order = self.orders[member[i]]
if o.priority == Priority.HIGH:
last_high = i
elif o.priority == Priority.MEDIUM:
last_med = i
if not self.correct_sum(last_prio, last_sum, o):
counter += int(last_sum - (o.sum / o.time))
last_prio = o.priority
last_sum = o.sum / o.time
for i in range(last_high):
o: Order = self.orders[member[i]]
if o.priority == Priority.MEDIUM:
counter += self.punish_med
elif o.priority == Priority.LOW:
counter += self.punish_low
for i in range(last_med):
o: Order = self.orders[member[i]]
if o.priority == Priority.LOW:
counter += self.punish_low
return counter
def evaluate(self, member: [int]) -> int:
# result = 0
# for i in range(len(self.orders) - 1):
# x: Order = self.orders[member[i]]
# y: Order = self.orders[member[i + 1]]
#
# if ((x.priority == Priority.MEDIUM or x.priority == Priority.LOW) and y.priority == Priority.HIGH) or (x.priority == Priority.LOW and y.priority == Priority.MEDIUM):
# result += 30
#
# if x.sum / x.time < y.sum / y.time:
# result += int(y.sum / y.time)
# return result
return self.sum_wrong(member)
def mutate_population(self, order_population: [[int]]) -> [[int]]:
result = []
for i in range(len(order_population)):
member: [int] = order_population[i]
operation: GeneticMutationType = self.get_mutation_type()
if operation == GeneticMutationType.MUTATION:
member = self.mutation(member)
elif operation == GeneticMutationType.REVERSE:
member = self.reverse(member)
else:
member = self.cross(member)
result.append(member)
return result
def get_next_population(self, population: [[int]]) -> [[int]]:
result = []
for i in range(len(population) - self.best_fit_special - self.best_fit_super_special):
result.append(population[i])
for i in range(self.best_fit_special):
x = random.randint(0, self.best_fit_special)
result.append(population[x])
for i in range(self.best_fit_super_special):
x = random.randint(0, self.best_fit_super_special)
result.append(population[x])
return result
def get_orders_sorted(self, orders: [Order]) -> [Order]:
self.orders = orders
population: [[int]] = self.generate_first_population(self.population_size)
# print(population)
population.sort(key=self.evaluate)
best_fit: [int] = population[0]
for i in range(self.number_of_populations):
# print("population: ", i)
population = self.mutate_population(population)
population.sort(key=self.evaluate)
if self.evaluate(best_fit) > self.evaluate(population[0]):
best_fit = population[0]
# population = self.get_next_population(population).sort(key=self.evaluate)
if self.evaluate(best_fit) < self.evaluate(population[0]):
population[0] = best_fit
best: [int] = population[0]
result: [Order] = []
for i in range(len(best)):
result.append(self.orders[best[i]])
return result

View File

@ -0,0 +1,22 @@
import numpy as np
import tensorflow as tf
from tensorflow import keras
# loaded_model = keras.models.load_model("my_model")
def image_classification(path, model):
class_names = ['door', 'refrigerator', 'shelf']
img = tf.keras.utils.load_img(
path, target_size=(180, 180)
)
img_array = tf.keras.utils.img_to_array(img)
img_array = tf.expand_dims(img_array, 0) # Create a batch
predictions = model.predict(img_array)
score = tf.nn.softmax(predictions[0])
# print(class_names[np.argmax(score)])
return class_names[np.argmax(score)]

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Some files were not shown because too many files have changed in this diff Show More