ECJ-INTEREST-L Archives

January 2008

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Thu, 31 Jan 2008 14:32:30 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
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

ATOM RSS1 RSS2