设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7427|回复: 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'9 g( D4 }; K5 _2 y, I
*/
% h* A; a! n: `1 S( his
% w" _/ {* {7 f0 x& }1 l) T        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, n8 V/ O1 l9 _+ A- _" i
do, P$ O4 m' z9 C4 S& e* m
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 d2 ~& @% S) G# z# j" l  F) I
        if current = @.Destination -- else return5 {  ^8 m  U$ ~! A8 v
        then
8 ]$ Q: n1 w+ o% M4 m8 Q4 r! _; ~+ r                @.Destination := void;) x* ?$ j0 L3 V' ]
                if @.occupied then" _+ M* z$ i4 Z2 d+ u; |6 Q2 q
                        part := @.cont;
0 V& [+ b" z- M& k' h+ f5 S; v0 S                        @.transpOrder := void;
5 j/ H5 N6 [5 v6 u9 ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ x/ y9 x! n1 O# P4 q0 a! Q  i
                                @,root.eventcontroller.simTime);9 }, A+ W' S/ v$ [! e! N% I1 r
                        @.HasOrder := false;2 g: x. C4 z" c4 X; c8 j  i6 T
                        @.DrivingHome := true;
, L! C, X' s. y                        rgManager.tryToStartTransOrder;
) P/ [' o4 r2 I: ~                        if @.Destination = void& f9 ?  m; h' v- n( g2 x
                        then -- no transport order for vehicle @5 X: Y  b. m( K- v; K5 J8 ?% c
                                @.Destination :=& o5 l0 O$ C: _+ G  ?8 g/ z
                                rgManager.nearestFreeStation(@,track.~);; n) E! k7 z  ~0 ?
                                newDirection(@);   6 @* W6 V0 U! d2 z6 c
                                if @.Destination /= void then# _: _/ @) F' R. T0 W
                                        @.Destination.NumReservation :=; b: _9 i0 d- k+ o4 ?) _
                                        @.Destination.NumReservation + 1;
) `2 A& f  R2 [4 U7 _                                end;# |% t  I0 S7 _
                                @.CurrIcon := "drivingHome";
1 N* A/ C. h- |- \! q1 b4 l                                @.DrivingHome := true;
! ^  Z8 x5 a4 V/ i& i                        end;  r% i, X9 J/ o( w
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ F; S7 e4 I2 Z; T$ w3 A9 h  _3 I' J2 K                        part := @.transpOrder;, t, {7 d9 Y) p! t
                        part.move(@);-- load part
; f/ ]9 [3 M0 j: a5 J                        @.CurrIcon := "load";
0 M0 h7 I. M& Z8 y5 R% n" S                        GlobalDistObj := part.globDestination;5 D9 E6 j/ r0 @. r, r0 e
                        assignLObj := rgmanager.rgAssignL;; a) c2 {8 O6 i3 W
                        row := assignLObj.getRowNo(GlobalDistObj);5 j1 Z  T! a# Y8 D! @" m! S
                        if Row = -1 then -- since 70
6 x9 c2 ~9 U' F. f4 i                                if lan=1 then% H. E' x2 B" P4 V* r& H% P
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( o- b7 H: Q6 h" h9 _! x3 H                                                to_str("in der Andockstation: \"",?.~.name,"\""));; @: s  ~% y8 }: V( u  e& I
                                else3 c: V# E2 \9 d7 H1 x4 D; k7 G$ N
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% c9 G( v# M2 l3 k9 x7 `; ]
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. ^1 R; X/ l$ m  s+ L1 [                                end;
7 y% ^8 `5 [- N; H% E( p                        else) z' d; J5 g1 K9 w7 a5 @' b
                                @.Destination := assignLObj[1,row];1 R- X% G' A% m
                        end;                        & a: H) Y1 b: [6 z; b) x
                        newDirection(@);/ N) |2 I, i5 F2 t, Z
                        @.HasOrder := true;
- u! c8 b8 @; p9 u                end;
2 a  j. b5 z$ T# n. f; t* p        end;
& h3 a9 V4 j5 t# C9 J3 R7 p$ Zend;        -- of the method, s! E5 p2 F3 \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! A' G" h- R# v! H) m- s9 n' W' Z: p0 w
这是AGV_putin中arrive的method。
3 l  z* C; H" V; a* s1 ?5 \) V$ h$ U: }8 x. Z8 }; l( V
当到达物料速度越高时,这个报警更多,' D' B. m) g* ~2 l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 z2 F9 H1 \, R2 i$ k. u. i8 x
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 @# M2 k: z3 O: S; B, g8 q" |# T8 S) `
4 M! V6 o# y$ u2 e另外一个小建议,就是move,所有的move都可以这样% F$ h+ C  H% O1 I$ \: M! D
if not move() then debug end: I0 t6 f) Q  S. Y1 G9 m9 x+ g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 C. J1 V6 a# ~) L. Z$ }! hplant simulation中的free libraries有AGV模板,
. y7 M3 h3 r: \' l. z里面也有案例。, y8 P- C$ e7 {( n" P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( s" N4 ^, S* I
" i' r3 a7 f9 v( F0 X% {& A0 Q6 ~& c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 p8 L; ^0 A; e. C

; U/ B# \$ r" }  [2 a' E那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 }8 m/ O+ d5 @9 ~3 i这是AGV_putin中arrive的method。
6 m1 F4 |3 y0 c3 ^" f  Z
9 ~! d7 b, a% C& ^当到达物料速度越高时,这个报警更多,

: h. F/ U& E) D; }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-10 21:39 , Processed in 0.024871 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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