how we know my optimized result is correct
Afficher commentaires plus anciens
I want to know how can i check my optimized result is correct,yeah i know constriants and objective function but i don't know my lower and upper bound or intial guess values,it is just assumptions value for every different objective function ,getting different results. can you please tell me how to check optimized result is correct.
also ,when i use GA for same lb and ub at same constraints value,every time it gives different results,how can i know which result is correct
3 commentaires
Walter Roberson
le 10 Sep 2019
Is the question whether the fval that is returned is correct for the returned vector? Is the question whether all of the constraints are met? Is the question whether the point that is located is the global minima ?
ga() uses random generation of points. It is expected that it might give different results. You can compare the fval associated with each result to find the best solution. However if each time you get a result that is not pretty much within floating point tolerance of the other results, then that tends to hint that the function has a lot of local minima, and that means chances are good that you have not found a global minima.
RAHUL KUMAR
le 10 Sep 2019
Walter Roberson
le 10 Sep 2019
As we have not seen your code, we as outside observers have no reason to think that the objective function could not go negative.
If a negative weight does not make sense for your physical situation, then one of the following is true:
- Your equations are wrong; or
- Your constraints (bounds, linear inequality, linear equality, nonlinear inequality, nonlinear equality) are wrong; or
- You used integer constraints and tried to specify constraints that are not compatible with integer constraints and overlooked the warning message that said that the other constraints would be ignored
Réponses (0)
Catégories
En savoir plus sur Solver-Based Nonlinear Optimization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!