the source object itself has an internal pointer for processing the tablefile you define. so as SIMULATOR already said, you cut off the branch where you are sitting on.
In your case, you have to create your own "source object" using for example a station.
use a method which is called by the init method for starting the creation of MUs.
This method could look like:
var part : object repeat for var j := 1 to TableFile["Quantity", 1] loop waituntil station.empty part := TableFile["Object", 1].create(station) part.name := TableFile["Type", 1] next tablefile.cutRow(1) until tableFile.YDim=0 // all rows are finished // now you can copy new rows from other tables // and continue creating the parts // remember: you have to stop as soon as all tables are empty
With this you should be able to solve your problem.
This concept is excatly what i want.
Can i apply this concept parallel for all 3 sources.so all source can create part from different table at same time.How can i do this?
Thanks in advance
For sure, you can assign the method for creating the parts to each "source" object. As soon as a 'source' has processed the complete tablefile, call a central method , let's call them 'dispatch'.
The dispatch method looks for a tablefile with the maximum number of entries and copies some of the entries to the tablefile which is empty. So dispatch should have the calling 'source' as parameter.
Hope this helps.
sorry i did not get your point. you suggest that "assign the method for creating the parts to each "source" object". when we assign method(for create part) to the entrance control of source than how can activate that method.Because when we activate this method after source can create part according to tablefile.At the start, NumMu is 0 for source.so how can we activate that method
attached you will find a Plant Simulation 14.0 model implementing the described behavior.
Hope this helps.