Sender: |
|
Date: |
Thu, 31 Jan 2008 14:32:30 -0500 |
MIME-version: |
1.0 (Apple Message framework v752.3) |
Reply-To: |
|
Content-type: |
text/plain; charset=US-ASCII; delsp=yes; format=flowed |
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-transfer-encoding: |
7bit |
Comments: |
|
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
|
|
|