[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] [Fwd: Help in if Statement]
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] [Fwd: Help in if Statement] |
Date: |
Thu, 12 May 2011 14:16:36 +0400 |
-------- Forwarded Message --------
From: sina hamedheidari <address@hidden>
To: address@hidden
Subject: Help in if Statement
Date: Thu, 12 May 2011 01:40:56 -0700 (PDT)
hi,
I am very fresh in glpk and I have a question.
I have a code that you can see it below, it does'nt seem to have error
but
when i compile it in GLPK the error is:
"right parenthesis missing where expected
Context: ...ms } printf ( if ( Selected [ i ] == 1 and c < 1 ) then c :=
MathProg model processing error"
for {i in Items}
printf(if (Selected[i]==1 and c<1) then (c:=1 & "display: %d\n
\n")),i;
c is a variable that its value is zero first.
I want to make it 1 when I see the first 1 in Selected.
Selected is an array that has binary value.(var
Selected{Items},binary;)
can anyone help me to fix this problem
Thanks in Advance
Sina
Arak university of Iran.
- [Help-glpk] [Fwd: Help in if Statement],
Andrew Makhorin <=