2

I try to solve a Prize-Collecting-Steiner-Tree-Optimization problem with AMPL. I did find an ILP formulation for that, but now I have problems to implement that into AMPL. Specially the constraint in (c). ILP-formulation I hope somebody can help me.

my try:

param n; #Anzahl der Knoten

set V := 1..n; #Knotenmenge
set E within {i in V, j in V: i<j}; #Kantenmenge
set T {i in V}; #Terminalmenge 

param p {i in V};
param w {(i,j) in E};
param r in V;


var x {(i,j) in E} binary;
var y {k in V: k != r} binary;

maximize profit: sum {i in V} p[i]*y[i] - sum {(i,j) in E} w[i,j]*x[i,j];

subject to Verhältnis: sum {(i,j) in E} x[i,j] = sum {i in V} y[i] - 1 ;
subject to Terminal{i in T}: y[i] = 1;

1 Answers1

0

Not sure that the following works, but maybe will help you to get going

set Vt within V     #Vt subset of V
set card(Vt) >= 2   #|Vt| >= 2
set v in Vt
set E_Vt --> "maybe set similar as E but with Vt"

subject to constraint_C: sum{(i,j) in E_Vt} x[i,j] <= sum{i in Vt and i<>v} y[i]

I myself do not know how to write i in Vt\{v} this is why I wrote i<>v and am quite interested if you found a solution.

Georgios
  • 861
  • 2
  • 12
  • 30