设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6462|回复: 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'
3 g- T% h" s) \1 A5 O( h*/% R1 Z) l1 t. G
is  u4 R9 x" ]0 c; q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! }" g) m9 d% i# g4 ^3 U9 w
do. J' l1 ?/ K+ b  p4 \+ P- m
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ z" T3 s% l* f2 f$ A8 H        if current = @.Destination -- else return4 k% K$ G+ _9 t: d
        then
. |5 }& D# N, E                @.Destination := void;
1 O. N2 k4 ~2 i. u4 h                if @.occupied then6 C! O2 R2 |+ p1 e, f
                        part := @.cont;
5 b% c; X5 o2 U                        @.transpOrder := void;" e* D, D# h$ U* r3 g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  B0 {8 r! g" ?, v/ j                                @,root.eventcontroller.simTime);( E. \. @5 W$ j$ b& ?( K$ r* s, [
                        @.HasOrder := false;
9 Z: x. p1 Y0 L7 [# d                        @.DrivingHome := true;8 ]  O- Q' `1 K- K! {
                        rgManager.tryToStartTransOrder;
* x0 I+ ^3 l! ^8 g0 D                        if @.Destination = void# O5 t  E' ~. }7 n$ ?9 n0 K
                        then -- no transport order for vehicle @
+ `% F! @! @8 ?# Z: U, p+ A# a                                @.Destination :=" k4 ?6 m+ P; Z
                                rgManager.nearestFreeStation(@,track.~);2 l" |; w" Z- \. o
                                newDirection(@);   % n4 x! r" P) s& m& w
                                if @.Destination /= void then
, f4 G) t5 ~6 d, V. L' \9 l5 }                                        @.Destination.NumReservation :=( a& O! L. z! e7 k% Q
                                        @.Destination.NumReservation + 1;
) E( K) |" k: S: m                                end;
+ f' X5 Y5 |. K8 F$ d                                @.CurrIcon := "drivingHome";/ ~" x' J8 d: a, P! q5 p& |: T4 l
                                @.DrivingHome := true;7 U. i% f- I, k( z; B6 y
                        end;
9 t  Z$ {: z4 [* a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: ^4 \1 Y3 u+ ^  t% k% W1 x0 t                        part := @.transpOrder;/ n& |8 J* E% Z: p: A- {
                        part.move(@);-- load part8 [1 T3 p2 c9 y. C
                        @.CurrIcon := "load";  e) a0 C$ ?. q
                        GlobalDistObj := part.globDestination;
# g0 H$ r* t6 m3 t0 n- ~  }                        assignLObj := rgmanager.rgAssignL;1 u) v/ W6 `) x
                        row := assignLObj.getRowNo(GlobalDistObj);
$ |0 ~4 J8 q6 N, a; M# U                        if Row = -1 then -- since 70- I: W# F+ q, u5 i
                                if lan=1 then
4 [6 P9 M2 V( d/ x0 M! ]& @( D                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 `* C$ n4 s5 T9 Y2 Z6 a7 S) k: s                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 E. ]" i- y: w                                else/ W6 T) H/ q4 e% l. @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. }4 F$ [+ f2 f: u                                                to_str("in docking station: \"",?.~.name,"\""));                               
; y8 f% V0 T0 z; l. E                                end;
: ]5 k# `. F+ i9 D% Z) s( o                        else) N: x( W# m1 O1 b* H: ^
                                @.Destination := assignLObj[1,row];
3 E+ L- H" d7 x( Z. O7 k6 f                        end;                        ; p$ ]" @% Z, H! s0 H
                        newDirection(@);$ i; ]) E8 N2 ]5 A# S  L% M
                        @.HasOrder := true;
! ]" w" F, K* S* T7 Y" R                end;
) N# s9 X7 z7 Q5 o        end;; H: W% b) w8 M. E8 b* G$ K2 |
end;        -- of the method
" w5 |: g& Q! [( W/ K# E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( P2 @" I4 R" a6 |
" Y$ j4 C  l0 O: s这是AGV_putin中arrive的method。
& ]+ N) m. }/ b* L+ S1 q! H: P% F6 T% W2 G, c
当到达物料速度越高时,这个报警更多,
4 P) `) J- h1 h8 _( d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: {0 H% q5 L* c4 |4 z2 R* e; t5 ^程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 r: C5 h! c  N/ u$ E) ^6 \

; Y+ b5 g# V$ Z* a另外一个小建议,就是move,所有的move都可以这样
# W; W: r, D9 f+ qif not move() then debug end
+ u! Z8 u& r& v) l3 p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。" n8 |7 p9 y" h  @
plant simulation中的free libraries有AGV模板,5 W% Y( w% I  w# i8 g
里面也有案例。
2 o, z6 n7 c: ^7 G: k7 M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 j  }" d2 N; ^4 }+ H) W& v
8 q# D5 |. t; T' O! N# V' x6 g
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 q8 S% s: s# P6 X: t0 ]0 x5 r2 R1 E3 Y$ Z' z7 v- o% N
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- i* L  F3 k& _) I4 x% x6 w这是AGV_putin中arrive的method。' S5 r  K+ {4 F+ j( m
. k$ ~! a9 U2 k  i
当到达物料速度越高时,这个报警更多,
' N- @( l7 D3 b6 S3 a/ Y9 Y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-8 03:55 , Processed in 0.021112 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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