help-glpk
[Top][All Lists]
Advanced

[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 12:32:39 +1000

Hi,

I want to restructure my set ADJACENT to set ADJACENT_D.

set ADJACENT within {i1 in CROPTYPE, i2 in CROPTYPE: i1 <> i2};

to

set ADJACENT_D within ..

I don't  know know what to do here...   ADJACENT that incorporates  j
in AGECLASS

The data in set ADJACENT:

set ADJACENT :=
(1,21)

(1,33)
(1,80)
(1,81)

I like to appear the data in computer memory like this:

set ADJACENT_D :=

(1,21,5)
(1,21,6)
(1,21,7)
(1,21,8)
.
(1,33,5)
(1,33,6)
(1.33,7)
(1,33,8)

5, 6, 7, 8 are j (i.e. j in AGECLASS which are the forest stand
harvestable ages).


#The original constraint.
subject to Adjacent_Constraint{ t in PERIOD, (i1,i2) in ADJACENT, j in
AGECLASS: isHarvestable[t,i1,j] and isHarvestable[t,i2,j] and (i1,i2)
in ADJACENT }: Y[t,i1,j] + Y[t,i2,j] <= 1;


# the revised one..
subject to Adjacent_Constraint_D{ t in PERIOD, (i1,i2,j2) in
ADJACENT_D, j in AGECLASS: isHarvestable[t,i1,j] and
isHarvestable[t,i2,j] }: Y[t,i1,j2] + Y[t,i2,j2] <= 1;

Now, my question is, what be "set ADJACENT_D"

set ADJACENT_D .....???????

Any suggestion?

Thanks in advance.

Regards, Noli

On 5/10/16, Noli Sicad <address@hidden> wrote:
> Hi Andrew,
>
> OK. I did as you suggested.
>
> You are right. That stands (33,22) are not adjacent in time (i.e. j in
> AGECLASS) and space.
>
> The stands are adjacent but at Period 1, stand 33 has AGECLASS 7 while
> 22 has AGECLASS 5.
>
> This AGECLASS parameter  (i.e. j in AGECLASS which the harvest age of
> the forest stand) makes this model quite complicated.
>
> My previous model does not have AGECLASS in the script but enumerated
> HARVEST CANDIDATES for Stands in the data section.
>
> Thanks.
>
> Regards, Noli
>
> On 5/10/16, Andrew Makhorin <address@hidden> wrote:
>> Noli,
>>
>> Your model is quite complicated, so it's difficult to me to inspect it.
>> As I understand you suspect that some constraints are not generated for
>>
>> subject to Adjacent_Constraint{ t in PERIOD, (i1,i2) in ADJACENT, j in
>> AGECLASS: isHarvestable[t,i1,j] and isHarvestable[t,i2,j] and (i1,i2) in
>> ADJACENT }: Y[t,i1,j] + Y[t,i2,j] <= 1;
>>
>> while they should be. Please find t, i1, i2, and j, for which this
>> happens, and add a display statement before s.t. Adjacent_Constraint ...
>> to display t, i1, i2, j, PERIOD, ADJACENT, AGECLASS, and isHarvestable.
>> Thanks.
>>
>> Andrew Makhorin
>>
>>
>>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]