logarithmic objective function

After solving the problem of log other error appeared:
variables
z,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24,w25,w26,w27,w28,w29,w30;
positive variables
w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24,w25,w26,w27,w28,w29,w30,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30;
equations
Funct,eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,eq11,eq12,eq13,eq14,eq15,eq16,eq17,eq18,eq19,eq20,eq21,eq22,eq23,eq24,eq25,eq26,eq27,eq28,eq29,eq30,eq31,eq32,eq33,eq34,eq35,eq36,eq37,eq38,eq39,eq40,eq41,eq42,eq43,eq44,eq45,eq46,eq47,eq48,eq49,eq50,eq51,eq52,eq53,eq54,eq55,eq56,eq57,eq58,eq59,eq60,eq61,eq62,eq63,eq64,eq65,eq66,eq67,eq68,eq69,eq70,eq71;
Funct… z=e=(w1*(log(y1)))-w1+(1/3)+(w2*(log(y2)))-w2+(1/3)+
(w3*(log(y3)))-w3+(1/3)+(w4*(log(y4)))-w4+(1/3)+(w5*(log(y5)))-
w5+(1/3)+(w6*(log(y6)))-w6+(1/3)+(w7*(log(y7)))-w7+(1/3)+
(w8*(log(y8)))-w8+(1/3)+(w9*(log(y9)))-w9+(1/3)+(w10*(log(y10)))-
w10+(1/3)+(w11*(log(y11)))-w11+(1/3)+(W12*(log(y12)))-w12+(1/3)+
(w13*(log(y13)))-w13+(1/3)+(w14*(log(y14)))-w14+(1/3)+(w15*(log(y15)))-
w15+(1/3)+(w16*(log(y16)))-w16+(1/3)+(w17*(log(y17)))-w17+(1/3)+
(w18*(log(y18)))-w18+(1/3)+(w19*(log(y19)))-w19+(1/3)+(w20*(log(y20)))-
w20+(1/3)+(w21*(log(y21)))-w21+(1/3)+(w22*(log(y22)))-w22+(1/3)+
(w23*(log(y23)))-w23+(1/3)+(w24*(log(y24)))-w24+(1/3)+(w25*(log(y25)))-
w25+(1/3)+(w26*(log(y26)))-w26+(1/3)+(w27*(log(y27)))-w27+(1/3)+
(w28*(log(y28)))-w28+(1/3)+(w29*(log(y29)))-w29+(1/3)+(w30*(log(y30)))-
w30+(1/3);
eq1…350w1+350w2+250w3+351w4+225w5+440w6+231w7+262w8+89.7w9+96.9w10+350w11+85.3w12+171w13+258w14+140w15+302w16+500w17+440w18+350w19+318w20+231w21+360w22+96.9w23+460w24+133.6w25+318w26+351w27+351w28+360w29+350w30=e=284.6;
eq2…165w1+170w2+105w3+143w4+95w5+215w6+110w7+110w8+70w9+75w10+155w11+80w12+109w13+110w14+83w15+129w16+190w17+215w18+155w19+145w20+110w21+180w22+75w23+223w24+96*
w25+140w26+148w27+148w28+195w29+165w30=e=138;
eq3…260
w1+275w2+185w3+255w4+170w5+330w6+175w7+200w8+81w9+83w10+250w11+83w12+146w13+195w14+109w15+220w16+360w17+330w18+250w19+255w20+175w21+290w22+83w23+366w24+120w25+255w26+243w27+243w28+295w29+255w30=e=215.8;
eq4…8
w1+8.5w2+8.25w3+8w4+8.4w5+8.2w6+8w7+8.5w8+8.2w9+9w10+8.5w11+8.5w12+8.2w13+8w14+8.4w15+8w16+8.5w17+8.2w18+8.5w19+8.5w20+8w21+8.4w22+9w23+8w24+8.4w25+8.5w26+8w27+8w28+8.25w29+8.5w30=e=8.5;
eq5…2.56
w1+2.56w2+2.73w3+3w4+2.76w5+2.88w6+2.56w7+2.56w8+3.9w9+4.3w10+3.08w11+3.89w12+3.22w13+3.08w14+3.4w15+3w16+2.73w17+2.71w18+3.08w19+2.45w20+2.56w21+2.45w22+4.3w23+3w24+3.91w25+2.71w26+3.25w27+3.26w28+
3.15
w29+2.73w30=e=3.16;
eq6…4
w1+4w2+1w3+2w4+1w5+4w6+2w7+2w8+2w9+2w10+4w11+2w12+2w13+1w14+2w15+2w16+4w17+4w18+4w19+2w20+2w21+2w22+2w23+4w24+2w25+2w26+2w27+2w28+4w29+4w30=e=2.8;
eq7…3
w1+3w2+3w3+3w4+3w5+3w6+3w7+3w8+4w9+5w10+3w11+4w12+4w13+3w14+4w15+3w16+3w17+3w18+3w19+3w20+3w21+3w22+5w23+3w24+5w25+3w26+3w27+3w28+3w29+3w30=e=4;
eq8…200.3
w1+199.6w2+196.7w3+199.9w4+194.1w5+184.5w6+179.3w7+179.3w8+155.7w9+165.2w10+195.4w11+160.6w12+170.4w13+171.5w14+168.8w15+199.9w16+224.1w17+231w18+196.7w19+197.6w20+179.3w21+214.2w22+165.2w23+228w24+171w25+215.3w26+215.5w27+216.1w28+209.3w29+185.2w30=e=195;
eq9…69.9
w1+72.9w2+72.2w3+74w4+71.8w5+69w6+65.4w7+65.4w8+64w9+65w10+74.4w11+62.2w12+66.9w13+77w14+69.4w15+74w16+79.8w17+79.7w18+72.2w19+71w20+65.4w21+76.3w22+61.8w23+79.8w24+63.4w25+76.3w26+78.5w27+78.5w28+77.4w29+69w30=e=75;
eq10…3910
w1+3860w2+3510w3+3890w4+3365w5+4215w6+3020w7+3180w8+1905w9+2320w10+3885w11+2009w12+2655w13+3375w14+2700w15+3890w16+5290w17+5185w18+3910w19+3660w20+3050
w21+4250w22+2275w23+5430w24+2535w25+4370w26+4540w27+4715w28+4215w29+3660w30=e=3628.6;
eq11…w1+w2+w3+w4+w5+w6+w7+w8+w9+w10+w11+w12+w13+w14+w15+w16+w17+w18+w19+w20+w21+w22+w23+w24+w25+w26+w27+w28+w29+w30=e=1;
eq12…y1.lO=e=0.0001;
eq13…y2.LO=e=0.0001;
eq14…y3.LO=e=0.0001;
eq15…y4.LO=e=0.0001;
eq16…y5.LO=e=0.0001;
eq17…y6.LO=e=0.0001;
eq18…y7.LO=e=0.0001;
eq19…y8.LO=e=0.0001;
eq20…y9.LO=e=0.0001;
eq21…y10.LO=e=0.0001;
eq22…y11.LO=e=0.0001;
eq23…y12.LO=e=0.0001;
eq24…y13.LO=e=0.0001;
eq25…y14.LO=e=0.0001;
eq26…y15.LO=e=0.0001;
eq27…y16.LO=e=0.0001;
eq28…y17.LO=e=0.0001;
eq29…y18.LO=e=0.0001;
eq30…y19.LO=e=0.0001;
eq31…y20.LO=e=0.0001;
eq32…y21.LO=e=0.0001;
eq33…y22.LO=e=0.0001;
eq34…y23.LO=e=0.0001;
eq35…y24.LO=e=0.0001;
eq36…y25.LO=e=0.0001;
eq37…y26.LO=e=0.0001;
eq38…y27.LO=e=0.0001;
eq39…y28.LO=e=0.0001;
eq40…y29.LO=e=0.0001;
eq41…y30.LO=e=0.0001;
eq42…y1=e=30
w1;
eq43…y2=e=30w2;
eq44…y3=e=30
w3;
eq45…y4=e=30w4;
eq46…y5=e=30
w5;
eq47…y6=e=30w6;
eq48…y7=e=30
w7;
eq49…y8=e=30w8;
eq50…y9=e=30
w9;
eq51…y10=e=30w10;
eq52…y11=e=30
w11;
eq53…y12=e=30w12;
eq54…y13=e=30
w13;
eq55…y14=e=30w14;
eq56…y15=e=30
w15;
eq57…y16=e=30w16;
eq58…y17=e=30
w17;
eq59…y18=e=30w18;
eq60…y19=e=30
w19;
eq61…y20=e=30w20;
eq62…y21=e=30
w21;
eq63…y22=e=30w22;
eq64…y23=e=30
w23;
eq65…y24=e=30w24;
eq66…y25=e=30
w25;
eq67…y26=e=30w26;
eq68…y27=e=30
w27;
eq69…y28=e=30w28;
eq70…y29=e=30
w29;
eq71…y30=e=30*w30;
model l1/all/ ;
solve l1 using NLP min z;
display
z.l,w1.l,w2.l,w3.l,w4.l,w5.l,w6.l,w7.l,w8.l,w9.l,w10.l,w11.l,w12.l,w13.l,w14.l,w15.l,w16.l,w17.l,w18.l,w19.l,w20.l,w21.l,w22.l,w23.l,w24.l,w25.l,w26.l,w27.l,w28.l,w29.l,w30.l,y1.l,y2.l,y3.l,y4.l,y5.l,y6.l,y7.l,y8.l,y9.l,y10.l,y11.l,y12.l,y13.l,y14.l,y15.l,y16.l,y17.l,y18.l,y19.l,y20.l,y21.l,y22.l,y23.l,y24.l,y25.l,y26.l,y27.l,y28.l,y29.l,y30.l;


when I removed =e= starting from eq12 error appeared saying that =e=
is missing.
the problem now is that saying that z in solving part is undefined
although i defined it in the variables and put it as function.
Thanks

\

Heba
You should do this:
replace the line(s)
eq12…y1.lO=e=0.0001;
by:
y1.lO = 0.0001;
(remove equation definition and the “=e=”)

Regards

2011/5/11 heba

After solving the problem of log other error appeared:
variables
z,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30,w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24,w25,w26,w27,w28,w29,w30;
positive variables
w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24,w25,w26,w27,w28,w29,w30,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16,y17,y18,y19,y20,y21,y22,y23,y24,y25,y26,y27,y28,y29,y30;
equations
Funct,eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,eq11,eq12,eq13,eq14,eq15,eq16,eq17,eq18,eq19,eq20,eq21,eq22,eq23,eq24,eq25,eq26,eq27,eq28,eq29,eq30,eq31,eq32,eq33,eq34,eq35,eq36,eq37,eq38,eq39,eq40,eq41,eq42,eq43,eq44,eq45,eq46,eq47,eq48,eq49,eq50,eq51,eq52,eq53,eq54,eq55,eq56,eq57,eq58,eq59,eq60,eq61,eq62,eq63,eq64,eq65,eq66,eq67,eq68,eq69,eq70,eq71;
Funct… z=e=(w1*(log(y1)))-w1+(1/3)+(w2*(log(y2)))-w2+(1/3)+
(w3*(log(y3)))-w3+(1/3)+(w4*(log(y4)))-w4+(1/3)+(w5*(log(y5)))-
w5+(1/3)+(w6*(log(y6)))-w6+(1/3)+(w7*(log(y7)))-w7+(1/3)+
(w8*(log(y8)))-w8+(1/3)+(w9*(log(y9)))-w9+(1/3)+(w10*(log(y10)))-
w10+(1/3)+(w11*(log(y11)))-w11+(1/3)+(W12*(log(y12)))-w12+(1/3)+
(w13*(log(y13)))-w13+(1/3)+(w14*(log(y14)))-w14+(1/3)+(w15*(log(y15)))-
w15+(1/3)+(w16*(log(y16)))-w16+(1/3)+(w17*(log(y17)))-w17+(1/3)+
(w18*(log(y18)))-w18+(1/3)+(w19*(log(y19)))-w19+(1/3)+(w20*(log(y20)))-
w20+(1/3)+(w21*(log(y21)))-w21+(1/3)+(w22*(log(y22)))-w22+(1/3)+
(w23*(log(y23)))-w23+(1/3)+(w24*(log(y24)))-w24+(1/3)+(w25*(log(y25)))-
w25+(1/3)+(w26*(log(y26)))-w26+(1/3)+(w27*(log(y27)))-w27+(1/3)+
(w28*(log(y28)))-w28+(1/3)+(w29*(log(y29)))-w29+(1/3)+(w30*(log(y30)))-
w30+(1/3);
eq1…350w1+350w2+250w3+351w4+225w5+440w6+231w7+262w8+89.7w9+96.9w10+350w11+85.3w12+171w13+258w14+140w15+302w16+500w17+440w18+350w19+318w20+231w21+360w22+96.9w23+460w24+133.6w25+318w26+351w27+351w28+360w29+350w30=e=284.6;
eq2…165w1+170w2+105w3+143w4+95w5+215w6+110w7+110w8+70w9+75w10+155w11+80w12+109w13+110w14+83w15+129w16+190w17+215w18+155w19+145w20+110w21+180w22+75w23+223w24+96*
w25+140w26+148w27+148w28+195w29+165w30=e=138;
eq3…260
w1+275w2+185w3+255w4+170w5+330w6+175w7+200w8+81w9+83w10+250w11+83w12+146w13+195w14+109w15+220w16+360w17+330w18+250w19+255w20+175w21+290w22+83w23+366w24+120w25+255w26+243w27+243w28+295w29+255w30=e=215.8;
eq4…8
w1+8.5w2+8.25w3+8w4+8.4w5+8.2w6+8w7+8.5w8+8.2w9+9w10+8.5w11+8.5w12+8.2w13+8w14+8.4w15+8w16+8.5w17+8.2w18+8.5w19+8.5w20+8w21+8.4w22+9w23+8w24+8.4w25+8.5w26+8w27+8w28+8.25w29+8.5w30=e=8.5;
eq5…2.56
w1+2.56w2+2.73w3+3w4+2.76w5+2.88w6+2.56w7+2.56w8+3.9w9+4.3w10+3.08w11+3.89w12+3.22w13+3.08w14+3.4w15+3w16+2.73w17+2.71w18+3.08w19+2.45w20+2.56w21+2.45w22+4.3w23+3w24+3.91w25+2.71w26+3.25w27+3.26w28+
3.15
w29+2.73w30=e=3.16;
eq6…4
w1+4w2+1w3+2w4+1w5+4w6+2w7+2w8+2w9+2w10+4w11+2w12+2w13+1w14+2w15+2w16+4w17+4w18+4w19+2w20+2w21+2w22+2w23+4w24+2w25+2w26+2w27+2w28+4w29+4w30=e=2.8;
eq7…3
w1+3w2+3w3+3w4+3w5+3w6+3w7+3w8+4w9+5w10+3w11+4w12+4w13+3w14+4w15+3w16+3w17+3w18+3w19+3w20+3w21+3w22+5w23+3w24+5w25+3w26+3w27+3w28+3w29+3w30=e=4;
eq8…200.3
w1+199.6w2+196.7w3+199.9w4+194.1w5+184.5w6+179.3w7+179.3w8+155.7w9+165.2w10+195.4w11+160.6w12+170.4w13+171.5w14+168.8w15+199.9w16+224.1w17+231w18+196.7w19+197.6w20+179.3w21+214.2w22+165.2w23+228w24+171w25+215.3w26+215.5w27+216.1w28+209.3w29+185.2w30=e=195;
eq9…69.9
w1+72.9w2+72.2w3+74w4+71.8w5+69w6+65.4w7+65.4w8+64w9+65w10+74.4w11+62.2w12+66.9w13+77w14+69.4w15+74w16+79.8w17+79.7w18+72.2w19+71w20+65.4w21+76.3w22+61.8w23+79.8w24+63.4w25+76.3w26+78.5w27+78.5w28+77.4w29+69w30=e=75;
eq10…3910
w1+3860w2+3510w3+3890w4+3365w5+4215w6+3020w7+3180w8+1905w9+2320w10+3885w11+2009w12+2655w13+3375w14+2700w15+3890w16+5290w17+5185w18+3910w19+3660w20+3050
w21+4250w22+2275w23+5430w24+2535w25+4370w26+4540w27+4715w28+4215w29+3660w30=e=3628.6;
eq11…w1+w2+w3+w4+w5+w6+w7+w8+w9+w10+w11+w12+w13+w14+w15+w16+w17+w18+w19+w20+w21+w22+w23+w24+w25+w26+w27+w28+w29+w30=e=1;
eq12…y1.lO=e=0.0001;
eq13…y2.LO=e=0.0001;
eq14…y3.LO=e=0.0001;
eq15…y4.LO=e=0.0001;
eq16…y5.LO=e=0.0001;
eq17…y6.LO=e=0.0001;
eq18…y7.LO=e=0.0001;
eq19…y8.LO=e=0.0001;
eq20…y9.LO=e=0.0001;
eq21…y10.LO=e=0.0001;
eq22…y11.LO=e=0.0001;
eq23…y12.LO=e=0.0001;
eq24…y13.LO=e=0.0001;
eq25…y14.LO=e=0.0001;
eq26…y15.LO=e=0.0001;
eq27…y16.LO=e=0.0001;
eq28…y17.LO=e=0.0001;
eq29…y18.LO=e=0.0001;
eq30…y19.LO=e=0.0001;
eq31…y20.LO=e=0.0001;
eq32…y21.LO=e=0.0001;
eq33…y22.LO=e=0.0001;
eq34…y23.LO=e=0.0001;
eq35…y24.LO=e=0.0001;
eq36…y25.LO=e=0.0001;
eq37…y26.LO=e=0.0001;
eq38…y27.LO=e=0.0001;
eq39…y28.LO=e=0.0001;
eq40…y29.LO=e=0.0001;
eq41…y30.LO=e=0.0001;
eq42…y1=e=30
w1;
eq43…y2=e=30w2;
eq44…y3=e=30
w3;
eq45…y4=e=30w4;
eq46…y5=e=30
w5;
eq47…y6=e=30w6;
eq48…y7=e=30
w7;
eq49…y8=e=30w8;
eq50…y9=e=30
w9;
eq51…y10=e=30w10;
eq52…y11=e=30
w11;
eq53…y12=e=30w12;
eq54…y13=e=30
w13;
eq55…y14=e=30w14;
eq56…y15=e=30
w15;
eq57…y16=e=30w16;
eq58…y17=e=30
w17;
eq59…y18=e=30w18;
eq60…y19=e=30
w19;
eq61…y20=e=30w20;
eq62…y21=e=30
w21;
eq63…y22=e=30w22;
eq64…y23=e=30
w23;
eq65…y24=e=30w24;
eq66…y25=e=30
w25;
eq67…y26=e=30w26;
eq68…y27=e=30
w27;
eq69…y28=e=30w28;
eq70…y29=e=30
w29;
eq71…y30=e=30*w30;
model l1/all/ ;
solve l1 using NLP min z;
display
z.l,w1.l,w2.l,w3.l,w4.l,w5.l,w6.l,w7.l,w8.l,w9.l,w10.l,w11.l,w12.l,w13.l,w14.l,w15.l,w16.l,w17.l,w18.l,w19.l,w20.l,w21.l,w22.l,w23.l,w24.l,w25.l,w26.l,w27.l,w28.l,w29.l,w30.l,y1.l,y2.l,y3.l,y4.l,y5.l,y6.l,y7.l,y8.l,y9.l,y10.l,y11.l,y12.l,y13.l,y14.l,y15.l,y16.l,y17.l,y18.l,y19.l,y20.l,y21.l,y22.l,y23.l,y24.l,y25.l,y26.l,y27.l,y28.l,y29.l,y30.l;


when I removed =e= starting from eq12 error appeared saying that =e=
is missing.
the problem now is that saying that z in solving part is undefined
although i defined it in the variables and put it as function.
Thanks


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\

Edson Valle
edsoncv@gmail.com


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.