Parallel Distributed Branch-and-Bound Solution in RMI for TSP Problem

Verified

Added on  2021/09/17

|18
|829
|98
Project
AI Summary
This project presents a solution to the Traveling Salesman Problem (TSP) using the branch and bound algorithm implemented in Java, leveraging the Remote Method Invocation (RMI) API for distributed computing across a local network of eight clients and one server. The system comprises a server class (TSP) and client classes (Process Nodes) that communicate through a stub class compiled using rmic. The GUI class enables users to input city distances and calculate travel costs. The project details the source code of each class, including the TSP, client, and interface classes, showcasing the implementation of parallel computation. The findings highlight the efficiency of RMI in solving TSP as more processors are added, with a graph illustrating the time taken to find the best tour value. The process involves the server providing nodes to clients, and clients reporting better tour values back to the server. The project references several key texts on distributed systems, Java network programming, and concurrent programming, demonstrating a comprehensive approach to solving the TSP using a distributed and parallel computing framework.
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Solving TSP with java’s Remote Invocation Method
Name of student:
University:
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Solving TSP with java’s Remote Invocation Method
This project involves solving the travelling salesman problem using branch and bound
algorithm. It is implemented in the Java programming language, making use of the Remote
Method invocation API for creating distributed applications. It was implemented on a local
network with eight clients and one server. There are two processes involved; the Server and the
client. Communication from the client to the server is through a java predefined class called a
stub class (Benmammar, B. 2018). An rmic compiler is used to compile the stub class. The
compilation is done on the server. Each client must have access to the stub class. The GUI class
is included to enable the user of the server processor to input the distances between cities and to
calculate the cost of travelling from one city to the next until the salesman returns to the starting
city. Below is the source code of each of the respective classes
TSP Class (server class) code
The following screenshots show the actual source code implementation for the server class.
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Client class (Process Nodes)
The following images show the client side computer source code
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
Interface class Source code
The following images contains the TSPInterface class source code. The interface class contains
all the public methods that each client can invoke on the server (through the stub class).
Document Page
Running head: PARALLEL DISTRIBUTED BRANCH-AND-BOUND SOLUTION IN RMI
The following are images of the running program.
chevron_up_icon
1 out of 18
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]