Formulierung im lp-Format für Multicommodity flow problem

Neue Frage »

gabriel56 Auf diesen Beitrag antworten »
Formulierung im lp-Format für Multicommodity flow problem
Meine Frage:
Hallo,

wir sind dabei ein Programm zu schreiben, welches Ware zwischen den Filialen eines Unternehmens austauschen soll. Gegeben ist Bedarf pro Artikel und Filiale sowie aktueller Bestand pro Artikel und Filiale. Es sollen die Transportkosten minimiert werden, wobei die Kosten sind unabhängig von der Warenmenge.
Wie kann man das Problem für lp_solve 5.5.2.0 formulieren?

Meine Ideen:
Angefangen habe ich mit folgendem Ansatz:
min: c12 t1_12 + c13 t1_13 + c14 t1_14 +
c21 t1_21 + c23 t1_23 + c24 t1_24 +
c31 t1_31 + c32 t1_32 + c34 t1_34 +
c41 t1_41 + c42 t1_42 + c43 t1_43 +
c12 t2_12 + c13 t2_13 + c14 t2_14 +
c21 t2_21 + c23 t2_23 + c24 t2_24 +
c31 t2_31 + c32 t2_32 + c34 t2_34 +
c41 t2_41 + c42 t2_42 + c43 t2_43;

t1_12 + t1_13 + t1_14 <= bestand1_1; //Bestand Art.1 in Filiale 1
t1_21 + t1_23 + t1_24 <= bestand1_2;
...
t2_12 + t2_13 + t2_14 <= bestand2_2;

t1_21 + t1_31 + t1_41 = bedarf1_1; // Bedarf Art.1 in Filiale 1
...
t2_21 + t2_31 + t2_41 = bedarf2_1; // Bedarf Art.2 in Filiale 1
...

Diese Formulierung errechnet aber Kosten abhängig von der Menge.
Danach habe ich zusätzlich binäre Variablen einzuführen:
min: c12 x12 + c13 x13 + c14 x14 +
c21 x21 + c23 x23 + c24 x24 +
...
x12 t1_12 + x13 t1_13 + x14 t1_14 <= bestand1_1; //Bestand Art.1 in Filiale 1
...
x21 t1_21 + x31 t1_31 + x41 t1_41 = bedarf1_1; // Bedarf Art.1 in Filiale 1

bin x12;
bin x13;
...

Dann entsteht aber immer optimale Lösung 0, was falsch ist (Bedarf ist immer > 0)
Neue Frage »
Antworten »



Verwandte Themen

Die Beliebtesten »
Die Größten »
Die Neuesten »