设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7800|回复: 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 |$ X4 b! a$ b! Q*/* t- Z; B1 P+ a* ?5 ]# C, c6 S
is
. n( @3 T( L0 p' O9 u1 X, j        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. q3 V6 V0 ~( y8 v  |
do, ]2 o* ^) e& u. T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 @0 l' |5 @" N! P: o) R        if current = @.Destination -- else return
& b, B# L1 ~$ u1 I3 c4 V        then
, t# S) H7 E# y2 [                @.Destination := void;; C8 U; r7 y; {7 x" J/ }$ k2 n$ D
                if @.occupied then: B3 H7 L$ D5 d% `0 P% @! b
                        part := @.cont;
- l, y, E# `% n) V                        @.transpOrder := void;
9 \' S. y  t0 k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 }# O+ V" a% R( J, r* B1 ]& Y
                                @,root.eventcontroller.simTime);1 t  p& [6 a" M% w9 T3 U+ i
                        @.HasOrder := false;
! u+ t6 {/ a( J                        @.DrivingHome := true;1 }2 j7 c: r8 O5 m3 {' x" n- E
                        rgManager.tryToStartTransOrder;+ W: c2 ^8 p# i' R; v
                        if @.Destination = void3 F. r2 N4 q5 i8 s, v8 f
                        then -- no transport order for vehicle @
; B! V5 E( c+ L# v) o- J7 H$ d                                @.Destination :=  y! X' d. C$ A
                                rgManager.nearestFreeStation(@,track.~);
, l8 ~7 i. \! l! t( ?7 ^. k7 i                                newDirection(@);   # m1 D5 C" T) k6 ~8 v! T
                                if @.Destination /= void then
5 E5 R4 S& E% n  ]( t                                        @.Destination.NumReservation :=' V, ^) S3 i+ v0 N( K) l
                                        @.Destination.NumReservation + 1;
% Z; E" n  x5 s                                end;( q9 A0 C% J5 E; U: g. t  H
                                @.CurrIcon := "drivingHome";
' Q8 J  e+ f2 R: {, c7 s                                @.DrivingHome := true;
; Y6 _7 x$ m' f$ @( ?; u" ~                        end;! E0 d0 K% q/ c0 X9 V! W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 s  S$ g" u, Y$ X. ^/ _. s                        part := @.transpOrder;
6 Y; W- b9 @' y0 ?; U* _3 t                        part.move(@);-- load part
0 z! n; l7 i& {                        @.CurrIcon := "load";
/ g) Q9 V- T; Z) q7 j                        GlobalDistObj := part.globDestination;6 p& d& e- ^7 q+ u1 \  X" j
                        assignLObj := rgmanager.rgAssignL;0 P$ T  o7 q) ?  M' ?$ k! ^
                        row := assignLObj.getRowNo(GlobalDistObj);9 q* }5 R- u, Z1 w7 ?* P& p" A
                        if Row = -1 then -- since 70. ~1 J" w$ r+ z9 N8 g# W* o, o
                                if lan=1 then
; p' A2 |/ d1 [                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ X2 f$ B9 G4 e  l                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 W( `! g- C5 Q' r                                else
: h  U/ x& `: Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c7 T$ [7 Q. _6 ]6 [: L' k                                                to_str("in docking station: \"",?.~.name,"\""));                               
- b7 q/ y4 @3 t* `6 x                                end;. C: o6 {, i- k8 [" ~
                        else  c( _9 N9 Y* ~# x4 W5 P1 r
                                @.Destination := assignLObj[1,row];
2 B1 ^5 w, N" J: O9 }* Y, c  w                        end;                       
4 l% T6 w' k" b, I6 ?3 R( v( a                        newDirection(@);
7 r" N3 M) z' V6 G                        @.HasOrder := true;) B8 y* a- q( N+ h" ?& S" f
                end;
$ ^5 r9 h3 e  s0 ?+ F0 ^; P        end;0 ^6 \7 j. j: A+ y' ?1 S
end;        -- of the method! K" w6 T% c3 h4 ?  U3 U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 ^2 t4 b  l8 w1 v4 ^, J* `
" v- G1 v% @/ c+ t& ]7 n
这是AGV_putin中arrive的method。' Y1 G- V& J  J9 U  b: `% f0 r
9 j/ @% C+ w5 S! s) C3 w
当到达物料速度越高时,这个报警更多,
0 B7 x. i; w" O4 }% m4 R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ _. W- I+ d5 `  B( q! {7 X5 X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ U& ]8 a4 b% r+ [8 w" }; E: l- ]. N

3 D3 r7 f, X# {" E另外一个小建议,就是move,所有的move都可以这样
% O. P' {' O0 n! J: Fif not move() then debug end
' F) j) O2 |& J' ^0 L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" A* h, S, k8 ]- Cplant simulation中的free libraries有AGV模板,
5 {) s7 w, G/ \; W( J7 q7 J. _; R里面也有案例。7 {/ N% h: U4 t0 `; D/ `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& c, V$ T# ^" [( Q9 u. U% C. F
/ s% S: y5 c" Q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; K% d4 S) h, m! l4 N& E7 V
* N, b' |7 X' T# S4 M
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 I! q+ J) J1 [) r, I这是AGV_putin中arrive的method。# J! R0 B$ ~- v6 ]
( L  J' d) d* f3 c3 Q) [
当到达物料速度越高时,这个报警更多,
7 e0 r: T; y' g1 z, S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-29 18:24 , Processed in 0.016423 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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