This repository hosts an algorithmic solution for optimizing the construction of gas pipelines for efficiency and fairness. The project aims to address the following objectives:
-
Efficient Line Construction: Construct a gas pipeline in a straight line that serves all houses efficiently. Efficiency here is defined as minimizing a specific cost function.
-
Fair Line Construction: Construct a gas pipeline in a way that minimizes the maximum distance to any house, ensuring fairness among served houses.
-
Multiple Efficient Lines: Optimize the construction of multiple gas pipelines to serve a set of houses efficiently, introducing a novelty using silhouette score.
Consider a set of houses represented by coordinates (latitude, longitude). The objective is to design algorithms that find optimal or near-optimal solutions for constructing gas pipelines based on the following criteria:
The distance from a point p
to a line l
is defined as:
dist(p,l) := || (I - aa^t)(p-b)||^2
Where:
l = {a, b}
represents a straight line with a direction vectora
of unit norm and a pointb
on the line.|| . ||
denotes the Euclidean norm.I
is the identity matrix.
-
Efficient Line Construction Objective:
- Minimize the cost function:
∑(i in [n]) || (I - aa^T).p ||^2
- Minimize the cost function:
-
Fair Line Construction Objective:
- Minimize the maximum distance to any house:
min(l) max(i in [n]) || dist(p_i, l) ||
- Minimize the maximum distance to any house:
-
Multiple Efficient Lines Objective:
- Minimize the sum of distances from each house to its nearest line:
∑(i in [n]) min(e in L) || dist(p_i, e) ||
- Minimize the sum of distances from each house to its nearest line:
This repository implements algorithms to address each objective mentioned above. The algorithms are designed to find optimal or near-optimal solutions while considering efficiency, fairness, and multiple lines.
The algorithm for constructing an efficient line or achieving a local minimum cost is implemented in Algorithm_Efficient_Line. It employs techniques to minimize the defined cost function efficiently.
The algorithm for constructing a fair line or achieving a local minimum maximum distance to any house is implemented in Algorithm_Fair_Line. It ensures fairness in serving houses while constructing the gas pipeline.
The algorithm for optimizing the construction of multiple efficient lines is implemented in Algorithm_Multiple_Efficient_Lines. It introduces a novelty using silhouette score to achieve efficiency in serving houses with multiple pipelines.
To utilize these algorithms, follow the instructions provided in each algorithm's respective directory.
In this project, we introduce a novel approach to optimizing gas pipeline construction by considering various factors such as efficiency, fairness, and multiple lines simultaneously. Our algorithms incorporate innovative techniques to address these objectives, offering solutions that aim to improve upon existing methodologies.
One of the key novelties in our approach is the utilization of silhouette score in the context of multiple efficient lines construction. Silhouette score is an extension of the k-means clustering algorithm, where the values range from -1 to 1. A value closer to 1 indicates better clustering performance, signifying that the data points are well-clustered and distant from neighboring clusters.
By adapting silhouette score to our problem domain, we assess the quality of line placement relative to the distribution of houses. This metric allows us to evaluate the effectiveness of our algorithms in achieving efficient clustering of houses around gas pipelines, leading to improved optimization results.
Contributions to improving the algorithms, optimizing efficiency, or enhancing fairness are welcome. Feel free to submit pull requests or raise issues for discussion.
Special thanks to the contributors and researchers in the field of optimization for their valuable insights and contributions.