[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in
From: |
Noli Sicad |
Subject: |
Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T |
Date: |
Tue, 10 May 2016 09:07:46 +1000 |
Hi Andrew,
I also place this script (below) in the model to get the isHarvestable output.
printf{ t in PERIOD, i in CROPTYPE, j in AGECLASS:
isHarvestable[t,i,j] > epsilon} "%1s %2s %2s %3s\n",
t,i,j,isHarvestable[t,i,j];
This is the output.
~~~~~~~
1 1 6 1
1 2 5 1
1 3 5 1
1 10 6 1
1 11 6 1
1 17 5 1
1 18 6 1
1 19 6 1
1 20 6 1
1 21 5 1
1 22 7 1
1 23 7 1
1 27 5 1
1 31 5 1
1 32 6 1
1 33 5 1
1 34 6 1
1 35 6 1
.
.
.
.
2 20 7 1
2 21 6 1
2 22 8 1
2 23 8 1
2 26 5 1
2 27 6 1
2 31 6 1
2 32 7 1
2 33 6 1
2 34 7 1
2 35 7 1
2 36 8 1
.
.
.
~~~~~~~~~
Noli
On 5/10/16, Noli Sicad <address@hidden> wrote:
> Hi Andrew,
>
>> I see nothing wrong. For example, there is
>> Adjacent_Constraint(1,34,19,6) generated for (34,19) in ADJACENT which
>> is listed below (33,21). For (33,22), (33,23), etc., corresponding
>> Adjacent_Constraints are not generated because the condition
>> isHarvestable[t,i1,j] and isHarvestable[t,i2,j] specified for
>> Adjacent_Constraint is not met.
>
> I think the condition isHarvestable[t,i1,j] and isHarvestable[t,i2,j]
> specified for Adjacent_Constraint is met for stands (i1,i2) (e.g.
> (22,33), (23, 33))
>
> Period 1
> (1,21,5)
> (1,22,7)
> (1,23,7)
> (1,27,5)
> (1,31,5)
> (1,32,6)
> (1,33,5)
>
> Period 2
> (2,21,6)
> (2,22,8)
> (2,23,8)
> (2,26,5)
> (2,27,6)
> (2,31,6)
> (2,32,7)
> (2,33,6)
>
> This can be verify by placing this script in the MathProg model
>
> display HARVEST;
>
> The result is:
>
> #####################################################################################
> Display statement at line 138
> HARVEST:
> (1,1,6)
> (1,2,5)
> (1,3,5)
> (1,10,6)
> (1,11,6)
> (1,17,5)
> (1,18,6)
> (1,19,6)
> (1,20,6)
> (1,21,5)
> (1,22,7)
> (1,23,7)
> (1,27,5)
> (1,31,5)
> (1,32,6)
> (1,33,5)
> (1,34,6)
> .
> .
> .
> (2,20,7)
> (2,21,6)
> (2,22,8)
> (2,23,8)
> (2,26,5)
> (2,27,6)
> (2,31,6)
> (2,32,7)
> (2,33,6)
> (2,34,7)
> (2,35,7)
> .
> ##########
>
> This is the CPLEX LP conversion.
>
> Adjacent_Constraint(1,20,34,6): + Y(1,20,6) + Y(1,34,6) <= 1
> Adjacent_Constraint(1,20,77,6): + Y(1,20,6) + Y(1,77,6) <= 1
> Adjacent_Constraint(1,21,33,5): + Y(1,21,5) + Y(1,33,5) <= 1
> Adjacent_Constraint(1,32,72,6): + Y(1,32,6) + Y(1,72,6) <= 1
> Adjacent_Constraint(1,32,73,6): + Y(1,32,6) + Y(1,73,6) <= 1
> Adjacent_Constraint(1,33,21,5): + Y(1,21,5) + Y(1,33,5) <= 1
> Adjacent_Constraint(1,34,19,6): + Y(1,19,6) + Y(1,34,6) <= 1
> Adjacent_Constraint(1,34,20,6): + Y(1,20,6) + Y(1,34,6) <= 1
> Adjacent_Constraint(1,34,65,6): + Y(1,34,6) + Y(1,65,6) <= 1
> Adjacent_Constraint(1,34,77,6): + Y(1,34,6) + Y(1,77,6) <= 1
> Adjacent_Constraint(1,35,38,6): + Y(1,35,6) + Y(1,38,6) <= 1
> Adjacent_Constraint(1,35,39,6): + Y(1,35,6) + Y(1,39,6) <= 1
>
> There is no Adjacent_Constraint for
>
> (1,21,5)
> (1,22,7)
> (1,23,7)
> (1,27,5)
> (1,31,5)
> (1,32,6)
>
>
> Noli
>
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T, Andrew Makhorin, 2016/05/09
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T, Noli Sicad, 2016/05/09
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T,
Noli Sicad <=
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T, Andrew Makhorin, 2016/05/09
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T, Noli Sicad, 2016/05/09
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T, Noli Sicad, 2016/05/09
- Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T, Andrew Makhorin, 2016/05/10
- Prev by Date:
Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T
- Next by Date:
Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T
- Previous by thread:
Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T
- Next by thread:
Re: [Help-glpk] Set pair e.g. ( (i, j) in T) not properly implemented in matrix generation (i.e. CPLEX LP formulation, etc.) in particular data set (e.g. repeating i's in (i, j) in T
- Index(es):