设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8853|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'4 b& x- t1 a! c# N1 |. j
*/
9 U* j1 g$ ?2 o+ ]is
7 l! l3 s3 O+ r+ d, s# n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; I) ~: m/ Z$ rdo
% `* E" @& ?; D; Y( ]        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 }, e  {6 l9 d, k/ }        if current = @.Destination -- else return9 D* W8 f6 y: I  J0 `" Y
        then2 ~5 a0 k' f- j3 t4 D, m
                @.Destination := void;* K; s+ N0 Y& C; s
                if @.occupied then! F; P/ {2 i$ @0 w
                        part := @.cont;
1 M  I& N# G) n& {! o8 g: g                        @.transpOrder := void;( H) _# ~$ m7 c$ K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ A3 F1 N7 g) ]: M                                @,root.eventcontroller.simTime);
0 x7 j, ]* p+ Y0 E# I8 y% f                        @.HasOrder := false;
2 [; M" g" A1 l0 F# z! o. y: M                        @.DrivingHome := true;! o' w: ~7 ^. F/ D
                        rgManager.tryToStartTransOrder;
  F& B% Q! S% h4 z/ B0 c" Y                        if @.Destination = void6 v$ N, l" @+ l
                        then -- no transport order for vehicle @- d# ]# Y! M/ t+ ]0 N% z" b+ K) z
                                @.Destination :=/ x8 M7 Z5 |* Q9 H/ ]/ v
                                rgManager.nearestFreeStation(@,track.~);5 i1 b, W1 B5 x. l- l! Y* M) d
                                newDirection(@);   & a+ T% v4 G) ^: E8 {$ L# W! t2 a
                                if @.Destination /= void then
: M  z& G* n/ F, t2 h- R9 {& y# j  `                                        @.Destination.NumReservation :=. L) L( Y6 G% ^  Q
                                        @.Destination.NumReservation + 1;
& u" a, K+ u. S" q+ k5 }5 L                                end;
( |$ K0 H$ B( U+ v; j                                @.CurrIcon := "drivingHome";
  s% S9 F  v* u- }' X" U7 l: D                                @.DrivingHome := true;/ \8 N, }: W; X2 p& t' f* w
                        end;* s0 U; I) z2 V8 q! M; F4 ?: w3 ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- j( E3 g, }  V, I9 ?5 Y6 a$ E8 m; O                        part := @.transpOrder;  T& B( M; N. e3 N
                        part.move(@);-- load part3 ^% W) Y; B6 u3 j( U9 Q
                        @.CurrIcon := "load";9 ~& S, z# W+ r/ U+ r
                        GlobalDistObj := part.globDestination;
' p, Y: A  m+ ?" l2 q. O2 Q9 }  P                        assignLObj := rgmanager.rgAssignL;8 ]6 L5 ]# o- ~# U5 ?" [' R+ C
                        row := assignLObj.getRowNo(GlobalDistObj);0 S# k1 g0 n0 Z
                        if Row = -1 then -- since 70
6 D* {0 X4 v* n: e: ?0 ~                                if lan=1 then* A( w6 R) D  l" z  f: n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ b) Y4 z0 t8 A
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) C& B1 e' m$ _3 G4 q% R
                                else- P" a' g. y% G+ e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' l6 E8 n2 {3 O9 Y3 Y6 `" R1 @
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 b) h, _' W- s  X! S                                end;
* m$ K: R9 w8 Q* S                        else
- B( Y4 U3 l% T  B                                @.Destination := assignLObj[1,row];! Y5 t! m+ r5 k% b4 x* A
                        end;                       
' v& g- I$ h& R2 w! K                        newDirection(@);
5 [& v$ a6 C- W7 a$ g9 x                        @.HasOrder := true;. q4 y% x" U- Q7 P' c
                end;' T( K7 C1 l3 o: y% _) y
        end;
/ k0 z% s6 m+ B8 S3 v2 w' {, oend;        -- of the method  W5 j3 h3 C" R! X: P8 M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   U) c0 o+ \& y/ Q

8 j  }" a+ l3 x这是AGV_putin中arrive的method。
+ |  {( c% V. r; z7 \- ~% l/ t. o4 @4 m% b: g9 j  ?6 a/ O
当到达物料速度越高时,这个报警更多,
9 @7 k+ p% z: F( Q: J/ F6 V可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 {5 l2 `9 O7 s+ F程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: `6 L" S: {7 q% h6 I7 t2 p
8 Q* ~. ~7 ~4 K& _另外一个小建议,就是move,所有的move都可以这样* [; {6 Z6 Q9 Q6 y, a
if not move() then debug end
- P2 I9 D! |! n: J/ }$ N# C( Q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ l# Y" g1 R$ H/ w9 i2 r2 y6 e+ `: wplant simulation中的free libraries有AGV模板,
9 r% S: Z; A9 K里面也有案例。
! r" F' S. p0 r$ W3 M/ F. n/ r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( I0 X! U. C7 P
, ]& k$ l- ?$ ~' |
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' V$ G2 E( a# e( j. W
3 h' }+ D6 a' W& ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / f$ a- `! O" e/ X5 g9 n* P  `
这是AGV_putin中arrive的method。
5 D3 q, \& ?2 G$ s) n5 N3 d& p  ^- R" m5 e
当到达物料速度越高时,这个报警更多,
8 h7 i8 M6 F. m) n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-6-30 08:20 , Processed in 0.016470 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表