设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10173|回复: 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': r5 I! S* {+ B4 i
*/1 j" \; n; ]/ A
is. d3 f, b! m* `7 m) h
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 p3 D- `8 c" Q5 x7 t# u8 Z/ c% S8 Y
do
$ T+ a6 t/ p  C( G& t        Lan := rootfolder.Internal.Tools.AOLlanguage;$ i  x0 d  [$ v: d
        if current = @.Destination -- else return
: p4 T1 `4 z, q9 @; L        then
7 c9 {- t2 u( `9 r5 E" y2 |% q                @.Destination := void;
. T& S0 |" D3 W4 w7 q$ w# S                if @.occupied then
5 N0 E$ K/ P3 b                        part := @.cont;
. Q2 ^! e+ S  X, o$ r. `* m                        @.transpOrder := void;) d0 Z- S6 X' j8 ^4 @
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X/ I- `! m. L% v                                @,root.eventcontroller.simTime);+ d& B5 \. z* e
                        @.HasOrder := false;4 T) R! G7 s3 H% L, `: g- [
                        @.DrivingHome := true;+ J/ r5 O& b- P/ t0 k
                        rgManager.tryToStartTransOrder;& v3 M$ T+ c9 s& F, v( x4 y3 B2 ]* Z
                        if @.Destination = void
4 G: _3 I7 y% e8 b0 D                        then -- no transport order for vehicle @* S0 m3 Q( X; s3 e8 t$ D
                                @.Destination :=
8 n9 A: l+ C7 d+ k  N                                rgManager.nearestFreeStation(@,track.~);4 ^, T: {. \3 f& ^6 D7 G; N6 m
                                newDirection(@);   
7 v' L( t7 d% D- t- X# b% z                                if @.Destination /= void then
+ ~( C2 k% L5 Q$ {                                        @.Destination.NumReservation :=
) B1 P+ E3 T4 h- H                                        @.Destination.NumReservation + 1;
) U$ l& R! e4 h- Z4 j+ Q                                end;' j- m' n% N# K' l  |4 e, e: f
                                @.CurrIcon := "drivingHome";
: i8 L: a8 r  e1 Z/ u, l5 l                                @.DrivingHome := true;
5 w; K- J, L" K! O                        end;
" {$ O6 A/ W% G                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 b3 j/ K+ ?# ~) V( V, O$ o                        part := @.transpOrder;
. a; o$ W, m3 ^; z' N" t                        part.move(@);-- load part
) ]5 W% h! E3 z/ ?1 G; O                        @.CurrIcon := "load";. ]0 i7 D: r) ]1 e/ U
                        GlobalDistObj := part.globDestination;, G, k4 B/ \" U+ v, w2 K
                        assignLObj := rgmanager.rgAssignL;
8 p0 I/ f4 w! c0 s# s                        row := assignLObj.getRowNo(GlobalDistObj);0 ^( C1 \- Z& R. v. x
                        if Row = -1 then -- since 709 M1 ~/ d; [  U0 I& C4 n
                                if lan=1 then( ?1 J* c# V; g8 e6 e6 J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# `+ i" d7 N5 R! y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- F" O* P7 D9 p# U) W9 s" K                                else
, n; L+ O: A3 G, j% @! T! N! z% A                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  K5 {  I9 s7 u1 A" a. A/ n                                                to_str("in docking station: \"",?.~.name,"\""));                                ! G6 E' U& r. u8 e8 d
                                end;
" Y9 R) J8 K! `5 W' K/ f                        else
9 T2 b5 m* I  o$ [" U* O                                @.Destination := assignLObj[1,row];. i. ?* w3 V  R- V- x& V
                        end;                        5 \* F1 |* h* X
                        newDirection(@);
: t+ ?+ S: t- x: ~+ e                        @.HasOrder := true;0 `" y# H* [2 \, J
                end;' {& w* X) f% s* O# P$ x" b- v
        end;
$ Q' M% C. a, `  tend;        -- of the method
/ @% @0 @4 |6 H  H1 ]8 K: n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 ]3 a& F1 l. t  q) y" A5 u! Y* K
这是AGV_putin中arrive的method。, X! L+ P5 {3 b+ v7 }9 r" `
& y7 a' c' l1 u0 m3 ?8 ~
当到达物料速度越高时,这个报警更多,
9 D3 _4 W+ J! @4 a+ v可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  e* R' o  g- K- B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ c+ o2 O; y: n" @
+ f9 W9 o1 B* g2 S
另外一个小建议,就是move,所有的move都可以这样5 {( }2 m- R) @0 A  u
if not move() then debug end3 z9 q( g1 }' Y) m9 Q/ b6 U" e( Z7 w5 Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  F6 K; O" v/ U; j. {plant simulation中的free libraries有AGV模板,
# j% a, L+ p5 n0 S$ o  ?& A里面也有案例。: L/ r0 f, T1 h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ E, [. D6 g; {  v, x7 n
1 _  V+ {- R+ |/ m9 Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( r/ i" Y1 [, p8 b- ]3 l( a: h" F' H  i3 \; o2 ]0 Y* O. N1 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
+ Q8 n/ V; `- N+ r这是AGV_putin中arrive的method。
  `, Y9 Z2 U' c
5 Q2 q5 g' E0 X% x9 q8 u5 {当到达物料速度越高时,这个报警更多,

* `' b" y1 ]% j$ H0 W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-18 02:48 , Processed in 0.018339 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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