设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8792|回复: 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'
1 e) V7 J. Q5 u- S*/  B4 M" b1 g  b9 o2 t
is" a/ z, ~  t) k, ~" P
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. Z+ o. C0 P' N" m) M8 Fdo" S0 ?1 w9 K: z, B
        Lan := rootfolder.Internal.Tools.AOLlanguage;
, X( f8 Z. z2 ~        if current = @.Destination -- else return
- j3 H+ W( T, d8 }# T        then
1 [4 I0 M& t3 _* y0 c" w; L% d+ ~                @.Destination := void;
/ u5 I- n: g2 E* |% r. x) U. h                if @.occupied then
8 b) O2 B/ M+ _( D                        part := @.cont;8 K" X$ H6 d* c8 Z" }8 K6 p  K
                        @.transpOrder := void;+ r' P: B; U  D$ E+ I7 \7 E
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 Y0 q. v: S" W" {
                                @,root.eventcontroller.simTime);* U7 \& n/ _) {4 `. d' c9 y
                        @.HasOrder := false;  R/ j6 n7 G( R% l3 T- [
                        @.DrivingHome := true;  E/ u( b8 `4 k8 R: Z4 @0 j& y$ F
                        rgManager.tryToStartTransOrder;
+ x' [- L0 L4 ^& `$ K$ r                        if @.Destination = void
: d! b5 @7 P) `3 k- E                        then -- no transport order for vehicle @% x4 f5 ]$ `8 @/ D0 h! D6 [9 I% D
                                @.Destination :=
) q  G& n( e6 c3 V% H                                rgManager.nearestFreeStation(@,track.~);
! w0 k# T9 O! A& m$ n  Q                                newDirection(@);   0 }  K' S3 K$ w8 s1 o
                                if @.Destination /= void then
  j7 a0 e* g0 n. @8 e                                        @.Destination.NumReservation :=+ ^5 I+ p6 z8 }# d# }; c
                                        @.Destination.NumReservation + 1;7 N: |+ r) E5 X4 b& S, p" d4 R4 N
                                end;$ C8 p: d# ]9 V) D1 e' c1 C
                                @.CurrIcon := "drivingHome";) Y" j  b: a  R, U0 G
                                @.DrivingHome := true;
' T' J$ Q1 v, |1 B; g5 f                        end;
/ v/ @" b7 O1 h  [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- Q5 E% H+ c+ F; P8 M: @                        part := @.transpOrder;
% [* b% h# T+ o% Z                        part.move(@);-- load part
& G4 S/ c: G: `3 `* a% b                        @.CurrIcon := "load";4 [% n: E# d4 z3 l% @7 s/ v
                        GlobalDistObj := part.globDestination;
& k1 D* _2 f3 H                        assignLObj := rgmanager.rgAssignL;$ @9 e' m, \% G
                        row := assignLObj.getRowNo(GlobalDistObj);* l' e9 {, F! M4 M
                        if Row = -1 then -- since 70- m/ u8 ?+ k3 W6 `" i" Y* [
                                if lan=1 then
. d% }/ g, U" f% @+ L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 R% y& e9 `$ H. \' b8 @4 j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 W, |* h) x+ }                                else
: O1 L* w% i$ v" M% ?2 A5 N) C; v                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 f" G* o# w- d2 Q
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 S, h5 y  Q: l; a
                                end;& j& V; T% J+ |- N/ o4 @9 T
                        else
1 ^6 T2 J- }# E6 ?) |/ o                                @.Destination := assignLObj[1,row];' N& W  U4 r0 r6 J2 W
                        end;                       
/ o) t$ W0 {4 C4 ^                        newDirection(@);& @$ r( j. e0 f% S5 S: C- e" Z
                        @.HasOrder := true;$ B) c; k, s) N* ?
                end;; |% b4 W! B5 B  y$ B$ A% v
        end;
8 X# f4 O! R8 A0 K3 _6 X; {end;        -- of the method
( q, J/ l# W* V4 e- g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + V4 A) o' w( A% I* A' \* _

- r8 Q0 u9 s! T* o$ r1 b1 l. q这是AGV_putin中arrive的method。& y; W% J7 M! I4 |1 \

9 s  C! Z2 L' w' Q% {, f" k当到达物料速度越高时,这个报警更多,
5 K5 Y  Z3 h) _' A$ q0 J- x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ T  V( A4 i5 }3 y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; K! |1 X9 r, i; g% V6 Q" T/ y$ J; N, H  U2 R: t* I
另外一个小建议,就是move,所有的move都可以这样
' q, S, J5 l8 |0 h8 |- u4 Iif not move() then debug end% w0 m$ N) x9 Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) [; V$ z% c2 U, M  O+ R# s1 Aplant simulation中的free libraries有AGV模板,
! x+ m+ S1 U) N' \0 r5 U- n里面也有案例。$ a1 \  B9 y( u. Z+ y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 w) i' o0 `7 W& n% N9 S; K5 c. i# C) Y6 y0 N0 W: h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" t. V; y9 t( c* ^
/ S$ V# b0 l1 N$ L' `/ _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 ^1 J( L- s, o7 `4 a4 c这是AGV_putin中arrive的method。
, y5 ^* B) N9 P9 e. G5 w' b1 s. S. c) L3 O9 ^) o0 ?
当到达物料速度越高时,这个报警更多,
6 K$ b7 v' _+ ^2 G: F: P
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-26 13:00 , Processed in 0.015201 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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