Profile Picture

Optimization Farm

Posted By erockenbach 6 Years Ago
Rated 5 stars based on 1 vote.
Message
Posted Wednesday January 05 2011
RE,

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.


Edited: Wednesday January 05 2011 by erockenbach
5 stars.
Posted Thursday January 06 2011
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


It's not possible because there is an internal Initialize method on the OptimizationPlugin class that RightEdge calls. It passes an interface that allows the class to call back into the RightEdge machinery for running systems. So you can't run it outside the RightEdge application. It would be nice if you could but that won't happen any time soon.

Still, I think you should be able to get an optimization farm working. You can write an optimization plugin that pull jobs from the queue, run them, and report them back. Sure, the RightEdge user interface will be shown if anyone is logged in, but you should be able to automate it so that you don't need any manual input for everything to work. Is there anything preventing this from working for you?

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems