Results 1 to 2 of 2

Thread: Linear programming - Lingo

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    2

    Linear programming - Lingo

    HI

    I have some kind of error in my Lingo-code and I just can't find it.
    Please help
    I'm using LINGO7.

    The error code is as follows:
    Error code 21:
    Error in line 22: krp=500,500,500;

    21. IMPROPER USE OF ATTRIBUTE NAME.
    This message is printed if an attribute name is used incorrectly; for instance, you may have attempted to use it as a scalar (single value) variable. Check your model’s syntax.

    The Lingo-code looks like this:

    "MODEL:

    SETS:
    Ti/t1,t2,t3/:Krp,Kop,Kre,Koe,CI,CS,CL;
    Pr/p1..p3/:V,IL,I0,CSP,UP,STidP;
    Re/r1..r3/:CSR,STidR,UR;
    PAK/k1..k3/;
    PT(Pr,Ti):D,I,X;
    RT(Re,Ti):RR,OR,SBinR,B,Z;
    PrRe(Pr,Re):F;
    TPAK(Ti,PAK):Ka;
    PTPAK(Pr,Ti,PAK):RP,OP,SBinP;
    ENDSETS

    DATA:
    MB=9999999;
    CLRP=196;
    CLOP=400;
    CLRE=240;
    CLOE=480;
    CIH=0.08/12;
    Krp=500,500,200;
    Kop=132,150,100;
    Kre=445,500,91;
    Koe=16,20,10;

    V=14,15,13;
    IL=5162,4000,3000;
    I0=5162,4000,3000;
    CSP=153,153,153;
    UP=960,800,1000;
    StidP=0.35,0.35,0.35;

    CSR=964,964,964;
    STidR=0.5,0.5,0.5;
    UR=4500,5000,5500;

    D=90000,90000,10000
    90000,90000,0
    90000,90000,0;

    F=5.15,0,0
    0,5,0
    0,0,6;

    ENDDATA
    END"

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    2

    Re: Linear programming - Lingo

    Found the eror!

    This line caused the error:

    "CIH=0.08/12;"

    Apparently you are not allowed to calculate a parameter in the data section

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width