I tried to search what I want in the community but I don't understand how this question wasn't asked in the past or else I wouldn't have got the right search..
Okay so I have a source.. In it a table file(TableFileInput) containing 3 different types of entity is there for MU selection random and the TableFileInput. Firstly I'm unable to put an attribute here.. May be if somebody help me here to show what should I do to show these three entity with different colors. I don't want to duplicate entity as entity1,2,3 and change the graphical attribute.
Secondly after the MU's move I have a sorter. Now I want each colored item to go to a different path. So in the "exit strategy" of sorter I chose an exit file of "Method" and I'm getting an error there. So if somebody could kindly correct my code I'd be thankful. Below is the code..
is k: integer; do for k := 1 to TableFileInput.YDim loop if .MUs.entity.name(k):= "A" then @.move(Line) elseif .MUs.entity.name:= "B" then @.move(Line2) else @.move(Line1) end; next; end;
Instead of naming them I wanted to identify them with a color but didn't get how to do that. Hence I named them A, B and C.. But still it gives the error. In the table file I have different frequency of all three entity. Hence I assumed while writing .MUs.entity.Name(k) would mean a kth no. of MU..
Thank you in advance..
use "=" instead of ":=" to compare values
Exitfile could look like this:
if @.name = "A" then
elseif @.name = "B" then
Thank you very much.
But this creates more confusion to me. If we can do everything with 'entrance' and 'exit' "controls" and "exit strategy" 'blocking'..
why do we have sorter for?
Also will you kindly tell me the diffrence between "frequency" and "number" in the tablefile. What does that mean? I thought frequency 2,5,9 respectively meant that there will be 2 red color entity, 5 green color entity and 9 blue color entity coming to source.. Is it not so? Then what does "number" indicate?
Well anyway I'd appreciate if you could kindly help me understand how can I do this using a sorter to go them into different lines..
regarding your question about the difference between "frequency" and "number" you could have a look at this post
Since you still seem to be confused: the object "Sorter" is actually used for sorting MUs into a desired sequence, not for sorting them into different lines. This will always be done by the ExitStrategy, which is used to select one of many successor-objects.
Hope this helps a bit,