设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9297|回复: 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'
& t, ~3 u! J7 R( p" y4 M# B- h! h*/
, E$ @! v. n. ^" N, p, Eis% Q  n; E, [7 n6 ^# j7 K2 ~+ r& m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' r5 {) F" Z! xdo
3 T! ^8 i) a: c9 _. y  D8 |        Lan := rootfolder.Internal.Tools.AOLlanguage;
) R$ t- z# }6 n) c  U1 W& S        if current = @.Destination -- else return6 b. p8 ^6 m( j
        then
( W6 r+ l1 Q% ^; x2 N3 U/ p) d! ]                @.Destination := void;
4 {: [1 y/ x- V! ^! d1 E                if @.occupied then0 w1 y" Q8 n  n6 g" k
                        part := @.cont;
. U# C' D% H: ]( R7 N  R1 e5 ^% ]                        @.transpOrder := void;
; e2 C1 W7 p: u/ v. r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 g0 }9 S4 _$ {. ?4 j                                @,root.eventcontroller.simTime);% ^; H  o. j( J' V1 E
                        @.HasOrder := false;
3 A. C/ c- H& r; g# x                        @.DrivingHome := true;2 _+ q+ a) o7 X3 d- U8 B5 T+ D
                        rgManager.tryToStartTransOrder;
3 V- v+ D: q7 U+ h2 S8 M7 [                        if @.Destination = void# H0 U# z' o  P
                        then -- no transport order for vehicle @5 c2 E3 {5 K$ s
                                @.Destination :=
) O8 W9 l) ^3 {5 J& p' Y                                rgManager.nearestFreeStation(@,track.~);* k$ G4 g* i2 O, L/ c
                                newDirection(@);   
& o, L" [8 ?+ ^! h                                if @.Destination /= void then
$ q$ S' i" Y+ H- ]                                        @.Destination.NumReservation :=; x& q' d! z# R, e+ H
                                        @.Destination.NumReservation + 1;
6 K  Z& ?2 j- h  x                                end;% L9 d' Q; b( R0 y1 J
                                @.CurrIcon := "drivingHome";
3 B6 F+ P1 Z4 m+ y) m3 W                                @.DrivingHome := true;3 p- }# p! [* e& V' A: S- p9 j% A! k
                        end;2 [* W! \3 a, g" j, Y  W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, ^7 p! m' I6 @6 d( D$ h& M
                        part := @.transpOrder;+ V" x, m, }7 u
                        part.move(@);-- load part& m4 ~' O8 [/ |' L
                        @.CurrIcon := "load";+ P7 b" R5 C9 k& l, ^' l- {3 ^$ u
                        GlobalDistObj := part.globDestination;" d5 m! y7 s8 H( _$ \- }
                        assignLObj := rgmanager.rgAssignL;
  d* _8 H! `1 j/ [& e                        row := assignLObj.getRowNo(GlobalDistObj);
" L+ f* h7 E; y! X1 G7 E                        if Row = -1 then -- since 70& L' z: J: F3 m* c. o8 A( A
                                if lan=1 then* j5 g0 F! v2 _: E% x# n" m
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! p3 I$ A1 i$ X+ t5 o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; `7 Z; Z* d' d% X                                else# s$ V$ K7 ?$ g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" r  o; V( \* \/ H& \: C                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 R& |3 ]; \6 l                                end;
# ?; R  b* J8 K) R+ e1 V                        else
1 B" A4 G7 u0 W: D2 A7 S                                @.Destination := assignLObj[1,row];# q& \3 m& e/ Z6 D) h+ B/ [( W
                        end;                       
7 C5 s4 x/ @- u1 Y" e, B                        newDirection(@);
% P5 ]+ x2 n6 ^7 C                        @.HasOrder := true;( g2 R' K: E; w% U! T! z
                end;
( |$ n9 y- L- Z4 U1 P; B        end;
. _6 m3 p) J/ U2 L1 A. hend;        -- of the method5 a& \' u( n& x% `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( t0 ^% h1 P" P+ |1 _4 j% F+ ^
" Y8 f3 e# p4 P' X
这是AGV_putin中arrive的method。
! J( c$ Y7 a  F/ [8 d% u+ q9 K& a* q4 S- X: v/ f. _$ i$ Z/ |
当到达物料速度越高时,这个报警更多,
! M+ x  A4 c4 U( B8 K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 ?; o( \! U: {$ Z0 V+ y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 u8 \; N9 q9 i0 g3 F5 r, F* f

9 X! v+ x, m$ T9 H另外一个小建议,就是move,所有的move都可以这样! V2 ?$ N" z2 |* ^4 x/ }
if not move() then debug end+ |6 J% V$ i; {- o* e4 g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# [  ^, Q% n( {, @8 Z1 _plant simulation中的free libraries有AGV模板,+ X8 P: C2 t+ d$ m' K
里面也有案例。% W* K. s1 s1 `; ?1 C/ b: @' Q+ |
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& }: V! g- E* U
! ^: D: P0 x/ `3 q# E/ H7 R
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 }% |5 Y4 v$ C& O
& g0 c5 F* Y3 |! X9 t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# i9 |$ j5 V. U' Z8 i7 R. A3 Q+ X9 n& j这是AGV_putin中arrive的method。" Q& j7 o1 F- M
5 ^% m, F  b+ h
当到达物料速度越高时,这个报警更多,

% @/ H0 F3 Q$ s4 M1 n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-23 16:59 , Processed in 0.019128 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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