| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An Operations Research Course Project.
In this Project, we used QT 5 for GUI and Gurobi as a solver.
The problems we are solving are:
pip install pygurobi
pip install PyQt5py main.pyThese are the Project's classes:
HomePage:
KnapsackSolver and TransportationSolver:
MainApp:
The knapsack problem presents a classic optimization challenge:
Given a set of items each with its own weight and value, and a knapsack with a maximum weight capacity, how do we maximize the total value of items placed into the knapsack without surpassing its weight limit?
This problem finds applications in various fields such as resource allocation, financial portfolio optimization, and even in scheduling tasks.
Imagine you're planning a hiking trip and can only carry a limited weight in your backpack. You have a list of items, each with its weight and value. Your goal is to select the most valuable combination of items that fit into your backpack without exceeding its weight capacity. This is precisely the knapsack problem in a real-life scenario and the origin of the naming.
To tackle this problem mathematically, we define:
Our aim is to decide which items to include in the knapsack to maximize the total value while staying within the weight constraint. We can express this as an integer programming problem:
Using the Gurobi optimization solver in Python, we can efficiently solve the knapsack problem.
Here's how:
The transportation problem is a type of linear programming problem designed to minimize the cost of distributing a product from M sources to N destinations.
The transportation problem is a classic optimization problem in operations research and logistics that seeks to distribute goods or resources from multiple origins (supply points) to multiple destinations (demand points) in the most cost-effective way while satisfying supply and demand constraints. This problem is applicable in various scenarios, including logistics, supply chain management, and network design.
In the transportation problem, we have:
The goal is to determine the quantity $ x_{ij} $ of goods to be transported from each source $ i $ to each destination $ j $ such that the total transportation cost is minimized, all demands are satisfied, and supplies are not exceeded.
The linear programming formulation of the transportation problem is as follows:
Minimize the total transportation cost: $$ \min Z = \sum_{i=1}^{m} \sum_{j=1}^{n} c_{ij} x_{ij} $$ where $ m $ is the number of sources, $ n $ is the number of destinations, $ c_{ij} $ is the cost per unit transported from source $ i $ to destination $ j $ , and $ x_{ij} $ is the quantity transported.
For further great explanation also check this Link
| Back | FazBrowse Home | New Git URL |