Subject: | |
From: | |
Reply To: | |
Date: | Thu, 31 Jan 2008 14:32:30 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
The parameter can be read at any time if you have access to the
EvolutionState. You can say:
int val = state.parameters.getInt(new Parameter("custom.BinInt-
size"), null);
But you shouldn't do this over and over again, it's expensive.
Instead, you should do it during your Problem's setup(...) method:
int val;
public void setup(EvolutionState state, Parameter base)
{
super.setup(state, base);
val = state.parameters.getInt(new Parameter("custom.BinInt-size"),
null);
... other parameter setup goes here ...
}
On Jan 31, 2008, at 1:55 PM, David vun Kannon wrote:
> I'm trying to modify tutorial 1 to create a BinInt problem that
> will allow the bit string to be interpreted as a concatenation of
> binary integers, for example, 150 bits = 30 5-bit integers. If I
> create a parameter
>
> custom.BinInt-size = 5
>
> where should I read this parameter to make it available to my
> evaluate function?
>
> Thanks,
> David vun Kannon
|
|
|