设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9617|回复: 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'% Q2 _& G9 |6 |' ~. M: X& J
*/
# c# D% A  e5 B% @5 w8 Ris
: i7 a  @7 v/ U        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ \% V% p# O6 T5 t+ I% _9 w
do
: X3 j+ a8 q: B        Lan := rootfolder.Internal.Tools.AOLlanguage;
" r1 @( \% d& U        if current = @.Destination -- else return
4 L! M7 P0 S6 P7 q0 m- d9 ?        then
0 V, B  A3 N0 ?* g% ]                @.Destination := void;& n' h9 v0 F) h2 e/ R
                if @.occupied then
6 }& c* u/ n& h- a; R9 j& U2 R                        part := @.cont;. ~  S! l' x; a0 ~) P$ P' l& C
                        @.transpOrder := void;/ N0 D, y6 m7 F; r7 M0 {* n& F* R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& M0 E. K$ P$ ]) g                                @,root.eventcontroller.simTime);2 n" \( o- u/ U# U
                        @.HasOrder := false;6 }& L! P3 Z: t% V8 f; i9 r5 e5 J/ L; x1 V
                        @.DrivingHome := true;8 d# K: w: r( Q: T, l# V* m
                        rgManager.tryToStartTransOrder;  _) W" @4 \, y$ S  ~
                        if @.Destination = void+ i+ x& K7 p; u+ n  ~
                        then -- no transport order for vehicle @
' q7 S; ~1 W4 F7 l$ F; c& j: h                                @.Destination :=
3 h2 v7 u  }! ~" p! o) w. B                                rgManager.nearestFreeStation(@,track.~);
4 m) ~- a! d7 }' U% O0 K- @                                newDirection(@);   , n; E8 v8 g6 w! D% E8 G) m8 N; {7 n
                                if @.Destination /= void then+ f6 v+ n3 Y% M# V, O" U
                                        @.Destination.NumReservation :=
, o1 O) S* J0 g" I3 Z                                        @.Destination.NumReservation + 1;
/ U* {, M' B0 I- S9 j& F                                end;, b" [& B6 T1 b* u! q$ B
                                @.CurrIcon := "drivingHome";
6 }& m# P& i& k                                @.DrivingHome := true;
4 ]6 T, Q4 u$ A: V5 c3 m" b$ z5 j                        end;
* h! s+ P; i! |' [( C0 x$ s5 k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% c6 d6 E6 t) D$ s# U5 k
                        part := @.transpOrder;" q/ e' C9 O3 S( {! \% r" Q8 b3 B: B
                        part.move(@);-- load part
/ X6 u( F3 m* l: u/ y' s                        @.CurrIcon := "load";7 w/ v+ c* V7 e( ?
                        GlobalDistObj := part.globDestination;
* n8 J1 E, a# z9 a                        assignLObj := rgmanager.rgAssignL;5 c  Q* n' R; O! Y
                        row := assignLObj.getRowNo(GlobalDistObj);; O7 j; {% L$ I3 F& S
                        if Row = -1 then -- since 70
# Q' r( t/ b9 F* {  d                                if lan=1 then: b1 S/ S9 l3 A+ ^( L- n2 q' N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 `4 s7 G) W/ u" W& z                                                to_str("in der Andockstation: \"",?.~.name,"\""));& w2 [. {; O6 |( ?; d, [8 W! E. y
                                else
* G; ^0 M1 H- g. D  ~! R( |# c/ a0 c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 \& @1 g# _/ h                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 V, ?1 b. F& V- n& x. f                                end;
9 z3 V1 I$ r1 ^                        else  V7 W* Q4 W  j
                                @.Destination := assignLObj[1,row];5 D7 P1 ]5 Z5 W4 k9 D& c$ J
                        end;                       
. M- v* d2 b4 o7 I; ?                        newDirection(@);& ~: B+ s6 s$ Q. q4 H0 T  U+ G
                        @.HasOrder := true;+ k' D: M7 z' q. k5 T: E
                end;1 q6 M! c4 M0 i
        end;
# b5 u+ s, @5 k% E' @3 M- ^end;        -- of the method+ W# f' ^' w, N2 r  t% k( j, G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; q- H) N/ }7 L* x4 s% A& ~; ?& Y

( [4 S4 B3 k$ @7 @这是AGV_putin中arrive的method。
! X5 Q8 ]" G1 \/ M4 ^3 t' J* d/ W
当到达物料速度越高时,这个报警更多,. h$ E" ^1 |5 r- b( C& c; O
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( E  |. D& C: p; `  K. X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% H. f/ r( X& j! h2 Y; e) \9 _( D& _* C" c4 k+ @
另外一个小建议,就是move,所有的move都可以这样2 _3 @) b: l( Y8 b- v) Y, h
if not move() then debug end8 w% G. ]6 p, j% T7 j, S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% A6 @. {% `* N( k; yplant simulation中的free libraries有AGV模板,
* ^4 y* B1 v4 r里面也有案例。# F' C1 K1 o4 V& b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 ~0 F& `5 x; t7 T* ]$ E  ]
' l8 n. H9 g4 G' q' r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) |- n- T7 D# l6 H
4 t$ W% p- P4 B5 @% y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 E& E! P9 K6 c* ~1 r; s( M( _
这是AGV_putin中arrive的method。) F  ]% o; I9 {; s
" S6 b: H1 F% m1 H% D$ @
当到达物料速度越高时,这个报警更多,

: }! O& e8 w) K" Q- H1 W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-12 01:49 , Processed in 0.025628 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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