My question is do I need to create a text file for each of the cell that I would like importing or is there a workaround to this like putting all the cells that I need to be imported into one text file and perhaps create variables tell JaamSim which position to use?
Right now I have tried using the FileToVector object (importing a text file that has one value) and without using include statements in the cfg file. However I am failing to get the .Value property of FileToVector object (when it is read into the ExpressionEntity) but from the output window it reads the file.
Thanks very much Harry! That cleared things up well! This FileToVector object is really useful!
Regarding your other question, the FileToVector and FileToMatrix objects will re-read the data file when they receive an entity. The solution is to generate an entity at time zero and send it to the File object.
DiscreteDistribution can only accept fixed values for the probabilities. Use the UniformDistribution object to select a random value between 0.0 and 1.0 and compare that value to your probability for branching.
I'm not sure how to sample different random numbers as I'm not sure how to link the UniformDistribution object to sample everytime an entity passes through.
I've used the generating and sending an entity to the object logic but I failed to sample. I've attached the file, please advise on how to sample the UniformDistribution.
Regarding the comparing, would the following expression fit to be in the Choice section of the Branch object:'[UniformDistribution1].Value <[BranchingPercentage1].Value ? [EntitySink1]:[EntitySink2]'
I would like to have the Attribute of my entity to be changed (when it is at a server) only if the the value of UniformDistribution (the random number) is less than some variable X. All entities start with Att_Contact_Age of 30 and depending on the random number, Att_Contact_Age will change to 4.The following is what I tried but failed.Object : Assign1AttributeDefinitionList: {Att_Contact_Age 30}AttributeAssignmentList: { '[Random].Value <[X].Value ? this.obj.Att_Contact_Age = 4 : this.obj.Att_Contact_Age = 30'}
Sorry for bombarding you with messages!
Regarding your other question, the FileToVector and FileToMatrix objects will re-read the data file when they receive an entity. The solution is to generate an entity at time zero and send it to the File object.