- Goal: To construct a path that has the shortest distance.
Here I implementedPyomo
framework to solve the Mixed-Integer Linear Programming(MILP) optimization problem, and make comparison with Greedy Algorithm.
- Define Parameters, Variables, and Sets. (see notebook)
- Mathematical formulation: Define object function and constraints.(see notebook)
- Optimization programming.
- With
Pyomo
framework, we got the optimal solution 20. - Through
Greedy Heuristic Algorithm
, we got the optimal solution 25, which demonstrates there is no algorithms that always provides the best solution. It depends on the problem statement and objective.