I'm attempting to run optimization scenarios outside of the RE shell and thought from the class files that this was achievable. There are many reasons one might want to do this such as creating a optimization farm where you store the jobs in a db/queue and have a windows services pick up the jobs and deliver it's status back to a centralized point for larger jobs. I'm familiar with starting RE from command line, etc through params and this is not what I want... very clunky for my needs.
Here is what I have tried thus far.
1. Serializing the SystemRunSettings object into a byte array and storing it in the db (this works)
2. From a seperate WPF application deserialize the bytes back into a SystemRunSettings object and bind a TimeFrequency object. (this works)
3. Instantiate a modified DefaultOptimizationPlugin from WPF (this works)
4. Attempt to call down to RunSystem (from RunOptimization) with my WPF.exe as my shell (this fails)
In debug I get an object reference not set to an instance of an obejct in the base (OptimizationPlugin) class when calling RunSystem(settings, callback) from OUTSIDE the RE shell. I've even tried placing the wpf .exe into the plugin bin and also into the directory path where RightEdge.exe lives to no avail. The SystemRunSettings object is fully populated after deserialization with the SymbolList, Frequency, SystemParameters, SimulationDates, AccountValue, etc. When I try to run it INSIDE the RE shell from deserialization of bytes from the db it works.
If you have a valid license agreement I don't understand why this isn't possible. If this can be done anyway WITHOUT using the RE shell please let me know.
I've gotten as much as I can out of the RE optimization plugin and I just don't like the fact that I need an interface at all to run jobs... it seems pointless when you have a 10 server farm, etc.
Thanks in advance.
Wednesday January 05 2011 by