Model not starting

All topics specific to modeling questions in Enterprise Dynamics
ptelleria
Posts: 16
Joined: Wednesday 06 July, 2016 - 13:35

Model not starting

Post by ptelleria »

Hi:
I have this model (to do my tests) which it is refusing to start for no reason...Clicking on "Start" does not start the timer, nor the simulation.
Could someone point me in the right direction?
Thanks!
Attachments
Test1-ControlFork.mod
(372.7 KiB) Downloaded 263 times
Pedro
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Model not starting

Post by HarryBunnik »

Hello Pedro,

I think that the problem is, that you have an ArrivalList (Muelle4) that is not filled. There is an empty table, which means that the arrival list is trying to create 0 products on time 0, over and over again. If you fill it with more realistic data, the model is starting.

Cheers,

Harry
ptelleria
Posts: 16
Joined: Wednesday 06 July, 2016 - 13:35

Re: Model not starting

Post by ptelleria »

Hi Harry,
Great thanks! Works now.
The arrival list is reminiscent of reading it from Excel, so I've just deleted it.
By the way, I am trying to pick 2 atoms with AdvancedTransporter_PickAtom.
However, when it picks the first atom, the dispathcer assigns the "Send To" (which I've put equal to "label([destination])=:first(c)" in the AT) immediately, so the channel referred by "in(2,c)" in the AGV points to the destination, and not the trigerring queue. How can I reference the triggering queue? ¿do I need to create a variable in the AT to store it? ¿or create a dispatch table in the queue?
The goal is to sort products in the queue, so that if 2 products have the same destination, they are ordered to by picked up consecutively. I already have to code working for this, and only the AGV pickup strategy is missing (as well as dispatching to the closest AT, including the distance to finish the current assignment).
Thanks!
Pedro
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Model not starting

Post by HarryBunnik »

Hello Pedro,

Good that it works now :-)

As far as your wish goes to pick up 2 products only if they go the same destination; that is not so simple. I will need to look into that one a bit deeper, since I'm not sure if the dispatcher is accepting that.

Cheers,

Harry
ptelleria
Posts: 16
Joined: Wednesday 06 July, 2016 - 13:35

Re: Model not starting

Post by ptelleria »

Hi Harry:
Sorting the queue is no problem. And putting code in the AT on entry to pick another is ok. But if its just the next product, then there will be a conflict as the dispatcher creates a dispatch task.
I've tried with PickAtom and PlaceAtom, fine if called from AT, but can't get the references right if from the queue, even though I pass the correct AT as the i.
Trying now to put a Server with Batch=2 or a Reservoir (with upper 2 and lower 0) after the queue, but if you have an idea pointing to the simplest route I'd appreciate it.
cheers
Pedro
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Model not starting

Post by HarryBunnik »

Ha Pedro,

I ran into some other problems, since I didn't want to use an additional server. But when that works for you, it's better :-)

As far as your code for the nearest AGV goes (is that what you mean with simplest route?), I've made a small adjustment to your code, which I think should help you further. What you have to do is find the correct row (node to which the queue is connected) in the distance table. I've done that using:

Code: Select all

  Var([atmPickUpLocation], vbAtom, in(2, cs)),
  Var([valNodeRow], vbValue), 

  valNodeRow := TableFindValue(
     rank(5, atmNetworkController), 
     ptv(atmPickUpLocation), 
     1,
     2
   ),
If you then use the valNodeRow when searching for the flag, it should work.

I hope that was what you meant.

Cheers,

Harry
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Model not starting

Post by HarryBunnik »

Ha Pedro,

I've reduced your model to only one AGV for time reasons on my side, but I've created a model in which the AGV is picking up 2 products. If using the server is working for you, then that is the easier and faster solution, but I wanted to show that it is possible.

The problems lies in the combined usage of the Pick and Place, and the connection of the Queue's to the Dispatcher. This way one product can get several tasks and the combined picking of the 2 products becomes very complicated.
  • What I would do, is to disconnect to queue's from the dispatcher, similar to what is done in the example models.
  • Create a table in which you keep the administration of products that are offered. In this table you can then easily search if other products are available.
  • Only using the Pick and Place functions
  • I've moved some of the code from the OnEntry of the Advanced Transporter to the ForkLiftControler and expanded it.
Test1-ControlFork vHB.mod
(170.26 KiB) Downloaded 228 times
The controls are a bit more complicated, but you have a lot more flexibility over what is going in the model this way. Also it is then possible to control how and when more products have to be collected.

As said, it's just to show you a different approach. There is still some work left to do, so using the server is the easier and faster solution ;-)

Cheers,

Harry
ptelleria
Posts: 16
Joined: Wednesday 06 July, 2016 - 13:35

Re: Model not starting

Post by ptelleria »

Hi Harry!
Thanks for the piece of code and for the model. I'm trying to stay away of managing the dispatch table. Your model works, but it requires some work to adapt to 16 incoming queues in 4 zones, and up to 20 ATs.
I am trying to pick two atoms (for the moment, of any destination, the sorting will be done putting 3 queues behind the main one, and with a dispatch to from the main queue based on a rule of the label of the atom).
I am trying to store in a table of the AGV the destinations of the picked atoms. But as you can see in my sample model, I can't set the value with

Code: Select all

cell(1,2):=1
for example!!
The idea is:
1-use the dispatcher to send tasks to AT
2-AT picks up atom and OnEntry:
stores in it's table the destination of the atom
unchecks attribute to load automatically
issues PickAtom command to pick the next one from the queue
3-The send to is to: cell(content(c),2), where the destination is supposedly stored
4-On unloading the last atom, the OnExit checks the load automatically, so that the AT gets called by the Dispatcher

The issue I am facing (other than storing a value in the AT table) is that when the OnEntry is triggered, the atom isn't really in the AT !! So when the PickAtom is issued, the Atom gets cloned!

Does it make sense? Would this approach work, being simpler than maintaining a dispatch table?
Attachments
Test2.mod
(318.34 KiB) Downloaded 215 times
Pedro
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Model not starting

Post by HarryBunnik »

Ha Pedro,

It's indeed more work, although by smart programming you can win time in the end. But it's always difficult to estimate when you start a model if it is worth the extra initial effort.

About the cell value:
  • The table of the AT has only 2 rows and 1 column, so by writing it into cell(1 {Row}, 2 {Col}, c) := 1 won't work.
And about the "cloned" atom:
  • I see what you mean. The AT is, once the PickUp is created by you, already busy with delivering the just received atom. And those 2 processes are colliding.

    What you can try is to use again a Folklift controler, create the pickup there using the 1st event and make sure that you DestroyEventsOfAtom(i {Reference to AT} , 7) as well (that is the delivery event). Also see the model that I posted before. Perhaps that you also have to set the Att([DestAtom]) as I did there.
I would think that should overcome this problem. If not, we have to look a bit further.

Gr. Harry
ptelleria
Posts: 16
Joined: Wednesday 06 July, 2016 - 13:35

Re: Model not starting

Post by ptelleria »

Bang, I'll shoot my head for the col2 !!!

Thanks Harry for the tip on DestroyEvents.

I'm getting there...I am trying to use the dispatcher and turning on/off the autoloader, together with DestroyEvents...but it seems that the Events are not triggered really secquentially as they're created, as DestroyEvents takes some time to be processed (calling it OnEntery at the AT), and the atom is picked up, but later disappers.

I'll resort to a custom made Forklift controller, but store the tasks in the ATs (which is what I am trying for the above situation), instead of a master table. The tasks calling the ATs are sorted beforehand in different queues.

In that manner, I'll also tackle the other question I have on the forum, which is unanswered.

cheers
Pedro
Post Reply