lingo编程,报错Missing right parenthesis怎么改,求大神 5
model:sets:state/1..5/:p;endsetslamda=2;mu=0.5;rho=lamda/mu;s=2;k=5;lamda*p0=mu*p(1);...
model:
sets:
state/1..5/:p;
endsets
lamda=2;mu=0.5;rho=lamda/mu;s=2;k=5;
lamda*p0=mu*p(1);
(lamda+mu)*p(1)=lamda*p0+2*mu*p(2);
@for(state(i)|i #gt#l #and# i #lt# s:
(ladma+i*mu)*p(i)=lamda*p(i-1)+(i+1)*mu*p(i+1);
@for(state(i)|i #ge# s #and# i #lt# k:
(lamda+s*mu)*p(i)=lamda*p(i-1)+s*mu*p(i-1);
lamda*p(k-1)=s*mu*p(k);
p0+@sum(state:p)=1;
L_s=@sum(state(i):i*p(i));
L_q=L_s-lamda_e/mu;
W_s=L_s/lamda_e;
W_q=W_s-i/mu;
end
我想问一下为什么运行起来总是说Missing right parenthesis 展开
sets:
state/1..5/:p;
endsets
lamda=2;mu=0.5;rho=lamda/mu;s=2;k=5;
lamda*p0=mu*p(1);
(lamda+mu)*p(1)=lamda*p0+2*mu*p(2);
@for(state(i)|i #gt#l #and# i #lt# s:
(ladma+i*mu)*p(i)=lamda*p(i-1)+(i+1)*mu*p(i+1);
@for(state(i)|i #ge# s #and# i #lt# k:
(lamda+s*mu)*p(i)=lamda*p(i-1)+s*mu*p(i-1);
lamda*p(k-1)=s*mu*p(k);
p0+@sum(state:p)=1;
L_s=@sum(state(i):i*p(i));
L_q=L_s-lamda_e/mu;
W_s=L_s/lamda_e;
W_q=W_s-i/mu;
end
我想问一下为什么运行起来总是说Missing right parenthesis 展开
3个回答
展开全部
添加两个括号,结果是没有可行解。
model:
sets:
state/1..5/:p;
endsets
lamda=2;
mu=0.5;
rho=lamda/mu;
s=2;
k=5;
lamda*p0=mu*p(1);
(lamda+mu)*p(1)=lamda*p0+2*mu*p(2);
@for(state(i)|i #gt#1 #and# i #lt# s:
(ladma+i*mu)*p(i)=lamda*p(i-1)+(i+1)*mu*p(i+1));
@for(state(i)|i #ge# s #and# i #lt# k:
(lamda+s*mu)*p(i)=lamda*p(i-1)+s*mu*p(i-1));
lamda*p(k-1)=s*mu*p(k);
p0+@sum(state:p)=1;
L_s=@sum(state(i):i*p(i));
L_q=L_s-lamda_e/mu;
W_s=L_s/lamda_e;
W_q=W_s-i/mu;
end
model:
sets:
state/1..5/:p;
endsets
lamda=2;
mu=0.5;
rho=lamda/mu;
s=2;
k=5;
lamda*p0=mu*p(1);
(lamda+mu)*p(1)=lamda*p0+2*mu*p(2);
@for(state(i)|i #gt#1 #and# i #lt# s:
(ladma+i*mu)*p(i)=lamda*p(i-1)+(i+1)*mu*p(i+1));
@for(state(i)|i #ge# s #and# i #lt# k:
(lamda+s*mu)*p(i)=lamda*p(i-1)+s*mu*p(i-1));
lamda*p(k-1)=s*mu*p(k);
p0+@sum(state:p)=1;
L_s=@sum(state(i):i*p(i));
L_q=L_s-lamda_e/mu;
W_s=L_s/lamda_e;
W_q=W_s-i/mu;
end
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询