Hi Harry,
If I'm interpreting your statement properly, I don't think this gives quite the capability that I'm looking for. I think you are saying that the expression system will support changing numbers that are provided as Strings into actual numbers (Integer, Float, Double, etc) objects for use in performing math operations. I'm looking for something that just carries the String along as a String data object within the SimEntity' attribute list.
I have created a fork off of the main JaamSim GitHub project where I'm working in that direction. (
https://github.com/pixelpshr/jaamsim, timestamped-record branch) In there, I've created a few new objects. Initially, I created the FileToStringVector and FileToStringMatrix objects, based on your guidance provided earlier in this message thread. These now appear in the BasicObjects palette.
I'm currently working on a new objects, datatype/TSR.java and datatype/TRSList.java. TSR.java is the TimeStampedRecord object, which contains a javafx.util.Pair.Pair<ZonedTimeStamp, String> private member. The TSRList.java is, obviously, a List of those objects.
I think I've got most of the code working to read a time-stamped record text file into the TSRList, but I'm still having trouble extracting the Value of the list elements. I expect to be working on this in the coming week.
My ultimate goal is to be able to read a list of timestamped records, either at the start of the simulation, or when the "FileToTSRList" object is encountered by a SimEntity. The TSRList would then be used to generate new SimEntities when the Simulation Time passes the timestamp for the record, probably with a variant of the System or EntityDelay object. The new SimEntity would hold a copy of the TSR as an attribute and, minimally, print it to an output file when the EntityLogger object is encountered. In the longer term, the SimEntity would take different branches within the simulation, depending on the contents of the TSR.
I hope that clears up what I'm trying to do. Maybe you can see a better way to pull this off!
Thanks,
Thom