设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9969|回复: 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'& D5 T) a7 ]- ~
*/
- _. ~( g6 ^2 {( Nis
; R8 R: ?# r; r! \        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, i4 a2 x+ m8 W& V5 ^+ U
do
4 Y) f' F' W5 C' M- ?2 R% B        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ P% A: h5 L' ?0 k% _8 F: F        if current = @.Destination -- else return9 E2 X& Q+ }+ w- x* @& s# h" A
        then
0 w6 d3 A+ S, f+ d. E; H  n# Y7 ~                @.Destination := void;
, g3 l/ x2 l' E2 B; S0 O1 S                if @.occupied then
5 D9 C, J9 W; ^5 W                        part := @.cont;
2 W0 n* s% \& k                        @.transpOrder := void;5 t7 k5 d6 w0 L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( z  f1 v+ ~6 ]  E) ~2 e- s; P1 \% T                                @,root.eventcontroller.simTime);
+ i, x! Q# \4 A6 \$ U% I% E                        @.HasOrder := false;
  `) j: A8 c# N$ Z& u  y                        @.DrivingHome := true;+ Y: _1 k/ m$ L( \0 L
                        rgManager.tryToStartTransOrder;
3 A9 _5 u3 N3 ]$ n                        if @.Destination = void& D0 R9 A7 D. S9 `$ }7 S
                        then -- no transport order for vehicle @
6 G: Q$ I# v; h                                @.Destination :=
5 j' A5 g5 G" [* Z9 b4 ~                                rgManager.nearestFreeStation(@,track.~);; b% T2 w  T5 v. P
                                newDirection(@);   
( x8 M; z4 R0 s% ~                                if @.Destination /= void then7 B8 d- U) |% H1 Y0 V) m" t
                                        @.Destination.NumReservation :=
& |; f/ V$ P* Q. R. S                                        @.Destination.NumReservation + 1;5 X& B% F$ G+ H( M7 q/ h9 \
                                end;0 h" f1 m, J1 C: ]/ z
                                @.CurrIcon := "drivingHome";2 A  k' _  D& |1 I* d+ i* [
                                @.DrivingHome := true;
& q6 i3 \0 j- c                        end;
* Y, f0 z4 j0 |# h; W9 c                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* a3 e6 b& H7 ^+ V5 p
                        part := @.transpOrder;7 T6 u+ I' o, ~1 \4 g% [8 M, O' a
                        part.move(@);-- load part
  ?; M% r& z4 c9 N9 j$ F% M/ r8 \. P3 H                        @.CurrIcon := "load";5 X/ b2 h/ S' f' V, j* _0 ~9 F( D
                        GlobalDistObj := part.globDestination;
+ A3 r3 G  d, [! [: i  }                        assignLObj := rgmanager.rgAssignL;+ N2 C7 F, [$ m, \& z# F
                        row := assignLObj.getRowNo(GlobalDistObj);; \# a( ?* B- c5 g
                        if Row = -1 then -- since 70  c' }7 u1 b* ^4 M# V
                                if lan=1 then7 ]% r: e- m9 f- W' T$ w! G
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& v# a7 i# F# o& K( I" z* M                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! x% @) G% n5 Q: |! a% I                                else
, Y3 X4 R  ^% `; V( {, v* R                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 B+ |8 ~+ j. ?3 F0 I! M8 y                                                to_str("in docking station: \"",?.~.name,"\""));                               
. U1 `4 E9 c: n3 {" M& K+ H2 a                                end;
* A# m! t4 @6 I                        else; Z1 N) I8 i2 R# }0 {! P9 K
                                @.Destination := assignLObj[1,row];
4 y8 W, j: `/ D- X/ _5 G; P) _                        end;                       
3 x7 V3 ^' C+ l: _; p* B- F) r                        newDirection(@);
) k) i3 G, N3 U3 Q; T5 n+ G                        @.HasOrder := true;( E# n" U/ V! y$ G2 Y1 ?! p
                end;6 S( x! A% D9 Y7 q6 n4 ?
        end;
# A3 q+ [& W( x+ G$ H* O& `% cend;        -- of the method4 E+ r2 `" X7 w+ |  M; ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 w4 v, I# R% l) k! ]
  [" ]/ n; u( q& n3 r5 l8 {这是AGV_putin中arrive的method。" u: e( p4 K; w/ G6 T0 G
! {1 d3 L  h% d; I4 p
当到达物料速度越高时,这个报警更多,6 t! S9 g* z( M9 V/ z0 R- U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 w# W0 V9 D% q$ o
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- b6 P7 L. }6 Q/ G
% ^: e  x% V' I  T
另外一个小建议,就是move,所有的move都可以这样
& p' @  ^5 A% h" xif not move() then debug end1 G( P0 b% T8 q8 ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- E: L# V0 H  dplant simulation中的free libraries有AGV模板,# N) f( T3 h& S" @
里面也有案例。% O3 i1 [' c2 J$ U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- _$ ^! R9 _& z0 W, i- q
0 ^5 h9 a* L  T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( Y, N6 Y6 O. R; A0 f/ q; g" @+ n3 F/ x- w; p3 Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( q: |/ ^" A! Q2 j
这是AGV_putin中arrive的method。
- |" j, j- b( b9 Z6 u1 Q; s4 G; K3 E8 Q0 f0 f/ _
当到达物料速度越高时,这个报警更多,
" \# K4 l3 y1 Y& W9 \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-5 03:13 , Processed in 2.579703 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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