设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6874|回复: 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'
8 Q+ E; K" m3 E/ `: j. `- s*/2 ^) ]% I) r* Q& ]" U
is# Y0 q) _( C3 ^/ p  I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 p& L' L& L4 zdo
4 @9 u1 ^# O. a! X7 n        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 b! r9 a$ M3 {9 l5 J        if current = @.Destination -- else return. b5 p; g/ N) i9 b# t
        then
7 T1 l1 ^( p0 j; P- R: m                @.Destination := void;
* G/ ~/ e. }/ D. {) ]" m                if @.occupied then4 t- O5 R& r$ D
                        part := @.cont;
6 v. Q8 Q' h" K- [4 Y7 [                        @.transpOrder := void;
4 E2 d4 c+ z( h8 {8 U' k7 q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! |* q. L/ x4 {$ p0 q- ^
                                @,root.eventcontroller.simTime);% d$ l5 R$ `$ ~! ]9 K
                        @.HasOrder := false;6 h  X$ L+ W5 |
                        @.DrivingHome := true;
# ?9 R9 ~8 T; n$ s! b) J                        rgManager.tryToStartTransOrder;  Z9 w5 v6 J9 H
                        if @.Destination = void: d& C. j/ s, v4 _6 T) E
                        then -- no transport order for vehicle @: V! P; ~3 X$ B1 D
                                @.Destination :=
- S( P. V1 g8 n8 X, U6 d4 B+ E                                rgManager.nearestFreeStation(@,track.~);
- u! u* @4 V; i7 e3 V" K* y0 T                                newDirection(@);   5 V* t: m( I; P0 t* a
                                if @.Destination /= void then; f4 J( M  S2 o2 [+ {+ S
                                        @.Destination.NumReservation :=! z# E/ ?! ~. z) M9 L& S1 B* C
                                        @.Destination.NumReservation + 1;
- {1 J! C1 b) x* b                                end;% ]( Q" q" k5 w  U
                                @.CurrIcon := "drivingHome";. @  e+ M1 @- Q3 m1 Y9 U8 _  b# n3 Z: [
                                @.DrivingHome := true;2 T* t5 Q# e) Q5 c$ W7 ]" V
                        end;( @; b: f, v( _) Q# J
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 J' E6 o6 Y2 L3 V* `+ A) \
                        part := @.transpOrder;/ S0 i" `. R$ m4 P( z. d5 L, Q
                        part.move(@);-- load part
3 a6 W3 k8 I: E                        @.CurrIcon := "load";
- p& i2 ~( M, f9 i- X3 |) j                        GlobalDistObj := part.globDestination;2 @$ B3 Z1 ^; B  f1 k
                        assignLObj := rgmanager.rgAssignL;
# b: X. g" _$ d; ^3 G/ v& ~9 p                        row := assignLObj.getRowNo(GlobalDistObj);5 w6 s9 S, Z& a
                        if Row = -1 then -- since 70
3 t/ [- l3 @8 \7 w                                if lan=1 then
* N( l1 o3 e* L9 ^* F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 h: k* i$ P! p- Q4 N* u* M
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) S8 A: {3 Y) @3 _5 J* `4 R: B                                else
* v$ v+ Q7 A  Q1 p' w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 }' D  V) K+ s/ ~* j                                                to_str("in docking station: \"",?.~.name,"\""));                               
, z0 }" d; g$ W& I7 \9 v) I                                end;
1 ?2 q' j4 E4 D5 z" F$ M                        else' [( [# W& f6 S2 E# Q2 j% h
                                @.Destination := assignLObj[1,row];2 p- w& @9 H7 a/ \
                        end;                       
3 z/ k' C0 `% C" g& y/ X                        newDirection(@);7 a) b5 n. F! d- B2 J/ i
                        @.HasOrder := true;
7 B) V: f- h8 S! a                end;
2 c. l8 V9 M4 a( |# R        end;# c$ B& R6 u$ s' v$ F
end;        -- of the method2 N, f/ h& E: w# I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 L$ ?& X* x# z$ n0 }; P' ~: H+ s1 g$ R/ B7 Y
这是AGV_putin中arrive的method。( ]& d% n( D% t7 i& u, I. F: L- K9 T
" h& s1 W0 u& u! ~
当到达物料速度越高时,这个报警更多,5 p2 N) ?: T. F& E& T! ?
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ C- t3 p8 S  N; s7 L8 W程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; u3 ?6 T1 R/ F/ n1 n: S6 [( v
) o" B. N* Z0 R8 A+ \/ V2 `另外一个小建议,就是move,所有的move都可以这样6 o: S5 _8 p' ^
if not move() then debug end* L; d# o. Y+ E! ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! a. G+ y$ k7 u8 s+ j
plant simulation中的free libraries有AGV模板,  v2 s! q+ R2 e8 Z
里面也有案例。* r+ G8 e4 [+ y' h# \. E
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 [6 x) C, Y# H# I# Y2 v$ ]: `
0 {0 I) S; ?3 H. G8 U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" E/ W; _- k( ~8 }( o9 F7 Y# f
; Y: q# _9 K: z$ c0 G. c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  J/ G6 v  ]0 v1 Q# J1 G5 @这是AGV_putin中arrive的method。! Y3 d3 O7 U2 H" @5 m! O
, A& f. j2 c2 [8 F; d  s
当到达物料速度越高时,这个报警更多,

; ~) u. [1 g( |8 f+ `% w% W* o7 r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 03:58 , Processed in 0.021607 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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