sets:
问题描述:
sets:
num:a,v,t,x,y;
endsets
data:
num =1..4;
y2=760;
vc=1.5;
enddata
min=m;
m=ma+mb;
mb=@sum(num(i):t(i));
x2=(vc*@cos(aq)+2.28)*ma;
y2=(vc*@sin(aq))*ma;
@for(num(i):v(i)=2.28/4*i);
@for(num(i):y(i)=2.28/4)
@for(num(i):x(i)=(vc*@cos(a(i))+v(i))*t(i));
@for(num(i):y(i)=(vc*@sin(a(i))*t(i)));
1000=@sum(num(i):x2+2*x(i));
1160=@sum(num(i):y2+2*y(i));
end
我这是一段渡河的程序 横向距离1000米 纵向1160 但是横向不能实现 需要超出1000米 可以拐出去在拐回来 用程序怎么编?
答
从语法上讲,只是“@for(num(i):y(i)=2.28/4)”这一句(倒数第六行)少一个分号,但是改过后运行被告知没有可行解.