设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8930|回复: 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', w9 i7 ~8 p; L$ M
*/0 S. s2 y$ `: ]
is1 F; v5 [' n& B3 P9 _* [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 @) Y! E% u4 ^- Ido
3 b# }0 K" v: _; H        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 S% ?5 h8 x) r" V6 h) q        if current = @.Destination -- else return$ m2 c; r0 L$ c, o) [5 q$ H
        then& H/ d  D' }' o# n$ B
                @.Destination := void;
/ J! A( M1 P, G5 V8 e4 o                if @.occupied then4 {8 ^, U1 d" |% p0 ?# q1 m6 F
                        part := @.cont;9 f2 z2 O( T2 {% m1 E
                        @.transpOrder := void;1 `8 o7 a, b8 d- P3 d
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% f* {4 Z9 h2 O
                                @,root.eventcontroller.simTime);& \9 W6 S$ s% s, \0 k% U
                        @.HasOrder := false;
6 j, I, W) R6 m/ ]  Z                        @.DrivingHome := true;
6 y7 P: B- n( d9 Q  {                        rgManager.tryToStartTransOrder;
' x6 ~. q2 ~! K8 }' h8 @. ~                        if @.Destination = void6 @7 B: F, I1 c3 z  r
                        then -- no transport order for vehicle @  E* ?8 z' n9 U$ d
                                @.Destination :=# d  J& ^" a4 V4 B* n- O
                                rgManager.nearestFreeStation(@,track.~);7 }7 ]4 \/ ^% F5 O0 x3 i
                                newDirection(@);   
7 Q7 z% |5 c0 M# A* b                                if @.Destination /= void then
5 c% h2 C4 z1 `9 ]# F5 D3 C: }                                        @.Destination.NumReservation :=
" D4 o0 w+ ?# ~8 \+ |                                        @.Destination.NumReservation + 1;& W  _/ u9 d" }6 A! M/ v
                                end;# Y. m2 H+ r% \2 Q: T2 n, C
                                @.CurrIcon := "drivingHome";$ f6 r/ [' l0 K0 {" W: s- Z) K! x7 H; C
                                @.DrivingHome := true;
+ \; t- i$ e/ D+ i/ `* ]4 p                        end;0 Z, U' f" |7 R1 O" |! b5 P& c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: {- O. m5 u% [$ ]; c+ n- M
                        part := @.transpOrder;, E2 p$ X" }0 T% g6 L6 I
                        part.move(@);-- load part% U& J4 u& G0 D4 c/ T0 z
                        @.CurrIcon := "load";
+ X0 O: e, L8 h9 ^/ J9 Q                        GlobalDistObj := part.globDestination;* W8 c. ]( X/ p. W. i& F
                        assignLObj := rgmanager.rgAssignL;
' \3 B3 e/ S; S0 Z# t8 ]7 j                        row := assignLObj.getRowNo(GlobalDistObj);) E' H- s8 F9 V
                        if Row = -1 then -- since 70
# u# c" ~8 B, e                                if lan=1 then  r) O- k  r1 Q8 |. R, s
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ y1 {8 i# V1 c                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* p% e' F) t0 }. V- r                                else
: Y  J% L$ ?: F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; {5 }/ x0 h4 }6 W) n# X! Z
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, Q6 J! g% r2 _8 O; P. _0 v                                end;' n7 c3 m1 X6 j- K
                        else
' F3 k6 o- @/ p: p4 i9 T( i                                @.Destination := assignLObj[1,row];, n( `- F6 X' j8 \1 b
                        end;                        % ]7 w. q; Z0 J; q6 g; b
                        newDirection(@);9 q9 {7 t2 s. h) Q7 c% V
                        @.HasOrder := true;/ r! u: H. O9 P. m. C  `
                end;8 v" Q; B& W3 `. l* f: R2 z: d
        end;
( g# E- }- @1 C6 w8 b" Send;        -- of the method
  L8 U3 N2 C& V( o# e& J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* J+ v1 s4 F& q( ^, V0 o  @2 t2 a# v0 Y; S  R
这是AGV_putin中arrive的method。
- O$ ?# D* e; C0 H9 S+ e- Q4 f! \0 X$ L" G$ g
当到达物料速度越高时,这个报警更多,
  ~( l% \( Y: z: b可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  }( V% u( _9 o( ~* ~程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! V1 |6 R- E2 d/ ]: e" d
7 i9 W4 T  W5 S6 D( C; a) I
另外一个小建议,就是move,所有的move都可以这样
2 j/ p5 K; ~5 K8 x3 iif not move() then debug end
4 f. e. K( a4 P/ u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 T9 Q1 }/ M4 Y& x9 I& Zplant simulation中的free libraries有AGV模板,
" T/ [# a$ q% F; M! {+ c! g5 P里面也有案例。
' s4 u+ K4 j& |5 |2 o3 N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ Q# j* ~( p2 p1 b. Q6 d# K$ w* _/ g. v: X; J2 ?- C0 w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' m3 g& R7 |; F7 B, N6 F% ?
3 V. g1 m3 a( }# m4 K! H" y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & B8 K2 [* c' U  ~6 h  C
这是AGV_putin中arrive的method。- D# P1 ?4 z2 n! O/ E7 s

; z) J& X% @) S9 _; L9 Y* o& Y* }当到达物料速度越高时,这个报警更多,
" A7 ]& ^8 D2 h: q  [, T! Z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-4 20:31 , Processed in 0.013475 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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