You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, ConstrainedFitnessAL works by taking in a constraints function in its constructor. I have a situation where I'm not able to provide this function, but am able to provide the constraint values during the call to ConstrainedFitnessAL. Would it be possible to amend ConstrainedFitnessAL so that it is able to work in the way seen below?
al=cma.ConstrainedFitnessAL(fitness_function) # Doesn't require the constraint functionpenalised_fitness_values=al(solutions, constraint_values) # Accepts the already calculated constraint values
Additionally, I can also imagine an even more black box situation, where the fitness function is not known either. Perhaps, ConstrainedFitnessAL could also be adapted for this situation (see below)?
al=cma.ConstrainedFitnessAL() # Doesn't require fitness function or constraint functionpenalised_fitness_values=al(fitness_values, constraint_values) # Accepts precalculated fitness and constraint values (probably without the need for x values)
Thanks
The text was updated successfully, but these errors were encountered:
Thanks for the suggest! Issue #258 looks to be related.
To my understanding, cma.ConstrainedFitnessAL is meant to be a callable fitness wrapper around cma.constraints_handler.AugmentedLagrangian. That is, if you don't want a callable fitness, you probably don't want to use cma.ConstrainedFitnessAL in the first place. Hence, you probably want to check out how to use the underlying cma.constraints_handler.AugmentedLagrangian, maybe along the lines of this code.
Currently, ConstrainedFitnessAL works by taking in a constraints function in its constructor. I have a situation where I'm not able to provide this function, but am able to provide the constraint values during the call to ConstrainedFitnessAL. Would it be possible to amend ConstrainedFitnessAL so that it is able to work in the way seen below?
Additionally, I can also imagine an even more black box situation, where the fitness function is not known either. Perhaps, ConstrainedFitnessAL could also be adapted for this situation (see below)?
Thanks
The text was updated successfully, but these errors were encountered: