EBo
unread,Feb 2, 2015, 12:39:58 PM2/2/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to deap-...@googlegroups.com
While it is not the most pythonic way of doing things, since it is a
once up front type of thing, they could be set as globals, or part of a
variable init/return. Anyway, this is something that you *could* try,
but if one of the developers gives you a cleaner way I would go with
that.
On Feb 2 2015 10:25 AM, Jia Xu wrote:
> Hi,
>
> I looked through the docs and it's not clear to me how one might pass
> additional arguments to the fitness function. In my problem these
> arguments
> are constant and only need to be passed in at the start.
>
> I tried registering the evaluate function with additional parameters:
>
> problem.register("evaluate", fitness_function, param1, param2)
>
> And:
>
> fitness_function(x, param1, param2)
>
> But this does not work. What should I be doing?
>
> Best
> Jia