1
Fork 0
mirror of https://github.com/Steffo99/appunti-magistrali.git synced 2024-11-25 11:34:18 +00:00
appunti-steffo/4 - Ottimizzazione lineare intera/1 - Esercizi svolti/Dispense - Esercizio 1.mod

22 lines
219 B
Modula-2
Raw Normal View History

2024-06-04 06:16:15 +00:00
/* Primale */
var x;
var y;
maximize s: x + y;
c1: 2*x + y <= 5;
c2: x + 2*y <= 5;
/* Duale */
var a;
var b;
minimize z: 5*a + 5*b;
c3: 2*a + b >= 1;
c4: a + 2*b >= 1;
solve;
display x, y, s;
display a, b, z;
end;