设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7759|回复: 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'! z) v, s7 q4 u4 f
*/
, l* `7 w/ E* r! fis
* m8 |5 U3 }% f! d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! x/ C4 @, S8 _" T9 |
do
6 C, ]# F; P3 \  U' F        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 N# y% _  E" V3 N+ `) T  o- ?        if current = @.Destination -- else return& W0 r( h/ [6 b! T1 T
        then4 N9 j. [0 O& e/ G" g3 N, f
                @.Destination := void;$ W5 U3 \4 ^0 s& }
                if @.occupied then" |9 f  v5 w  Y, B7 ]! q% ^, D
                        part := @.cont;
1 |0 i; x) l4 F; a                        @.transpOrder := void;
# C, Y! Y* J7 o2 K! K) j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- b+ V* K0 M" s9 D- I4 L( g* S# g                                @,root.eventcontroller.simTime);0 m8 T8 E2 g# ?7 h
                        @.HasOrder := false;. S; j; @8 W9 y+ q
                        @.DrivingHome := true;# ]& o6 O! P* B6 x1 u- ]
                        rgManager.tryToStartTransOrder;  ~& H1 c6 \4 C8 ]- d/ S" b
                        if @.Destination = void! m' x( `& @( b, Y8 @
                        then -- no transport order for vehicle @
, G( I  Y# b* f7 n, K/ q                                @.Destination :=
. p. f9 A1 ~! T! T2 @& d                                rgManager.nearestFreeStation(@,track.~);, D! a- ]: j+ W
                                newDirection(@);   ) z8 y. S1 W0 `/ u
                                if @.Destination /= void then  E" ]4 d) S' y/ ]7 Q$ Y% _
                                        @.Destination.NumReservation :=1 H: g  i9 _. }# X
                                        @.Destination.NumReservation + 1;, e$ l2 e$ ^* X  J  q; {9 Q
                                end;
1 M% h  w8 F2 G                                @.CurrIcon := "drivingHome";
( }# ~0 b! u- b5 R$ Z9 d                                @.DrivingHome := true;9 b8 m0 |/ Q' `
                        end;% p, ?8 I& M( i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 n. D* S" A. m3 x; S$ u% J                        part := @.transpOrder;, |( }9 Z, y+ T  _2 h
                        part.move(@);-- load part
- ]+ ~7 r/ W/ j* C                        @.CurrIcon := "load";
  l  P7 F8 N1 `. v2 t$ l4 y                        GlobalDistObj := part.globDestination;
! Y  ~9 y! c1 L4 u% b$ G                        assignLObj := rgmanager.rgAssignL;
1 ^. [* I$ F% q8 Y                        row := assignLObj.getRowNo(GlobalDistObj);! z- P! G  f: ^/ K6 X' I2 p2 V
                        if Row = -1 then -- since 70) d* ?1 Q; H  N, U7 y1 m
                                if lan=1 then
3 N9 z+ Z4 q3 a! @" M+ l' B                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 m; Y2 X! W8 X4 T; m: D7 _                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 K1 k" t: b& |: r$ D: W                                else% D+ V: i6 w, R
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* c2 H! o* K# ~$ b3 n
                                                to_str("in docking station: \"",?.~.name,"\""));                                / c* @" e. [$ N. A# R' [9 J9 F, \
                                end;
4 T; A' I+ _0 D: k  d! L                        else
0 S( Y4 l: G$ q5 c                                @.Destination := assignLObj[1,row];
8 o8 a! v. o, p0 ^0 i& u                        end;                       
6 }" f) |) g6 r$ z8 K4 u                        newDirection(@);
, M! f. \9 x& g* _- k+ s. K$ R                        @.HasOrder := true;: n2 j1 Q; G& y& m
                end;7 p+ z$ W! M  R- R( x, K5 X
        end;
- {" z+ V# B; _( b0 _, d. Aend;        -- of the method
  P, ?/ P9 S* I& D" T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' E. t" a% e' W5 ]1 ?( D
! w3 v( c1 t; D3 g+ e这是AGV_putin中arrive的method。
5 E) k3 a3 z5 \6 {8 M' P3 `5 D3 ?; X
5 K; M& L) R( {( d& K3 h1 X" z当到达物料速度越高时,这个报警更多,
3 I# w1 W" @  R# V3 y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: i! f1 \8 X0 R! g程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  C2 l  w4 H$ K) t0 u) |, T7 g! q) w0 V+ f" `' q# a
另外一个小建议,就是move,所有的move都可以这样
. J) u( R5 x$ j2 N. G# ?if not move() then debug end
) |- L! V4 Z+ _( A! E9 g" B5 V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& e* Y3 B. J" H* f
plant simulation中的free libraries有AGV模板,( o6 G  J4 K) X8 f
里面也有案例。/ X2 V5 E& x0 `  h8 }1 ?& x' R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- Q" O* }* R2 \4 C& [1 A/ k
8 N* Z0 u2 X! B1 |' Y+ v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ }. J% d; T: I# U; T2 x! Y" ]; A

8 _/ h) E+ x0 D那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* x* r6 I* q0 c+ O! H" ~# M5 u这是AGV_putin中arrive的method。! [) ?' V6 i) u1 w7 o
0 }- J, r( p( ]2 r( q
当到达物料速度越高时,这个报警更多,
' g9 h7 @! g- K% r. z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-28 09:38 , Processed in 0.023495 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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