设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6707|回复: 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'% @: X5 H$ ?" ~: v4 {6 T# U6 J; U) K
*/
9 C/ v- Y; B+ j  [& T' q  q) Mis
8 K) f. S4 V  c( B0 M. F        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; V$ [1 O4 V8 A6 h: Hdo. Q% k- a& n; i9 H
        Lan := rootfolder.Internal.Tools.AOLlanguage;" G; s9 M& N5 b6 ^5 ]. G
        if current = @.Destination -- else return. S% @1 P- g) T$ P1 U3 P0 _. G
        then8 _2 L& b' e0 k1 N
                @.Destination := void;& ~5 ~% i5 X# q9 {8 H: `
                if @.occupied then
; f7 Z; c: P; S3 w! M6 X9 @. m                        part := @.cont;+ R3 O$ k  l6 F0 `" l
                        @.transpOrder := void;# @( \: U* I7 L- o9 a0 J9 P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. m+ d& f8 j( M8 I                                @,root.eventcontroller.simTime);2 L' p8 S  j  Y
                        @.HasOrder := false;
5 H- `5 D. e, R7 J( f* e8 v4 d                        @.DrivingHome := true;) Y7 \! ~% f4 E5 h
                        rgManager.tryToStartTransOrder;
+ b- I7 T" a6 D, C                        if @.Destination = void
* f7 P2 T  D1 H: x3 v                        then -- no transport order for vehicle @
! t* A" d$ Q( v4 p$ c9 B& v( m                                @.Destination :=1 B5 `  N2 X/ F0 g: H, d
                                rgManager.nearestFreeStation(@,track.~);5 y8 X* k* |2 S# d
                                newDirection(@);   
+ ^4 a; P0 S" [% ?                                if @.Destination /= void then, X0 u% C+ Q$ z; D
                                        @.Destination.NumReservation :=) X. J/ s' j; s0 P9 n
                                        @.Destination.NumReservation + 1;, u$ M2 g$ [. a5 C2 g
                                end;
% A) B& A0 L. K2 M6 H4 k0 b                                @.CurrIcon := "drivingHome";" R! R# n9 Q8 Y0 x
                                @.DrivingHome := true;- S) R& e: L3 u
                        end;0 Q; y' U8 @% Q: d
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) c% F+ j+ \5 k, p7 ~                        part := @.transpOrder;
6 H$ i( Y  K% `! P' d8 d- }                        part.move(@);-- load part6 J' }0 f" \; F6 ~9 {5 Y
                        @.CurrIcon := "load";
3 ?, A8 _. z0 ^7 C/ r8 ^                        GlobalDistObj := part.globDestination;
$ Q8 h% f2 A0 ?4 r% k7 \0 W$ T- r                        assignLObj := rgmanager.rgAssignL;& B4 u6 v/ b1 ~) I! |5 y
                        row := assignLObj.getRowNo(GlobalDistObj);
2 `7 }/ U, p6 b( `' H) B                        if Row = -1 then -- since 70
' v+ k( @' g: x4 X* o- W                                if lan=1 then4 W0 ?* P  }( w* A7 Z2 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 M# d% \4 c; G+ a/ S6 k& B0 g                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  B; H3 y$ U& a" y                                else/ W# |- y, d' z1 U- n; o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  x( P3 h4 V! |- k
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) m2 `0 o- X& ]; O6 }* b/ {. K! V
                                end;
  U! o7 o. E' {7 }" c; v7 B& T                        else
7 ^; u; B2 L. _                                @.Destination := assignLObj[1,row];8 `3 Z/ }9 b$ w+ ]
                        end;                        8 j+ m9 m+ F* j% g
                        newDirection(@);) n& e9 Q( b" b- ?- N' I& X. M1 v6 q
                        @.HasOrder := true;
  j5 y" m, ?- Z$ A) t9 T                end;/ j* b. ?5 u: A# ]. ]5 ~! t
        end;
  ^& k/ {. \1 l' M4 _end;        -- of the method
8 I( {+ q9 W4 H2 U4 v' W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& _& `0 W* n' ?: H1 T- @4 r5 N8 r" D6 h1 W! u% B: _
这是AGV_putin中arrive的method。1 L& Z9 i! V! N0 P5 p$ F
9 `" G" t5 `  Q, r
当到达物料速度越高时,这个报警更多,& g& N) w% ~$ ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" j6 |1 Y1 K8 |/ A: P/ v# _程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' \& K; {: t2 s9 x

* q6 m; F! H9 A6 G2 f1 W另外一个小建议,就是move,所有的move都可以这样
$ w( V, G7 f& U# [) L& G( u' Hif not move() then debug end
5 L' o& h3 ~- R3 S+ o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 B& s1 r  e. H- E7 ]9 P- f, N8 r. qplant simulation中的free libraries有AGV模板,
. v) [: c9 D9 Y2 C8 l  T, \里面也有案例。8 L+ M" Q. L" Y/ Y1 q5 o2 P+ ^7 s9 l+ W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( i# Q0 U" L" r0 P# n
, z0 Z/ s9 z, O, P4 b我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, |$ u, f+ {2 m. b3 w1 e5 u' Z' x! |+ Q3 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - `2 ^. F  Z) o5 A
这是AGV_putin中arrive的method。
3 v3 l2 N/ ]1 W" b! F7 X' `4 a
4 m1 R+ m* W7 F8 ]) t0 e当到达物料速度越高时,这个报警更多,
4 ?* P% P; n- e4 k
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-21 21:51 , Processed in 0.019060 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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