设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7299|回复: 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'0 z' L  G( v1 X7 F! q8 e
*/
( r, F+ |) n, U* D6 ]) ?0 z% Mis
5 u8 I$ h5 K& Q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! F% j5 K8 C* l1 ]& |: n/ k# [& h. fdo) S7 s( W- A8 f
        Lan := rootfolder.Internal.Tools.AOLlanguage;# ]( n: |' P5 j$ ~
        if current = @.Destination -- else return
! p) D. P; U) r2 E        then3 |# [0 J* ~$ R+ c
                @.Destination := void;5 Y& |! {$ ^' x3 f5 {
                if @.occupied then
+ Z! x  M5 l: Z* j) ?3 W5 G* ?                        part := @.cont;
% O3 M( J! O5 h                        @.transpOrder := void;; ?3 a( [- C2 W% x0 n  N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; `& G, j! ^5 z( d: D: n
                                @,root.eventcontroller.simTime);/ ~9 r6 k0 u. r5 p" l8 S( R
                        @.HasOrder := false;4 P+ H: @* R9 O0 d4 u6 M4 e# H6 E
                        @.DrivingHome := true;' t  \% q9 ]- }1 p5 w, [, R
                        rgManager.tryToStartTransOrder;* v1 z9 C8 |$ G$ ]2 {9 s: V
                        if @.Destination = void
2 \3 T' W9 c6 z                        then -- no transport order for vehicle @; l3 J: L0 d& g* E% \" ?+ K
                                @.Destination :=
; p& Y9 b" R4 q, C% e0 }- X! b                                rgManager.nearestFreeStation(@,track.~);$ Y( F3 H- ^5 s6 \) K7 ]
                                newDirection(@);   6 O) Y0 ^% X! h" s% \
                                if @.Destination /= void then
% V& j8 x" r- ]6 P  }! M# F                                        @.Destination.NumReservation :=
' @9 O* i& x5 q1 k- M0 N                                        @.Destination.NumReservation + 1;
, |) l" t! K/ [0 s% h' B                                end;( Q7 [, I" _! T8 V  L
                                @.CurrIcon := "drivingHome";
- N# U7 m3 E7 t) ?6 t* J4 l                                @.DrivingHome := true;7 K- L1 a; M0 Y. |& R2 Y6 x
                        end;
4 E5 q' e% z$ G; o7 \( M                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 @; ?# _( d" y* a4 B                        part := @.transpOrder;
1 c2 V* T5 u. U8 E                        part.move(@);-- load part& n7 _' _! K+ l
                        @.CurrIcon := "load";
3 g% p8 F1 N) O3 s" S. d                        GlobalDistObj := part.globDestination;$ o& B0 E; L3 [( F5 z  p7 X
                        assignLObj := rgmanager.rgAssignL;
, `. V# a8 H/ j# w' e# S7 ]& q                        row := assignLObj.getRowNo(GlobalDistObj);1 q+ c4 H5 H' _
                        if Row = -1 then -- since 706 D' A# \& I* h$ W- M+ u$ ?" w
                                if lan=1 then5 H# l% @5 ~9 ?( F2 S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ {$ L' m5 j8 t. c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 d) I, V* g9 l% w8 L                                else5 _# w: `) c7 A! j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ h9 O2 M/ x6 T" |" h+ h2 G2 j
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 m- z- h% v- D3 \/ S7 u2 O) {; S
                                end;
8 S0 ?) a5 K. c0 v                        else! f7 M8 |3 o# N7 J5 [
                                @.Destination := assignLObj[1,row];+ q8 K* e7 s, i4 Y
                        end;                       
' _4 @/ L0 `/ y; g' g2 f                        newDirection(@);( y. i: @  d! w" d/ O- B
                        @.HasOrder := true;
6 M3 \0 w# I5 ]. B                end;
0 K( e: W  I- H; z1 w        end;
( Z( O- o9 e: K$ \end;        -- of the method- |$ Q% L, g7 t+ e9 P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 r1 w$ n" K) D1 u. x
7 c3 V& A3 A6 h- m! r
这是AGV_putin中arrive的method。+ q5 R+ X5 n5 l. y) N$ G( R1 O

/ S- ]8 j- y* L% q  u8 g8 G当到达物料速度越高时,这个报警更多,! n! a+ V9 v7 E2 r1 _. s  D6 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; b. P( J! U1 ?$ o. A1 x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) m% q- ~5 A  k. W% _  i3 F9 i" L3 R) S5 I" L
另外一个小建议,就是move,所有的move都可以这样
: ?' ^( k0 P$ E- V! Dif not move() then debug end" R2 H* _* {  r* {/ K# ~
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 N& r) L$ c5 }. gplant simulation中的free libraries有AGV模板,# u$ N4 u. f" n7 g# A
里面也有案例。0 b5 B3 ^# B2 y* ?/ o9 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 o. }: w2 e1 v. g; c
% ]5 A' w) ^; K, N* M我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& M" Z, K3 b9 P" X: d; d8 f+ y, a. R6 F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + D) l! ^; m3 O
这是AGV_putin中arrive的method。
  h6 n0 D4 Y7 _  W* n
. N1 C/ w7 p/ i3 T) z1 a8 k5 V当到达物料速度越高时,这个报警更多,

3 {( I0 x7 S7 U* f9 Y) U+ p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-2 17:20 , Processed in 0.017991 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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