diff --git a/algorithm/rhcacsass.py b/algorithm/rhcacsass.py deleted file mode 100644 index a4a05d3..0000000 --- a/algorithm/rhcacsass.py +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/tcp/TCPServer.py b/tcp/TCPServer.py deleted file mode 100644 index e374f68..0000000 --- a/tcp/TCPServer.py +++ /dev/null @@ -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