I face a strange problem in my simulation. It's about the loading of a transporter. A transporter is created on a track. Subsequently, I load the transporter by means of a method (exit control of a buffer in front of the track). However, the transporter is completely full with 200 parts (its capacity) immediately after its creation, while the buffer in front of the track has no entries at all (!?).
This is the method:
Transport := .MUs.Transporter;
Does anyone know this problem and knows how to solve it?
The problem is that you load the Transporter in the library, instead of the instance.
I would expect code like this:
Or, if it is a control, just @.
Thank you for your quick reply!
However, I don't really get it (I'm sorry). I understand that I load the transporter in the library, but how do I define 'Transport" if the I create the transporter by means of a method?
Can you upload your model? Or a small excerpt model of what you try to achieve?
I would also suggest that you check some of the examples that come with your installation. There you can learn about Entrance controls, for instance.
There may be another simple way to achieve your goal: use an Assembly object to merge a Transporter with (a fixed number of) MUs.
Ok, I can give you some simple suggestions.
First of all, I would use another Source to create the Transporter. Set "Time of creation" to "Number adjustable". As MU set: "*.MUs.Transporter". Connect this Source to the Track with a Connector.
Secondly, let the Transporter trigger the moving of MUs. So, get rid of all methods, except the OnSensor method of the Track. Change the source-code of the method to something like the sample below. You can find the method under the User-defined attributes tab of the Track.
Tip: use a breakpoint to check the method when the simulation runs, by pressing F9 when you edit the OnSensor method.
(SensorID : integer; Front : boolean)
do@.stopped:=true; for local i:=1 to Buffer.numMU loopBuffer.MU(1).move(@);next;@.stopped:=false;
Thanks for your reply.
I cannot use a source for the creation of the transporters, because the transporters are created according to a detailed and complex schedule which cannot be accomplished by the source.
I tried your sensorcode, however I then get the following error: "A void cannot accept the method move"...What am I doing wrong?
Isn't there a possibility to just move parts onto a transporter by a method???
Ok, second attempt!
Now I will go with your logic:
Since your Transporter in the class library conatins many MUs, first get rid of them. Right mouse click, Show structure, then select each MU and delete it.
In general, the suggested code is not the best solution. Moving MUs to a transporter is in most cases something occuring at a specific location. And the start of the transfer is triggered by the arrival of MUs, and require both source and target ovjects to be available at the specified point.
I really appreciate your help, but it is not working.
The transporter now just moves on without waiting/stopping for parts.
Maybe I can solve it by a transfer station, however, with a transfer station I have the following issue:
Using a transfer station, the transporter only departures when it's full or when a given number of parts is reached. However, I want to let the transporter departure according to a time schedule. Is is possible to load parts onto the transporter until that time is reached, and subequently let the transporter departure at that given time (it is irrelevant if there are 10 or 150 parts on it)?
If you create a transporter with create, the method create returns a link to the created object. This link you can use to stop the transporter, load the transporter and start the transporter at a given time, you need to replace the stuff in the brackets:
Transport : object;
Transport := .MUs.Transporter.create(track, <position>);
for i:=1 to <quantity> loop
waituntil eventController.simTime >= <startTime> prio 1;
freelance simulation specialist