Ga does not find the optimal value
Mostrar comentarios más antiguos
Hi Matlab comunity after I tried fmincon:
I now tried ga to solve my problem with integers
x=ga(@(x)fAraucoMarkt(x,AraucoEnergy),4,[],[],[],[],LB,RB,@(x)bedMarkt(x,AraucoEnergy),[2:4]);
I guess it works but I do not get the optimal solution:
x=ga(@(x)fAraucoMarkt(x,AraucoEnergy),4,[],[],[],[],LB,RB,@(x)bedMarkt(x,AraucoEnergy),[2:4]);
Optimization terminated: average change in the penalty fitness value less than options.FunctionTolerance
but constraints are not satisfied.
Is there anyway to get a better solution (I was thinking of random starting numbers and than a list of all found solutions) but as I can not define start point I do not know how to get this.
And while I am at it I had an nonlinear eauqlity constrain which was like this
ceq(1)=Restschuld-0;
I was thinking in changing it to a inequality constrain Restschuld is smaller than 1 and bigger than -1
but I dont know how to do this any idea?
Anyone an Idea
Greetings
Erik
2 comentarios
Walter Roberson
el 4 de Mayo de 2022
Restschuld is smaller than 1 and bigger than -1
Those would be bounds constraints, which you would store in LB and RB
Erik Beste
el 4 de Mayo de 2022
Respuesta aceptada
Más respuestas (1)
I was thinking in changing it to a inequality constrain Restschuld is smaller than 1 and bigger than -1
"When intcon is nonempty, nonlcon must return empty for ceq. For more information on integer programming, see Mixed Integer ga Optimization."
1 comentario
Erik Beste
el 4 de Mayo de 2022
Categorías
Más información sobre Solver Outputs and Iterative Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
