设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9291|回复: 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'
, J- B( g: e' u, Q6 K7 S% v7 c0 K*/
* `0 M+ `  E. J/ His4 @) K5 L" y1 \; [; T' \0 ^; Z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" ^; X& i2 V8 ^7 V! c' _# p
do- w9 B. I. f7 E9 V
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. h: P. P0 q. R( f9 E        if current = @.Destination -- else return* h. j: |0 n. g3 V2 U
        then; Y$ h/ c% z/ l8 {4 Y
                @.Destination := void;
! e8 k" }$ o: x3 o4 L& u                if @.occupied then0 _; |5 }9 I, ?, `
                        part := @.cont;* v& K8 Y% q) s- P. J2 q
                        @.transpOrder := void;
  R  W% k0 s# \3 n: K# f1 C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. J/ C/ a" J: {" l; W                                @,root.eventcontroller.simTime);
! K6 y4 C& c4 `3 ^                        @.HasOrder := false;4 V8 p8 ?' N, N: C. J6 X
                        @.DrivingHome := true;
1 D$ l- M+ n7 M! c3 {+ `6 q                        rgManager.tryToStartTransOrder;- M; X8 U* ~' O  g- |
                        if @.Destination = void
0 W# Q$ V, j9 [  [* s3 V; v                        then -- no transport order for vehicle @8 |* [/ E2 g& r* g
                                @.Destination :=
: v- i# z( X  K% q. E8 R+ `                                rgManager.nearestFreeStation(@,track.~);
1 a, n: A/ F/ v                                newDirection(@);   
) C" `- A0 M3 |. ?/ n% ~1 m" D& n                                if @.Destination /= void then$ T% V8 p6 }5 ]# u& E0 J
                                        @.Destination.NumReservation :=
# W" c7 K# E5 \2 v* q                                        @.Destination.NumReservation + 1;
, p: Q$ I7 |; [' Z4 s, r2 t                                end;4 D3 U/ `7 ^- {5 s/ ^/ M9 ~" }% r) }
                                @.CurrIcon := "drivingHome";. E9 H5 D" Z7 `: [! Z
                                @.DrivingHome := true;
& j0 y/ z( A& u9 w                        end;
% y& [% o( M; q" g  X                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 m0 e+ n* X* {9 F+ p( Y& G
                        part := @.transpOrder;
; P# h* j' R5 q9 ^/ d* A                        part.move(@);-- load part
! @  m0 C3 g) _                        @.CurrIcon := "load";
% J! S/ R& ?# X6 C                        GlobalDistObj := part.globDestination;4 ~0 c! {; T, r" @4 E  D0 c8 x
                        assignLObj := rgmanager.rgAssignL;
2 U6 b) l$ t% t( n2 `6 p                        row := assignLObj.getRowNo(GlobalDistObj);
3 [! H2 B( }2 x                        if Row = -1 then -- since 70
8 a, R/ y( T8 t- n4 V* Y$ p                                if lan=1 then5 P& ]  }7 ~1 {* ]; R
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* [- s& @+ B/ A& Y6 q/ O! t: c/ B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ }0 ^; V5 U+ _                                else- E/ t8 v% o. _9 L
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ u$ C7 X2 n1 U, b! w+ W6 N
                                                to_str("in docking station: \"",?.~.name,"\""));                                8 E- f. q: k# ?" [7 L% E' f" F
                                end;5 {' @& p8 M# q* N
                        else  Q  O* P& t2 i
                                @.Destination := assignLObj[1,row];9 _8 e6 g3 `3 ^; |3 m* Z
                        end;                        ! ~' u8 @$ f7 d
                        newDirection(@);
* T; ^8 X7 L9 J1 j                        @.HasOrder := true;$ a. b; m8 h. W* E
                end;
1 h8 G+ `# V0 V/ ]0 R: y        end;
  o( `$ h* s6 }# l1 Xend;        -- of the method
+ [% H6 o5 Q( `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ g7 G7 o; Q3 ?7 [3 U( \; {$ v) u, X# P1 O
这是AGV_putin中arrive的method。
7 F$ k8 ^2 q- c* g
# P& a! K8 a7 ~当到达物料速度越高时,这个报警更多,
6 s3 p5 m0 l/ g$ ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# s; g6 ^1 T# S, E. t' x& |程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& i0 F, z7 d% S
4 s" l9 a% i+ Q9 f8 W另外一个小建议,就是move,所有的move都可以这样( k0 i* \8 w0 a9 g* R% [: E$ _3 C
if not move() then debug end; T! V1 k+ v( P. `( |3 A2 m( i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* L% O4 }1 Z' aplant simulation中的free libraries有AGV模板,
% ]# q' A* V  p8 O# y' ~6 r0 c- a里面也有案例。: ]& |# T& W/ t: |( c4 Z9 a+ h% R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! ~; {$ N' W( _7 V. o

" G  W( }; ]. J4 u/ M9 R" j$ P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 l+ U* a3 R  Y

. h9 A0 q+ A/ I* P) k7 D那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 d! G( f0 y* s& n
这是AGV_putin中arrive的method。% M  e' `0 ^# z3 s* f% J

2 M- A' n# t# ^% d5 V, d% e  s% b; ]当到达物料速度越高时,这个报警更多,

5 p! W" Q$ s/ L3 P) h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-23 03:58 , Processed in 0.020732 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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