|
Hi all,
I have a text file named WF.txt and it has the following data:
Job Task Cores ET Depend
1 1 5 10
1 2 15 25 1
1 3 10 15 2
1 4 20 10 2,3
These are specifications for workflow jobs stored in WF.txt, I have simulated a queueing model in SimEvents. I have an entity generator with the attributes matching the text file's headers i.e. Job, Task, etc..
I've designed my model to have the entitiy generator placed before a matlab embedded function, and what I want to be able to do is extracting one row from the text file for each generated entity at a time and then assign the right value for the right attribute.
For instance I want my first entity to be like this:
Job = 1; Task = 1; Cores = 5; ET = 10; Depend = '', and for the second entity to have it as follows: Job = 1; Task = 2; Cores = 15; ET = 25; Depend =1.
I'm not sure whether it's best to use Embedded Matlab Editor or Function, as for the latter it requires me to do something with eml.extrinsic. The other minor issue here is for 'Depend' as it can have multiple values like in the last row, how can I then assign those to an entity attribute inside SimEvents, adn what format do you suggest for it?
Many thanks you guys and looking forward your comments :-).
________________
Tiger
|