that ... an "initial" value. The solver may use that value as a hint in
of finding an optimal solution. In particular the initial value has no
> -----Original Message-----
> From:
ampl@... [mailto:
ampl@...]
> On Behalf Of Vlado15 [
marasv@...]
> Sent: Friday, June 05, 2009 4:12 AM
> To: AMPL Modeling Language
> Subject: [AMPL 2579] Problem in using let command
>
>
> Hi all,
>
> I have a decompositin problem to solve. In my .run file, there are
> "let" commands, assigning initial values to variables defined in .mod
> file. But, the problem occurs as solver (cplexamp) does not take these
> initial values into account during its first run. Could somebody help
> and explain what it could be wrong?
>
> This is part of .run file with just a master problem.
>
> model proba.mod;
> data proba.dat;
>
> option solver cplexamp;
> option cplex_options 'mipdisplay 2 mipinterval 100 primal';
> option cplex_option 'timelimit=900';
>
> option omit_zero_rows 1;
> option display_eps .000001;
>
> problem Master: x2, Ship_pro, Y121, xcon1, xcon2, xcon3, xcon4;
> Cut_Point, Cut_Ray;
>
> let Ship_pro := 10000000;
>
> param GAP default Infinity;
>
> printf "\nRE-SOLVING MASTER PROBLEM\n\n";
> solve Master;
> printf "\n";
>
> And this is part of .mod file with also just a Master problem.
>
> param n>0, integer;
>
> ##sets
> set Luke := 1..n;
> set Luke1 within Luke := 1..n-1;
> set Luke2 within Luke := 2..n;
> set Luke3 within Luke := 2..n-1;
>
> param pec{Luke}; #pec-lucke takse
>
> var x2{Luke,Luke} binary;
> var Ship_pro;
>
> maximize Y121: 100000 - sum{i in Luke, j in Luke}x2[i,j]*pec[j];
>
> subject to
>
> Cut_Point {k in 1..nCUT}:
> if cut_type[k] = "point" then ZZ <= -sum{i in Luke1,j in Luke: j>=i
> +1}alfa1[i,j,k]*zr[i,j]*sum{q in i+1..j}x2[i,q]
> -sum{i in Luke2,j in Luke: j<=i-1}beta1[i,j,k]*zr[i,j]*sum{q in
> j..i-1}x2[i,q]
> -sum{i in Luke1,j in Luke: j>=i+1}xx1[i,j,k]*zr[i,j]*sum{q in
> i..j-1}x2[q,j]
> -sum{i in Luke2,j in Luke: j<=i-1}delta1[i,j,k]*zr[i,j]*sum{q in
> j+1..i}x2[q,j]
> +sum{i in 1..n-1,j in i+1..n: j!=i} fi1[i,j,k]*(C+MRS*(1-x2
> [i,j]))
> +sum{i in 2..n,j in 1..i-1: j!=i} roi1[i,j,k]*(C+MRS*(1-x2
> [i,j]))
> +tau1*(24*maxtt-sum{i in Luke,j in Luke:i!=j}x2[i,j]*(pdt[i]+pat
> [j])-(l/v1+l/v2+tl+tb))
> +mi1*(24*mintt-sum{i in Luke,j in Luke:i!=j}x2[i,j]*(pdt[i]+pat
> [j])-(l/v1+l/v2+tl+tb))
> +sum{i in Luke}lam1[i,k]*MRS+sum{i in Luke}rog1[i,k]*MRS;
> -(dcc*maxtt+Pout*(l/v1+l/v2)*(scf*fp+scl*lp))-sum{i in Luke, j
> in Luke}x2[i,j]*pec[j];
>
> Cut_Ray {k in 1..nCUT}:
> if cut_type[k] = "ray" then
> -sum{i in Luke1,j in Luke: j>=i+1}alfa1[i,j,k]*zr[i,j]*sum{q in i
> +1..j}x2[i,q]
> -sum{i in Luke2,j in Luke: j<=i-1}beta1[i,j,k]*zr[i,j]*sum{q in
> j..i-1}x2[i,q]
> -sum{i in Luke1,j in Luke: j>=i+1}xx1[i,j,k]*zr[i,j]*sum{q in
> i..j-1}x2[q,j]
> -sum{i in Luke2,j in Luke: j<=i-1}delta1[i,j,k]*zr[i,j]*sum{q in
> j+1..i}x2[q,j]
> +sum{i in 1..n-1,j in i+1..n: j!=i} fi1[i,j,k]*(C+MRS*(1-x2
> [i,j]))
> +sum{i in 2..n,j in 1..i-1: j!=i} roi1[i,j,k]*(C+MRS*(1-x2
> [i,j]))
> +tau1*(24*maxtt-sum{i in Luke,j in Luke:i!=j}x2[i,j]*(pdt[i]+pat
> [j])-(l/v1+l/v2+tl+tb))
> +mi1*(24*mintt-sum{i in Luke,j in Luke:i!=j}x2[i,j]*(pdt[i]+pat
> [j])-(l/v1+l/v2+tl+tb))
> +sum{i in Luke}lam1[i,k]*MRS+sum{i in Luke}rog1[i,k]*MRS>=0;
> -(dcc*maxtt-Pout*(l/v1+l/v2)*(scf*fp+scl*lp))-sum{i in Luke, j
> in Luke}x2[i,j]*pec[j]>=0;
>
> xcon1: sum{j in 2..n}x2[1,j]=1;
>
> xcon2: sum{i in 2..n}x2[i,1]=1;
>
> xcon3{q in 2..n-1}:sum{i in 1..q-1}x2[i,q]-sum{j in q+1..n}x2[q,j]=0;
>
> xcon4{q in 2..n-1}:sum{i in q+1..n}x2[i,q]-sum{j in 1..q-1}x2[q,j]=0;
>
> In first run cut_point and cut_ray are of course dropped, but solver
> dose not take the initial value of variable Ship_pro into account and
> therefore turns the problem infeasible.
>
>
> Vlado
>
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.