removed unused files

This commit is contained in:
Sven Czarnian
2021-10-10 08:26:49 +02:00
parent 667829b03d
commit 7e17bf0103
2 changed files with 0 additions and 69 deletions

View File

@@ -1,18 +0,0 @@
# RHC-ACS-ASS Algorithm
# This class is written to contain an implementation
# of the Ant Colony System based upon the Receding Horizon
# for Aircraft Arrival Sequencing
class RhcAcsAss:
k = 1 # Receding horizon counter
N_rhc = 4 # The number of receding horizons
T_ti = 1 # The scheduling window
def __init__(self, n, t):
self.N_rhc = n
self.T_ti = t
def find_aircraft_for_horizon(self, ki):
# Omega(k) = [(k-1) * T_ti, (k+N_rhc-1) * T_ti]
pass

View File

@@ -1,51 +0,0 @@
import socket
import _thread
class TCPServer(socket.socket):
clients = []
def __init__(self):
socket.socket.__init__(self)
self.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.bind(('0.0.0.0', 8765))
self.listen(5)
def run(self):
print("Starting TCP Server")
try:
self.accept_clients()
except Exception as ex:
print(ex)
finally:
print("Server shutdown")
for client in self.clients:
client.close()
self.close()
def accept_clients(self):
while True:
(client_socket, address) = self.accept()
self.clients.append(client_socket)
self.on_open(client_socket)
_thread.start_new_thread(self.receive, (client_socket,))
def receive(self, client):
while True:
data = client.recv(1024)
if data == '':
break
self.on_message(client, data)
self.clients.remove(client)
self.on_close(client)
client.close()
_thread.exit()
def on_open(self, client):
pass
def on_message(self, client, message):
pass
def on_close(self, client):
pass