设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6399|回复: 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 g! ~5 W. V/ ~' K8 @% _
*/
- T2 I5 j  }& @is) D1 Y3 Y& A1 x7 |
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 b- E: _/ t: l+ z6 o
do
2 x! c  l1 q: r        Lan := rootfolder.Internal.Tools.AOLlanguage;- F" l* g/ ~! r/ _+ m  J, W, K
        if current = @.Destination -- else return3 U1 q) Q0 P  D" Y
        then
4 i: w. G9 W! k7 d- U: U                @.Destination := void;
8 R- j( W. S/ }' p& R8 [" T3 d; G                if @.occupied then9 n  l: F8 ]$ s, Z/ T+ h
                        part := @.cont;
* E) D* ?/ A+ y" f+ I                        @.transpOrder := void;
$ U# X; L! y% D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 I1 n: d4 s, f  h2 X. Y) w                                @,root.eventcontroller.simTime);
( Z+ G4 X- y9 F' i% z) s                        @.HasOrder := false;
5 a! Q3 k# F( i5 g( }; X+ @3 D, i& @; }/ Q                        @.DrivingHome := true;
+ Z* D$ Y, Z6 }( M# U% h                        rgManager.tryToStartTransOrder;  C- y1 ~* d4 l  R) K% V& D
                        if @.Destination = void
+ x4 q1 x0 Y' k                        then -- no transport order for vehicle @
7 a  Q, ~9 z* [& K  @% Q0 c                                @.Destination :=# Z3 M" R- `: ~+ j% ?3 P* g2 M& @
                                rgManager.nearestFreeStation(@,track.~);% u! H  Y; Q2 f( U
                                newDirection(@);   
( `4 X; R$ U/ w$ K- i( E: l2 Q, {                                if @.Destination /= void then3 ?, n: [4 g$ c- o! r) d, ~9 s
                                        @.Destination.NumReservation :=% Z7 s2 z: }/ ?' ?9 j0 v" r* b) b
                                        @.Destination.NumReservation + 1;
* w$ m2 |. U+ b+ `0 H- G( B/ i" P% B                                end;4 h; ?: y/ Q4 c  F) [0 z
                                @.CurrIcon := "drivingHome";
* T& U4 K- L8 c" s8 E* x/ T                                @.DrivingHome := true;" Z- M0 b. d+ A! x- G7 B
                        end;
9 v+ P- O( s' K# @( Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) L8 M7 u/ m; m+ ~                        part := @.transpOrder;
( o+ F  V6 A& }" x9 a  V' g" c0 R! v                        part.move(@);-- load part
& N  L2 {3 Q& K4 I+ U* j0 e, N8 A                        @.CurrIcon := "load";; i# t1 d9 `9 K8 C2 Z6 l
                        GlobalDistObj := part.globDestination;6 Z4 b! f8 b) H
                        assignLObj := rgmanager.rgAssignL;  E$ h+ A0 B! o- V: \
                        row := assignLObj.getRowNo(GlobalDistObj);$ \+ O- K' ~& x# |
                        if Row = -1 then -- since 70
( M: N+ l* Z8 r                                if lan=1 then
, q+ f3 A! d4 I                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% n3 @2 k# g- b+ Q8 ~7 V1 @
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 G1 L& B" ~: j                                else  |5 H' P3 L1 v' ~% q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; J8 y' H: V; p8 H* T" h                                                to_str("in docking station: \"",?.~.name,"\""));                                . `4 d6 _& ~0 f7 F# `0 h
                                end;
6 }! N1 G3 y* _6 ^: r) Z6 d                        else
* h8 j4 E, c8 M( q' c- g                                @.Destination := assignLObj[1,row];# v& B  [5 v& f* q, @4 z5 L
                        end;                        ) U* k- f% E7 h& ]" B; N
                        newDirection(@);) `  }1 `, h  w9 ?; T
                        @.HasOrder := true;0 g+ ]+ o& {( e4 Z% u( g6 |
                end;
7 P: O" p0 j2 P% S4 N, B        end;! t' @5 A: k  |5 a
end;        -- of the method
) P* c2 b9 Z/ }& }# u2 S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) ~- }! c. F1 s. z7 \% l
2 c7 ?% [5 p; P& A+ e6 w4 s: Q( `2 Y: O这是AGV_putin中arrive的method。" W' Y0 M' w. `

& t2 q4 y8 l1 D  ]; e1 @当到达物料速度越高时,这个报警更多,
4 G3 h# R7 |* J' \4 p& q' e' F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 ~- b3 `" M5 j- O3 n. z4 ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 K( m: A$ k1 A3 T2 r" {; X5 y# [8 I; [. f  Q( g- C
另外一个小建议,就是move,所有的move都可以这样2 o$ n8 D. \4 F( X
if not move() then debug end
: g* e7 O5 _$ \; S9 R7 I2 Y( l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 M1 W. _; b4 G6 r& cplant simulation中的free libraries有AGV模板,3 A/ J2 k: `" p4 j4 ^) Q( N+ N
里面也有案例。
* I' T( B% G: q3 t3 F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ a4 d* D$ t/ u- J2 _. {1 z% ?& C4 \) K! t$ @3 T2 U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % M3 H1 O; c9 \" g7 Q. H

  x  j# N3 a6 C- K1 l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 u! f9 c& ]3 @这是AGV_putin中arrive的method。3 Y% m; ]5 m3 Y& V. |* H8 L

0 I# l  E9 E: C! {3 H当到达物料速度越高时,这个报警更多,

! E+ G6 L* w0 Q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-4 12:55 , Processed in 0.019365 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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