设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8909|回复: 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'; q* z' l- ?$ k# j1 S" H# _% m
*/( Z# ^" T+ j, B3 T4 F3 ~
is
" p! }0 W$ L& y8 m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: u5 i: Q. ]8 ?8 }$ [  h: S- j/ A. G9 c( [do
3 V  P* t, d& t8 I3 P) m8 b        Lan := rootfolder.Internal.Tools.AOLlanguage;0 p" Y4 }0 N; A  o2 O8 L
        if current = @.Destination -- else return
) O) M1 Q  T5 L9 n6 y% p        then: }* s. U( p5 T& v4 Y8 `1 G
                @.Destination := void;& f1 [, b- b+ j
                if @.occupied then
7 ~) K( L/ G; i8 `                        part := @.cont;1 C  F! T- o1 K2 s8 A5 w" m
                        @.transpOrder := void;
$ t/ c( B  G, p5 {8 e7 m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ]9 U% l; l$ @" E% c
                                @,root.eventcontroller.simTime);- u/ L" {( z5 \/ b, I: m( D1 z. l6 _
                        @.HasOrder := false;& \; d, ^/ m; @& D7 V5 j& }9 z. g
                        @.DrivingHome := true;2 s3 p- i- R# x# f/ Q# Y- J
                        rgManager.tryToStartTransOrder;
5 X$ X4 D% p5 _- ]) F                        if @.Destination = void$ H, w: g- |* [
                        then -- no transport order for vehicle @" X( k$ y! L. E7 u9 t
                                @.Destination :=; w0 S5 A! C; C$ T+ z
                                rgManager.nearestFreeStation(@,track.~);
( P% j; c2 C% _4 l1 f/ v( P( e4 l% p/ c                                newDirection(@);   
9 _* Z, B/ P; E                                if @.Destination /= void then& @4 E1 g# v8 t% Y) h. d* [
                                        @.Destination.NumReservation :=  i7 p1 f# k8 P* B& L
                                        @.Destination.NumReservation + 1;, |0 [) u! @% h. V. X
                                end;7 W* \1 _5 `* j1 [$ _6 J' H4 J
                                @.CurrIcon := "drivingHome";
- l' A4 p. z  H' Z                                @.DrivingHome := true;
/ S% @3 u+ o! X9 F6 ?( n                        end;
$ `$ t$ s. ~" B1 `# [* y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; \% ^. p' j; `6 `3 N0 Y0 _                        part := @.transpOrder;3 o  C* O) ^, d0 C5 b7 \
                        part.move(@);-- load part
5 A- B2 s. y- r* Q                        @.CurrIcon := "load";, T* t" P5 x6 B& f. Y
                        GlobalDistObj := part.globDestination;
- P+ L$ `1 u! v5 ~                        assignLObj := rgmanager.rgAssignL;$ q9 `8 Q% U: Z" s( q+ |. C
                        row := assignLObj.getRowNo(GlobalDistObj);
+ U& d' w7 r( r  @+ y                        if Row = -1 then -- since 70, a4 T$ M" ?3 E/ s: j+ H9 p
                                if lan=1 then' W9 }& s2 v+ K( E# b) b' D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 {" V$ z- E# D$ H* J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 L- I$ w- ^2 v3 j- U' ~4 X. u
                                else4 q9 m( C% ^. B8 E% D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 V9 ?& r+ U1 c9 ~' ^
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% @7 D. \, S: d9 N                                end;0 G2 C/ @4 B1 x. T
                        else4 C0 w" `4 H( f
                                @.Destination := assignLObj[1,row];7 r8 T  n7 d. [+ k
                        end;                        0 h  m/ {( T! X. `3 G; C8 U" `" t
                        newDirection(@);
  j3 s4 X6 a, ?                        @.HasOrder := true;9 @9 k+ D9 m, i- X
                end;7 S8 R0 q8 B( r$ H0 w  `
        end;( I  ]' {$ ]( N: i* e" F
end;        -- of the method4 q( L# V7 {  W, t" u$ Z! t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & T7 ?2 L  A1 {2 }  T

& V5 k. B9 a; ]7 j/ O1 M$ V0 s$ o这是AGV_putin中arrive的method。9 X6 l6 k- J5 Z* |) N
1 q  O) K) v- B! u; x
当到达物料速度越高时,这个报警更多,' y" x: x  `- `: Y+ v1 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 D, R' [, d% X; f* C' L0 M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 C# _7 h! L! U) I. [7 w
9 J1 ~. C: @2 n& N& F" w  o9 m/ m另外一个小建议,就是move,所有的move都可以这样3 ^9 h' K+ s0 i4 f# u+ O0 q; r
if not move() then debug end- D( w, r) j6 q9 G9 Z+ ~% c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# O# N4 y+ S# {& I% ~
plant simulation中的free libraries有AGV模板,9 g% a* l9 `8 A3 ?0 e$ K
里面也有案例。$ M# B( B! o; I( V- i" f- G/ w6 [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 R! o! B" Z% R" J3 `
. |- ^0 r, x; @* c$ H8 [; |* Y4 I. _, K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . ^- B, ]# W' Z
* @1 N) i, o( x% Z# ]( n: [# W7 R0 @" [
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) |0 I" C+ J# b7 L! M  I
这是AGV_putin中arrive的method。4 a  Z+ N# |  R, {( O

8 r. c7 s! P6 t2 t当到达物料速度越高时,这个报警更多,
4 M' d5 X1 z( ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-3 18:40 , Processed in 0.015219 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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