From 3080d0baa689f997db2b97e4e2faa867db861f74 Mon Sep 17 00:00:00 2001 From: Mateusz Szlachetka Date: Tue, 28 Mar 2023 18:00:13 +0200 Subject: [PATCH 1/2] created some classes for knowledge representation --- garbage_truck.py | 17 +++++++++++++++++ litter.py | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 garbage_truck.py create mode 100644 litter.py diff --git a/garbage_truck.py b/garbage_truck.py new file mode 100644 index 0000000..1dbd527 --- /dev/null +++ b/garbage_truck.py @@ -0,0 +1,17 @@ +class Garbage_tank: + def __init__(self, volume_capacity, mass_capacity): + self.vcapacity = volume_capacity #m^3 + self.mcapacity = mass_capacity #kg + +class Engine: + def __init__(self, power): + self.power = power #HP + +class Garbage_truck: + def __init__(self, dump_location, fuel_capacity, start_pos): + self.dump_location = dump_location + self.tank = Garbage_tank(15, 18000) + self.engine = Engine(400) + self.fuel = fuel_capacity + self.pos = start_pos + self.houses = [] #lista domów do odwiedzenia \ No newline at end of file diff --git a/litter.py b/litter.py new file mode 100644 index 0000000..6dc9dd9 --- /dev/null +++ b/litter.py @@ -0,0 +1,8 @@ +class Litter: + + types = ['PAPER', 'GLASS', 'PLASTIC', 'METAL', 'BIO', 'MUNICIPAL', 'ELECTRONICS'] + + def __init__(self, type, volume, mass): + self.type = type + self.volume = volume + self.mass = mass From 30c6d5d626c0b07389c58c3ae698829c7d69a429 Mon Sep 17 00:00:00 2001 From: Mateusz Szlachetka Date: Fri, 31 Mar 2023 13:49:27 +0200 Subject: [PATCH 2/2] added home class --- garbage_truck.py | 6 +++--- home.py | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 home.py diff --git a/garbage_truck.py b/garbage_truck.py index 1dbd527..45f611a 100644 --- a/garbage_truck.py +++ b/garbage_truck.py @@ -1,4 +1,4 @@ -class Garbage_tank: +class GarbageTank: def __init__(self, volume_capacity, mass_capacity): self.vcapacity = volume_capacity #m^3 self.mcapacity = mass_capacity #kg @@ -7,10 +7,10 @@ class Engine: def __init__(self, power): self.power = power #HP -class Garbage_truck: +class GarbageTruck: def __init__(self, dump_location, fuel_capacity, start_pos): self.dump_location = dump_location - self.tank = Garbage_tank(15, 18000) + self.tank = GarbageTank(15, 18000) self.engine = Engine(400) self.fuel = fuel_capacity self.pos = start_pos diff --git a/home.py b/home.py new file mode 100644 index 0000000..e795dfc --- /dev/null +++ b/home.py @@ -0,0 +1,4 @@ +class Home: + def __init__(self, coord): + self.coord = coord + self.collect_request = False \ No newline at end of file