Re: [Fwd: Need help in Fixing GUSEK Code]

2020-04-10 Thread Michael Hennebry

On Fri, 10 Apr 2020, Andrew Makhorin wrote:


 Forwarded Message 
From: sahani rathnasiri 
To: help-glpk@gnu.org
Subject: Need help in Fixing GUSEK Code
Date: Fri, 10 Apr 2020 19:08:39 +1000


...

I am running code in GUSEK and I need to define three indexes. I am
getting a syntax error. Please help me fix this.
My constraint;
subject to order_quantity_constraint_min {i in I, j in J, n in N: i
<= t, j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n];

The result I receive in NEOS;

amplin, line 50 (offset 2865):
        syntax error
context:  subject to order_quantity_constraint_min {i in I, j in J, n
in N: i <=  >>> t, <<<  j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <=
a[i,n];


Presumably the offending t is supposed to be j or n.

--
Michael   henne...@web.cs.ndsu.nodak.edu
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
 --  someeecards

Re: [Fwd: Need help in Fixing GUSEK Code]

2020-04-10 Thread Heinrich Schuchardt
On 4/10/20 11:57 AM, Andrew Makhorin wrote:
>  Forwarded Message 
> From: sahani rathnasiri 
> To: help-glpk@gnu.org
> Subject: Need help in Fixing GUSEK Code
> Date: Fri, 10 Apr 2020 19:08:39 +1000
>
>> Hi All,
>>
>> I am running code in GUSEK and I need to define three indexes. I am
>> getting a syntax error. Please help me fix this.
>> My constraint;
>> subject to order_quantity_constraint_min {i in I, j in J, n in N: i
>> <= t, j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n];
>>
>> The result I receive in NEOS;
>>
>> amplin, line 50 (offset 2865):
>>         syntax error
>> context:  subject to order_quantity_constraint_min {i in I, j in J, n
>> in N: i <=  >>> t, <<<  j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <=
>> a[i,n];

Dear Sahani,

the output points you to where the problem is: "t,".

Probably you mean

i <= t and j <> 2 and n <= r

Best regards

Heinrich

>> Executing AMPL.
>>
>> If anyone can help me, really appreciate your help in this regard.
>>
>> Thank You,
>>
>> Best Regards,
>>
>> Sahani 



[Fwd: Need help in Fixing GUSEK Code]

2020-04-10 Thread Andrew Makhorin
 Forwarded Message 
From: sahani rathnasiri 
To: help-glpk@gnu.org
Subject: Need help in Fixing GUSEK Code
Date: Fri, 10 Apr 2020 19:08:39 +1000

> Hi All,
> 
> I am running code in GUSEK and I need to define three indexes. I am
> getting a syntax error. Please help me fix this.
> My constraint;
> subject to order_quantity_constraint_min {i in I, j in J, n in N: i
> <= t, j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <= a[i,n];
> 
> The result I receive in NEOS;
> 
> amplin, line 50 (offset 2865):
>         syntax error
> context:  subject to order_quantity_constraint_min {i in I, j in J, n
> in N: i <=  >>> t, <<<  j <> 2 and n <= r}: Z[i,j]* Qmin[i,n] <=
> a[i,n];
> Executing AMPL.
> 
> If anyone can help me, really appreciate your help in this regard.
> 
> Thank You,
> 
> Best Regards,
> 
> Sahani 
> 
>