设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5703|回复: 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'
. Z% p2 b5 B( z; W*/4 d4 r  V0 a" E1 D4 L/ u  z, I
is
. X- `% C& j3 ^* `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 m: h; ?1 J2 O6 i" z% Y) `do
% L) s7 x8 c9 K7 c* r* A! A/ U$ b( L        Lan := rootfolder.Internal.Tools.AOLlanguage;! A* s6 j2 T; P3 {# c4 i
        if current = @.Destination -- else return
8 o  ^5 o+ L4 H5 Q' Q        then' b4 w4 i5 h4 L. N% m3 O0 l% b
                @.Destination := void;
7 Q/ y+ u( u" H0 Z9 Q% p                if @.occupied then1 d; F9 a' _" @6 Y9 H5 V* g. R3 c+ d
                        part := @.cont;. r' d" t  ]  f9 J" o
                        @.transpOrder := void;6 o* Q2 X+ c. u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# s4 D" X4 T5 z$ j
                                @,root.eventcontroller.simTime);# i) U3 G- E2 u" H; ?
                        @.HasOrder := false;* {0 j' A& }+ m! X7 F
                        @.DrivingHome := true;
2 s5 D  @- I* F7 ?/ W: Z9 U/ h5 ~                        rgManager.tryToStartTransOrder;
! T* ^# N( n2 ~! p# ^* W                        if @.Destination = void2 o3 X" B: F6 p0 s5 q- H! T
                        then -- no transport order for vehicle @5 G9 Z/ m# P, o+ X+ S% ^
                                @.Destination :=
# {: D, `: j  o/ }2 f8 Y* B5 u% D                                rgManager.nearestFreeStation(@,track.~);+ r9 T/ o: F2 N7 V
                                newDirection(@);   3 B8 b' X  k$ r- l1 u  g2 w
                                if @.Destination /= void then5 g! t5 J8 J+ a. V* M2 ~
                                        @.Destination.NumReservation :=$ ~/ u- D, n# [; M$ A( ]$ S, r, u
                                        @.Destination.NumReservation + 1;. q" ~) S( A% u9 ]
                                end;* T0 k  a3 ]& m) b
                                @.CurrIcon := "drivingHome";
3 r& ~0 h, }6 E( d1 c                                @.DrivingHome := true;
" m- x& p! g1 ~1 y                        end;
8 A* d# {. u& k6 Y4 ]3 m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 \; w- l7 D( |* f- y  Z7 v. x                        part := @.transpOrder;* H" D/ E' Y4 Y8 J
                        part.move(@);-- load part
& L0 S; v9 I  e9 _                        @.CurrIcon := "load";
5 N9 \1 @/ P/ [! Q1 R* [                        GlobalDistObj := part.globDestination;
  u5 E+ O8 a$ W, R& {) ]0 y0 }                        assignLObj := rgmanager.rgAssignL;$ Y( ^3 @" y3 Z% _
                        row := assignLObj.getRowNo(GlobalDistObj);
: P( N- H! p( k                        if Row = -1 then -- since 70' w% \' r- b5 P$ o
                                if lan=1 then
" g/ S- Z% D2 x                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# X- z3 Z! B0 E
                                                to_str("in der Andockstation: \"",?.~.name,"\""));: t  }3 z4 K+ J
                                else
! u6 I1 \; g/ @1 G7 ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- N  y, Y- r; l& o; i                                                to_str("in docking station: \"",?.~.name,"\""));                                % G& z6 F- A% S7 v) O
                                end;; d& B0 |! w: E2 x
                        else2 @! b/ a9 n' u' \0 p6 w
                                @.Destination := assignLObj[1,row];
( G7 ~) Z3 o3 L  ?$ ^6 f                        end;                       
, k* F8 }: s8 m! \) c# [0 t8 h& n                        newDirection(@);
9 c  h- h% k3 M6 D; r, [                        @.HasOrder := true;
5 W: O9 C$ O$ ^                end;
' Q% D* i/ n/ \! \' X# w+ F        end;1 K- x% p0 S3 ]$ u1 D
end;        -- of the method
( T6 w3 v; x& f" n9 d$ `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / p5 R) T$ S9 @9 j( G
( Q/ y$ w) s* i9 |! p
这是AGV_putin中arrive的method。
" d7 P) b+ y) G- H
0 Q1 T2 q! r8 M1 e当到达物料速度越高时,这个报警更多,5 v# Q! O" ^0 ?: S* Y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 e/ [; _) o0 X. p: S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 V2 ^2 G5 L5 e+ m

. n+ W- j: U' O4 _) w另外一个小建议,就是move,所有的move都可以这样* f+ ^# U3 s4 O
if not move() then debug end  Y: S  }/ ?. K- \  a3 A
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 `9 o+ ]1 _3 ^plant simulation中的free libraries有AGV模板,9 W; G1 ]* [- ?: W3 g' @$ A% S
里面也有案例。; j7 [% I& e& B1 v
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  ^3 g" y' r* F1 \
" W+ g" o7 ~) P: Y5 P" U* X0 ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & I7 E5 |+ H9 I+ G* a- l" s6 F3 I
* q% A( w  _+ z* \! [$ \0 G" l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / s! g2 M" p; I9 e) z  G* S: ?' @: d
这是AGV_putin中arrive的method。
8 X3 a2 C, n6 ?" Z
# ?6 `% z( W2 G当到达物料速度越高时,这个报警更多,

9 b7 [: ^& e$ {6 L! @$ H- J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-15 08:04 , Processed in 4.730816 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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