07-07-2025 - Exercise - PL01 Exercise [EN]-[IT]steemCreated with Sketch.

in Italy8 hours ago

image.png

Cover background image generated with AI, software used: copilot microsoft


~~~ La versione in italiano inizia subito dopo la versione in inglese ~~~


[ENGLISH]
07-07-2025 - Exercise - PL01 Exercise [EN]-[IT]

image.png

Image generated with AI, Microsoft Copilot

With this post I would like to provide some brief notions about the topic mentioned in the subject by doing some exercises.
The context in which we operate is that of Operations Research
(code notes: MOD-79)

PL01 Exercise
Exercise Completed
Below is a linear programming exercise PL01, or a standard model of binary integer linear programming, i.e. PL01 = Linear Programming with binary variables (0-1)

More precisely PL01 stands for:
PL = Linear Programming.
01 indicates that the decision variables can only take the values ​​0 or 1.

Project Selection Exercise
Let's imagine that a company has a budget available and must decide which projects to start among the possible options. We will call the projects project A, project B and project C. Each of these projects has a cost and a profit.
The goal we set ourselves is to maximize total profit while respecting a budget constraint.

image.png

Constraint
The budget at our disposal is set to 60 €

Decision variables
x1=1 if project A is selected, while it is =0 if project A is not selected.
x2=1 if project B is selected, while it is =0 if project B is not selected.
x3=1 if project C is selected, while it is =0 if project C is not selected.

PL01 Method
Objective function (maximize profit)
Max Z = 60x1 + 50x2 + 40x3

Budget constraint
40x1 + 30x2 + 20x3 ≤ 60

Constraint on variables
x1,x2,x3 ∈ {0,1}

We identify the various possible combinations by inserting them into a table
Since we have 3 variables that can be 0 and 1, we will have that the possible combinations will be 2^3, that is, we will have 8 possible combinations.

image.png

From the table we immediately notice that solution 7 and 8 are not admissible because they do not respect the budget constraint. The table then shows us the admissible solutions (those that respect the budget) from which we can derive which is the solution with the most profit, also called the optimal solution.

Result
From the table we notice that we have 6 admissible solutions, that is, there are 6 solutions that respect the budget constraint which was not to spend more than €60. Let's remember instead that the constraints on the variables were 0 and 1.
At this point we can see how the optimal solution is number 6, therefore the one with projects A and C, which has a total profit of €100 and a total cost of €60, therefore it respects the budget.

Conclusions
Linear programming, despite the name that could lead off topic and make you think of something that has to do with software, is actually a mathematical technique. It is used in economics, finance and business production to understand what the optimal solutions are through a mathematical method.

Question
Did you know that the first to propose linear programming was Dantzig in 1947? Did you know that at that time George B. Dantzig, an American mathematician and computer scientist, worked for the US Air Force?


steembreak.jpg


[ITALIAN]
07-07-2025 - Esercizio - Esercizio di PL01 [EN]-[IT]

image.png

Immagine generata con IA, Microsoft Copilot

Con questo post vorrei fornire alcune brevi nozioni a riguardo dell’argomento citato in oggetto svolgendo degli esercizi.
Il contesto in cui operiamo è quello della Ricerca Operativa
(code notes: MOD-79)

Esercizio di PL01
Esercizio svolto
Qui di seguito un esercizio di programmazione lineare PL01, ovvero un modello standard di programmazione lineare intera binaria, cioè PL01 = Programmazione Lineare con variabili binarie (0-1)

Più precisamente PL01 sta per:
PL =Programmazione Lineare.
01 indica che le variabili decisionali possono assumere solo i valori 0 o 1.

Esercizio sulla selezione dei progetti
Proviamo a pensare che un'azienda abbia a disposizione un budget e deve decidere quali progetti avviare tra le possibili opzioni. I progetti li chiameremo progetto A, progetto B e progetto C. Ognuno di questi progetti ha un costo ed un profitto.
L’obiettivo che ci poniamo è quello di massimizzare il profitto totale rispettando un vincolo di budget.

image.png

Vincolo
Il budget a nostra disposizione è fissato a 60 €

Variabili decisionali
x1=1 se il progetto A viene selezionato, mentre è =0 se il progetto A non viene selezionato.
x2=1 se il progetto B viene selezionato, mentre è =0 se il progetto B non viene selezionato.
x3=1 se il progetto C viene selezionato, mentre è =0 se il progetto C non viene selezionato.

Metodo PL01
Funzione obiettivo (massimizzare il profitto)
Max Z = 60x1 + 50x2 + 40x3

Vincolo di budget
40x1 + 30x2 + 20x3 ≤ 60

Vincolo sulle variabili
x1,x2,x3 ∈ {0,1}

Identifichiamo le varie combinazioni possibili inserendole in una tabella
Siccome abbiamo 3 variabili che possono essere 0 e 1, avremo che le combinazioni possibili saranno 2^3, cioè avremo 8 combinazioni possibili.

image.png

Dalla tabella notiamo subito che la soluzione 7 e 8 non sono ammissibili perché non rispettano il vincolo del budget. La tabella poi ci mostra le soluzioni ammissibili (quelle che rispettano il budget) da cui possiamo ricavare qual è la soluzione con più profitto, chiamata anche soluzione ottima.

Risultato
Dalla tabella notiamo che abbiamo 6 soluzioni ammissibili, cioè ci sono 6 soluzioni che rispettano il vincolo di budget che era quello di non spendere più di 60€. Ricordiamo invece che i vincoli sulle variabili erano 0 e 1.
A questo punto possiamo notare come la soluzione ottima sia la numero 6, quindi quella con i progetti A e C, la quale ha un profitto totale di 100€ ed un costo totale di 60€, quindi rispetta il budget.

Conclusioni
La programmazione lineare, a scapito del nome che potrebbe portare fuori tema e far pensare a qualcosa che ha a che fare con un software, in realtà è una tecnica matematica. Viene usata in economia, nella finanza e nella produzione aziendale per comprendere quali sono le soluzioni ottimali tramite un metodo matematico.

Domanda
Lo sapevate che il primo a proporre la programmazione lineare fu Dantzig nel 1947? Lo sapevate che a quel tempo George B. Dantzig, matematico ed informatico statunitense, lavorava per l'US Air Force?

THE END

Sort:  

Upvoted! Thank you for supporting witness @jswit.

This post has been upvoted by @italygame witness curation trail


If you like our work and want to support us, please consider to approve our witness




CLICK HERE 👇

Come and visit Italy Community