String and Boolean as StrategyParameters
Author: Gamba
Creation Date: 3/8/2012 2:03 AM
profile picture

Gamba

#1
Hi,

is it possible to use Strings and Booleans as StrategyParameters?
I want to change a string-value in the SP dialog and sometimes a bool-value.

Thx
Gamba
profile picture

Eugene

#2
profile picture

LenMoz

#3
Revisiting this - yes, string parameters. For instance, my strategy may use alternate input(s) or produce output(s) for which I might specify a path name. Or, I may want to choose from multiple neural network names w/o having to recompile ), or worse, duplicate my entire strategy.

I'm sure there are many more uses. Just because you don't think of a use doesn't mean it's not worth pursuing. Eugene, you are very quick to dismiss others' ideas, imho.
profile picture

Eugene

#4
If it looks like I dismiss ideas, I do this for business reasons and due to technical concerns. There are only two releases in a year but the bug queue is never empty, and it takes effort to lobby for real enhancements. Despite that, even reproducible crashes can exist for months and years to everyone's annoyance.

This change does not seem possible for many technical reasons (can't put a string on a slider, no room for strings in the Straps box, potentially breaking 3rd party optimizers, etc.) and you do have the workaround of hardcoding strings into Strategies. So, rephrasing Henry Ford, “People can have the Strategy Parameters in any type – so long as it's Double.”
profile picture

Cone

#5
It's very simple using the current architecture.

CODE:
Please log in to see this code.
profile picture

LenMoz

#6
Eugene, it's not that you just dismiss the idea, it's that you have to take a shot at the author as well. Your "for real enhancements", with "real" emphasized, was not lost on me. Go work on some bug fixes. The list is way too long.

Cone, thanks.
profile picture

mjj3

#7
What I think would be really useful for this is to have a StrategyParameter overload that accepts a enum type.

For example: Parm1 = CreateParameter( typeof(EnumName), ShowNameFlag);

The optimization will iterate through each enum value and gives the option of displaying the string value of the enum in the optimization report (ShowNameFlag). i.e. Enum.GetName( typeof(EnumName), EnumValue )

This would be hugely useful and make optimizations more readable.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).