设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7390|回复: 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 U% r) A4 @$ r: M1 D*/
& _# b; C7 A% f4 v! J* T4 kis0 F: ]2 L2 n2 @: I1 }8 G7 l4 x0 }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ?# z7 y7 C8 f$ Z: @( }
do
2 h$ V2 m6 ?$ W9 c1 ?) F        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Z+ J. Y, e; R0 v# O        if current = @.Destination -- else return9 Q8 ]2 k2 R* p/ ]
        then, f$ a3 b, x' G+ C4 D& b9 K
                @.Destination := void;- k0 [% a0 R- {& Y* J/ j1 h
                if @.occupied then( ~4 c. w+ ~" p1 p
                        part := @.cont;0 c% @9 p  O2 `" c
                        @.transpOrder := void;/ S- R; o4 X& U+ L% T, b" l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 |' J! t& N( i& b  M                                @,root.eventcontroller.simTime);
  Y5 B3 }, r$ ]: I, U                        @.HasOrder := false;' b4 E5 q+ y& r+ a- F
                        @.DrivingHome := true;
' q$ ?) ]* u0 J/ M                        rgManager.tryToStartTransOrder;+ N& \+ F1 q$ m( a; D& F
                        if @.Destination = void
3 `$ [+ t1 R1 C                        then -- no transport order for vehicle @
7 k8 ^! h+ K! M  S) e! B                                @.Destination :=% r& _1 }7 a4 u
                                rgManager.nearestFreeStation(@,track.~);
# c- X6 k. }" m9 F' Q. A                                newDirection(@);   
4 C  @2 H& j& ^, d1 v                                if @.Destination /= void then* A, ?, K1 x* |# @- A* J
                                        @.Destination.NumReservation :=
( b' `- K" a0 K  z& Z                                        @.Destination.NumReservation + 1;0 A! q/ S% m$ X
                                end;: Y( Q9 y3 W0 `% e
                                @.CurrIcon := "drivingHome";8 H: T% j% s' e5 x
                                @.DrivingHome := true;# K$ g* y# w1 K! p& \% j. Z2 C
                        end;9 a! h& B" A. g2 U9 H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 F- F! }; O  z5 m" E' Q
                        part := @.transpOrder;
1 H$ H4 I0 k" t1 h* g% |                        part.move(@);-- load part8 o& _2 g& [! Y% U) u
                        @.CurrIcon := "load";9 m" i$ z" O* R$ K* m# X
                        GlobalDistObj := part.globDestination;& Q+ j- B, r: J7 ~' M3 a0 h
                        assignLObj := rgmanager.rgAssignL;' y; @7 U# {. m
                        row := assignLObj.getRowNo(GlobalDistObj);
, u/ C4 B* r. n. W4 C( y$ `                        if Row = -1 then -- since 70
7 A7 M% k0 F/ B* `                                if lan=1 then
7 \) M! q: V3 I7 @1 T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ D- B' U; ^' O3 D  |                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. e& E2 S) |. S# h( y" Z8 L$ Y                                else0 c% X: x! ~# W8 X  U0 f# M5 W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& q* `  \; S4 \% y
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ d0 }7 X8 D+ Y9 B
                                end;
$ N( M& h5 O$ t5 X/ M5 g" k1 {- e6 z                        else( g: H) ]5 V0 R& d7 O% {
                                @.Destination := assignLObj[1,row];; U! n7 [0 M0 L2 q$ p1 C8 i
                        end;                        3 ?7 y* |1 l6 ?. E+ |+ s: C
                        newDirection(@);
: Y7 E3 h. x6 Y                        @.HasOrder := true;
5 ?' c* R5 C4 A7 V, y& @                end;8 h5 W9 ~2 y3 ?2 k1 i- V9 [  C
        end;
0 @* K( m1 O1 F" P0 Wend;        -- of the method+ Y* s: S) k+ o. Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 Q* S9 S1 y- H$ d; N# M$ ]: t
* l$ V/ ^9 q0 \! _3 E  E* Y这是AGV_putin中arrive的method。2 ]9 _. Z( Q/ o8 }/ v

5 ~* P( H. {6 O7 y当到达物料速度越高时,这个报警更多,, c# A+ w( i; \
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 _" Q& t# m! O程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. f* e' i- L( n; Z* r2 E/ Y+ D" V: H3 G* K# W+ w7 V6 J0 y7 f
另外一个小建议,就是move,所有的move都可以这样% h+ Z$ A" Z& @; P
if not move() then debug end" q! k3 Z% ?- [" R# Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 g! y5 Z+ [( Pplant simulation中的free libraries有AGV模板,
. f4 I0 ^, \" W2 ~6 g里面也有案例。. V* ?1 j8 Z: k; t8 [) q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 {8 ^6 @9 y& H8 A5 x. Y, p! S- Z3 ^9 w1 q; X. q) b$ }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; Q% P* [' q' N; l: [
, C5 G! b, U9 n) {! w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 v& S' }5 H9 ?9 Y3 C0 |$ W- [这是AGV_putin中arrive的method。% F' g! v8 B2 N/ X/ W! R4 V

3 }  L3 [( i, Z9 R1 ?8 Z  s当到达物料速度越高时,这个报警更多,

; J' F5 Y3 v8 O/ l: k/ H- h1 j另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-9 04:07 , Processed in 0.020279 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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