设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9031|回复: 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 N9 s- _: k/ K
*/
( T2 \7 u# R6 [is
' z( O$ J- R. u7 `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) D' G$ r7 S0 H
do
; P1 u  D/ B6 T" h1 ]' q# _        Lan := rootfolder.Internal.Tools.AOLlanguage;" G7 q# |; b6 ]
        if current = @.Destination -- else return. r1 j; c; d/ H7 l8 S; ^( h1 Z
        then" i' o0 `0 n) \8 @( c+ Q
                @.Destination := void;2 }* o% s! x+ F% ~; Y
                if @.occupied then* M) Q5 ^( R, V; {2 \- k
                        part := @.cont;
; W) w* f4 z8 u( X2 D                        @.transpOrder := void;1 h  T2 U# e/ k+ E
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, e( L; X2 W( d3 X+ M
                                @,root.eventcontroller.simTime);4 y( m& W6 A) n9 v4 {+ D% Z" J
                        @.HasOrder := false;
$ T0 W( \1 A0 }( T: W/ G                        @.DrivingHome := true;
  R: e/ h+ U' P- F& e                        rgManager.tryToStartTransOrder;9 O( i4 [$ n6 C8 f6 p; ^
                        if @.Destination = void
) d  G- r0 P( m7 N6 c1 V% q) M' l& v8 j                        then -- no transport order for vehicle @
0 A* c/ ~2 P# J6 b) X* y                                @.Destination :=
* J- K  J& F7 C, \0 r+ ]0 h- ]+ C: D                                rgManager.nearestFreeStation(@,track.~);
* P- x" d* Z( ?  L5 i7 ?: @                                newDirection(@);   $ G- c1 M& H0 P4 M  x
                                if @.Destination /= void then
9 C5 O, ?0 S5 `; B/ x; {                                        @.Destination.NumReservation :=' x% R0 w- \* f: ]6 u% D
                                        @.Destination.NumReservation + 1;1 K9 H& V+ @$ N' \. `
                                end;. c3 {+ a( @) J9 n3 c
                                @.CurrIcon := "drivingHome";& ^. B( h" p5 c# K! J
                                @.DrivingHome := true;
  E1 o8 t+ |* t. p, o& E$ G, f                        end;
+ F1 C1 f; a2 ~# c8 x                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 {4 Z4 B+ a7 r/ c6 e4 I6 C
                        part := @.transpOrder;# `6 @1 p" l9 _  O. s
                        part.move(@);-- load part, ]$ h$ H' U# r7 c  U" I4 f5 Y6 d
                        @.CurrIcon := "load";% P3 h7 t! C# [) d$ v
                        GlobalDistObj := part.globDestination;% n/ @% }  [' k2 [$ [7 V3 _
                        assignLObj := rgmanager.rgAssignL;
* m2 G* j8 m+ J" Y( x                        row := assignLObj.getRowNo(GlobalDistObj);
# z; p! G# q2 i                        if Row = -1 then -- since 70
- L# y- m% {) c( g                                if lan=1 then
; k; _+ L5 S! f1 b# F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* l1 z! K$ Q$ e5 [( e& W9 H# n2 }& r                                                to_str("in der Andockstation: \"",?.~.name,"\""));# d) q* b6 n% x1 ?1 X# f
                                else
+ v" P  Z) E# B4 s! z1 Q* L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ^8 f% q8 I+ F; @8 t% y$ B* V
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, A/ b- `2 v% o5 o2 S                                end;
3 M3 R4 u  M) J" \                        else4 M, M/ H6 }  W* q- \' V& d
                                @.Destination := assignLObj[1,row];
' Z9 c1 j' B6 x" ]" `" i- R. |- C                        end;                       
5 v" O/ m. a7 d* \* |3 n2 L2 i                        newDirection(@);
+ J3 w8 B/ q; A+ m                        @.HasOrder := true;
$ z4 p* o% W1 V/ G' D                end;) X8 b( ]6 H' t
        end;
( ~# ~* _# b2 y% v& e+ bend;        -- of the method( \$ l$ c0 K0 _4 j' I# t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; z9 n% d" X  A  F7 X
  e1 N) Q0 Q0 |% H! _6 I$ a: K
这是AGV_putin中arrive的method。
; k. L) q3 c3 |, ^0 d1 g+ s6 E- X- T" |7 j
当到达物料速度越高时,这个报警更多,
) j; H: r3 V4 f) i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 B& |7 F# q: @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ @) \/ a- m  p' t5 R9 h

; Y5 H- T- _4 @9 ?" x' K& F另外一个小建议,就是move,所有的move都可以这样$ y& L( G2 e  s1 w- O
if not move() then debug end
3 H# D3 N2 c# W/ E9 C- a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( d9 Y) ^  Y5 K+ I1 d
plant simulation中的free libraries有AGV模板,' ]) m* j6 n  E: @
里面也有案例。' B, Q& A+ K- i0 \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 W5 w4 |1 E" D) B4 G! Y4 I; n2 u3 O) i: w2 p6 l3 g1 M9 I$ G
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : {6 J/ S+ R% p- v# }8 z
1 Y6 ^. Y/ j+ q+ c( |6 A0 I/ L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 |- R7 F7 {3 C. u1 H! l这是AGV_putin中arrive的method。
. g4 b" c9 O% w( g8 d( h- F, f- P5 q' |% r0 k
当到达物料速度越高时,这个报警更多,
3 |) K5 f2 A( c/ f8 F. S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-9 20:08 , Processed in 0.018618 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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