行人库在8.5中正常运行的模型在8.7中报错
方法2: 修改智能体群初始参数
行人库新版本中关于图形要通过add(参数1,参数2)...将图形相关的参数初始化在add函数中,
例如报错原来代码:
for (int i = 0; i < collectionService1.size(); i++) {
Gate g = add_gates();
g.service = collectionService1.get(i);
g.line = collectionTarget1.get(i);
g.ini();}
需改为:
for (int i = 0; i < collectionService1.size(); i++) {
Gate g = add_gates(collectionService1.get(i), collectionTarget1.get(i));
g.ini();
}