sets:shiduan/1..5/:h,t; xinghao/1..3/:NN,m,MM,G,F,Q; link(xi

1个回答

  • sets:

    shiduan/1..5/:h,t;

    xinghao/1..3/:NN,m,MM,G,F,Q;

    link(xinghao,shiduan):n,w;

    endsets

    min=@sum(xinghao(i):(G(i)*t(1)+Q(i))*n(i,1)+(w(i,1)-m(i))*n(i,1)*F(i)*t(1)+

    @sum(shiduan(j)|j#ge#2:

    G(i)*n(i,j)*t(j)+(w(i,j)-m(i))*n(i,j)*F(i)*t(j)+@if(n(i,j)#gt# n(i,j-1) ,(n(i,j)-n(i,j-1))*Q(i),0)));

    @for(link(i,j):n(i,j)=m(i));

    @for(link(i,j):w(i,j)=h(j)*(1+0.15));

    @for(link:@gin(n));

    data:

    t=6 3 6 3 6;

    h=15000 30000 25000 40000 27000;

    NN=12 10 5;

    m=850 1250 1500;

    MM=2000 1750 4000;

    G=1000 2600 3000;

    F=2 1.3 3;

    Q=2000 1000 500;

    enddata

    附运行结果:

    Local optimal solution found.

    Objective value: 1190500.

    Extended solver steps: 22

    Total solver iterations: 6072

    Variable Value

    H( 1) 15000.00

    H( 2) 30000.00

    H( 3) 25000.00

    H( 4) 40000.00

    H( 5) 27000.00

    T( 1) 6.000000

    T( 2) 3.000000

    T( 3) 6.000000

    T( 4) 3.000000

    T( 5) 6.000000

    NN( 1) 12.00000

    NN( 2) 10.00000

    NN( 3) 5.000000

    M( 1) 850.0000

    M( 2) 1250.000

    M( 3) 1500.000

    MM( 1) 2000.000

    MM( 2) 1750.000

    MM( 3) 4000.000

    G( 1) 1000.000

    G( 2) 2600.000

    G( 3) 3000.000

    F( 1) 2.000000

    F( 2) 1.300000

    F( 3) 3.000000

    Q( 1) 2000.000

    Q( 2) 1000.000

    Q( 3) 500.0000

    N( 1, 1) 12.00000

    N( 1, 2) 12.00000

    N( 1, 3) 12.00000

    N( 1, 4) 12.00000

    N( 1, 5) 12.00000

    N( 2, 1) 4.000000

    N( 2, 2) 10.00000

    N( 2, 3) 10.00000

    N( 2, 4) 10.00000

    N( 2, 5) 10.00000

    N( 3, 1) 0.000000

    N( 3, 2) 0.000000

    N( 3, 3) 0.000000

    N( 3, 4) 3.000000

    N( 3, 5) 0.000000

    W( 1, 1) 854.1667

    W( 1, 2) 1416.667

    W( 1, 3) 937.5000

    W( 1, 4) 2000.000

    W( 1, 5) 1129.167

    W( 2, 1) 1750.000

    W( 2, 2) 1750.000

    W( 2, 3) 1750.000

    W( 2, 4) 1750.000

    W( 2, 5) 1750.000

    W( 3, 1) 1502.716

    W( 3, 2) 1504.173

    W( 3, 3) 1501.395

    W( 3, 4) 1500.000

    W( 3, 5) 1504.321