设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10136|回复: 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'
- _. l, l  R9 G, u  c. z( b*/0 V+ A) [, ~& F: T2 y+ X
is1 q0 G  q& f: X5 _* w4 N) q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 M2 u2 q9 W( ]$ Q4 g+ l% fdo
, j% O) ^. e# {" }        Lan := rootfolder.Internal.Tools.AOLlanguage;5 j1 H8 |7 U4 q' k6 z& \
        if current = @.Destination -- else return
: L* Z& F! U% C3 a" T2 h        then
: l& q* p" ]. M6 t- b- W& X                @.Destination := void;6 l  V: X1 n$ \
                if @.occupied then
. G# E/ W2 m+ Y7 C' l/ I                        part := @.cont;  R7 N0 Y: v0 r4 S) V2 f& b
                        @.transpOrder := void;  F3 j. R) n1 }+ ^& |6 S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; p% S& G, P1 U7 U5 a# B& t4 w$ }
                                @,root.eventcontroller.simTime);
! [9 b- x+ X; n* V  _$ P4 |                        @.HasOrder := false;
( m6 f8 w1 P) |" ^9 l! ^                        @.DrivingHome := true;, Q8 k% I, a6 N% m2 ^& O* f+ U
                        rgManager.tryToStartTransOrder;
8 F* \3 d0 c4 W) G+ m- k2 p8 N                        if @.Destination = void
" i9 g4 R5 t4 C* G  E' n                        then -- no transport order for vehicle @: E# F9 B# P4 c% m1 x: f
                                @.Destination :=
( G. q3 k2 F; s6 N9 K) ^                                rgManager.nearestFreeStation(@,track.~);
; B. l+ p, S* _/ ~; O# [                                newDirection(@);   7 U! Y) V/ A( [2 N( Q" t) `% }# ]
                                if @.Destination /= void then# ?5 b3 u- c/ Y4 g) O6 V: _" C
                                        @.Destination.NumReservation :=
- o" k9 ]" P+ `                                        @.Destination.NumReservation + 1;3 \5 p) r/ ?. j! W
                                end;
* _/ X1 c% f. v1 w4 K! v                                @.CurrIcon := "drivingHome";! u9 X8 m) A9 K+ |0 L; j& `
                                @.DrivingHome := true;
7 e3 {( {+ p4 n& s                        end;4 Z& b* F4 O9 Y% Y) Q/ f
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 U/ g# v& b, N! G1 z4 ~% }* q+ o
                        part := @.transpOrder;
$ Q1 q) ^# G) e/ ^! d! j4 A                        part.move(@);-- load part3 G8 n) V, n1 |( P" s: J
                        @.CurrIcon := "load";3 W+ `# Y" @8 q0 d: e
                        GlobalDistObj := part.globDestination;7 n* {4 I5 [) Y! D( R9 k+ Q
                        assignLObj := rgmanager.rgAssignL;: j1 Q% X- H# \$ o6 t
                        row := assignLObj.getRowNo(GlobalDistObj);
; G" I$ [" M$ m( Z5 q  N' i                        if Row = -1 then -- since 70
- S- k  w, E9 _6 S% P6 H2 T- Y) ^# v                                if lan=1 then
# u" R2 c/ |0 y+ J" L! p( i                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( M' n+ W4 i1 W- o4 _
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 Z) f$ _' P- Y9 @+ W" [
                                else2 d" `/ N5 a7 e  ^, N/ m) q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, j' X: m# O" `  d- O                                                to_str("in docking station: \"",?.~.name,"\""));                                ( @/ W4 [- m7 Z- H8 q0 e
                                end;
% D) \/ w6 g2 l: \) M! R$ ?                        else: r' h! {; \# {
                                @.Destination := assignLObj[1,row];7 W8 a- y3 S- k3 |6 C5 S
                        end;                       
  c5 E. K  k4 R- k                        newDirection(@);
6 L" N7 N6 l' M! G! r. w- E                        @.HasOrder := true;
( @6 K, `7 s1 x0 j4 p; l' e                end;0 h, O$ K; [/ x* E  P
        end;
# e6 m9 z0 O/ ^9 Pend;        -- of the method) `3 m/ [$ ]' M% s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 N) U: A9 o5 d2 j

4 x! Z3 W; S8 ~  V! d这是AGV_putin中arrive的method。
  _# s2 }& a  {& c1 g8 C
6 H6 _& Q5 P5 m5 u3 t当到达物料速度越高时,这个报警更多,
+ L, u6 Z9 a6 k- `. F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' B2 b/ ?- }; ~  v* F* Y# v" e' B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 o% u& K- H8 A( b$ C
* [& x  H& d5 j0 |
另外一个小建议,就是move,所有的move都可以这样
/ n) }+ |3 v+ E3 S  rif not move() then debug end5 b- l$ a$ A0 R6 X8 d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ c9 `( Y; _+ y) splant simulation中的free libraries有AGV模板,
) f; f& W2 {# q/ y! ?6 S* i4 j里面也有案例。
$ d+ @6 S3 R$ o# j" Q+ J8 W4 b. H( r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 y8 i+ ]( S* k: i! U, Z

8 t6 k8 [* q" ]5 e7 J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% g2 E" Y, ~7 ^* h: j9 O4 |  {" i" J' Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 @6 n5 a* }* u3 |, w这是AGV_putin中arrive的method。3 h% b3 t+ c+ ~4 d3 W& a
' j9 c* F0 C6 x9 u/ d
当到达物料速度越高时,这个报警更多,
  M( Z; K4 z) t8 i  s( H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-15 08:45 , Processed in 0.018825 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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