Optimization Algorithms
3° Year of course - Second semester
Frequency Not mandatory
- 6 CFU
- 48 hours
- ITALIANO
- Trieste
- Opzionale
- Standard teaching
- Oral Exam
- SSD INF/01
Knowledge and understanding: Understanding the conceptual framework of an optimisation model as a tool for formulating, solving and evaluating decision problems related to complex systems. Knowing the methodologies for formalising quantitative models and algorithmic problem solving. Understanding all theoretical aspects underlying solution techniques, their mathematical justification and their application implications and potential.
Applied knowledge and understanding: to be able to apply the solution techniques and algorithms in practice, materially carrying out the necessary procedures to arrive at the solution of actual numerical problems and thus be able to critically analyse the solutions obtained.
Autonomy of judgement: being able to apply the acquired knowledge to autonomously arrive at formulating quantitative models and subsequently solving the relevant optimisation problems by also manually executing the appropriate solution algorithms.
Communication skills: to be able to present, both in written and oral form, decision problems and their possible solutions. Being able to critically discuss the validity and limitations of formulations and solutions.
Ability to learn: to be able to gather information from textbooks, scientific articles and other material for autonomous formulation and solution of decision problems.
Knowledge of the linear algebra formalism (vectors, matrices, their operations and space representations) and of the graph theory (classification, properties, trees, paths, circuits) can favor the understanding. However, it is not an essential condition.
No strict prerequisite.
1. Introduction to Operations Research
Decision-making problems: Analysing and solving complex problems in order to optimise solutions.
Areas of application:Business management, resource planning and management, production, logistics and transport, economics, finance, health services, public administration.
2. Linear Programming (LP)
Properties and characteristics: Optimisation of a linear objective function with linear constraints.
Model formulation: Decision variables, objective, constraints.
Geometric interpretation: Representation in two dimensions.
Possible outcomes: Feasibility, unconstrained, single or multiple optimality.
Algebraic formulation: Standard form with slack and surplus variables.
Simlex method: Basic solution, in-base and out-of-base variables, optimality criterion, improvement.
3. Duality in LP
Dual variables and dual constraints: Correspondence between variables and constraints of primal and dual problems.
Dual objective: Objective function of the dual problem.
Duality theorems: Weak and strong duality, complementary slackness theorem.
4. Postoptimality
Sensitivity analysis: Impact of parameter variations on optimal results, variation of right-hand side terms and coefficients of the objective.
5. Integer programming
Graphical examples: Problems with integer variables.
Branch & bound algorithm: Systematic exploration of solutions.
Gomory cuts: Techniques for improving solutions.
6. Solving linear programming problems with Python and Gurobi
Using Python and Gurobi to solve linear programming problems efficiently.
F. S. Hillier and G. J. Liebermann: Ricerca Operativa, 9th Ed. McGraw-Hill
1. Introduction to Operations Research
Decision-making problems: Operations research focuses on analysing and solving complex decision-making problems, using mathematical models and algorithms to optimise solutions.
Areas of application:
- Operations management: Optimisation of operational processes.
- Resource planning and management: Efficient allocation of available resources.
- Production: Improvement of production processes.
- Logistics and transport: Optimisation of transport routes and networks.
- Economics and finance: Investment management and economic analysis.
- Health services: Planning and management of health resources.
- Public administration: Efficiency in public services.
2. Linear Programming (LP)
Properties, characteristics and applicability of LP: LP is used to optimise a linear objective function subject to linear constraints.
Formulation of a LP model:
- Decision variables: They represent the available choices.
- Objective: The function to be optimised (maximise or minimise).
- Constraints: Limitations or requirements that must be satisfied.
Geometric interpretation: In two dimensions, the LP problem can be represented graphically with admissible regions and level lines of the objective function.
Possible outcomes of a LP problem:
- Feasible: Existence of at least one solution that satisfies all constraints.
- Unconstrained: The objective function can be improved indefinitely.
- Single and multiple optimality: Presence of one or more optimal solutions.
Algebraic formulation of LP:
- Standard form: All constraints are equations with non-negative variables.
- Slack and surplus variables: Added to convert inequalities into equations.
- Canonical form: A specific form of LP used for the simplex method.
Simplex method:
- Base solution: A solution that satisfies the equality constraints.
- In-base and out-of-base variables: Active and inactive variables in the basic solution.
- Optimality criterion: Conditions for determining whether a solution is optimal.
- Improvement: Techniques for improving sub-optimal solutions.
3. Duality in LP
Dual variables and dual constraints: Each variable in the primal problem corresponds to a constraint in the dual problem and vice versa.
Dual objective: The objective function of the dual problem.
Duality theorems:
- Weak duality: The solution of the dual problem provides an upper or lower bound to the solution of the primary problem.
- Strong duality: The optimal solutions of the primal and the dual problem are equivalent.
- Complementary Slackness Theorem: Relationship between the optimal primal and dual solutions.
4. Post-optimality
Post-optimality and sensitivity analysis: Study of the impact of parameter variations on optimal results.
Variation in right-hand side terms: Changes in the terms of the constraints.
Variation in the coefficients of the objective function: Changes in the function to be optimised.
5. Integer programming
Examples and graphical illustration: Problems in which the decision variables must take integer values.
Branch & bound algorithm: Method for solving integer programming problems by systematically exploring possible solutions.
Gomory cuts: Techniques for improving integer programming solutions.
6. Solving linear programming problems using Python and the optimisation software Gurobi
Using Python and Gurobi for solving linear programming problems allows you to exploit powerful computational tools to model and solve complex problems efficiently.
Lectures on theory topics on the blackboard and/or with the aid of slides projected in the classroom.
Exercises on the theory topics either by carrying out examples on the blackboard or using the computer (Excel solver)
Explanation of how to solve a linear programming problem with Python and Gurobi by presenting the appropriate software tools on the computer and a detailed description of the code.
Students may be requested to bring their own laptop.
Teaching materials are available on http://moodle2.units.it and Teams
The acquisition of knowledge is verified by a final test consisting of two parts with a total of three or four exercises. The first part (Exercises 1 and 2) is done on a computer using open-source software (Python) and free academic optimisation software (Gurobi). The second part (exercises 3 and 4) is done on paper.
1. Formulate a continuous linear programming model and solve it using Python+Gurobi (steps 1, 2 and 6 of the programme).
2. Formulate an integer linear programming model and solve it using Python+Gurobi (steps 5 and 6 of the programme).
3. Solve an exercise on the theoretical 3. Solving one or two exercises concerning the theoretical aspects of continuous linear programming and the simplex or integer programming method (points 2, 3, 4 and 5 of the syllabus).
The maximum marks for each exercise will be distributed as follows, with some variations due to contingencies:
Exercise 1: 10 marks,
Exercise 2: 10 marks,
Exercises 3+4: 12 points.
The exam is considered passed by those who obtain a score of 18 or more. Those who obtain a mark above 30 (i.e. 31 or 32) will be awarded a mark of '30 cum laude'.
This course explores topics closely related to one or more goals of the United Nations 2030 Agenda for Sustainable Development (SDGs).