How to get the Values of nonlcon in gamultiobj?

1 view (last 30 days)
Is it possible to get the c-value of the nonlinear constraints using gamultiobj while the algorithm is still running? I can access the scores of the objective Function by using an Outputfunction and the Score field of the State Structure. Is there a similar way for the nonlinear constraints? Or is there at least a possibility to say which points of an Generation satisfy the constraints (c-value is less or equal zero).

Accepted Answer

Alan Weiss
Alan Weiss on 13 Jul 2015
Currently, you cannot obtain the value of the nonlinear constraint functions as a field in the gamultiobj state structure in an output function. However, wasteful as it might be, you can access the population in the |state| structure, and calculate the values of the nonlinear constraints inside the output function.
Sorry.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Comments
HerrVader
HerrVader on 14 Jul 2015
Thanks, nice idea, but my function for the nonlinear constraints takes a lot of time to compute (about 25s to 60s) so it might be faster if I store the values and the Parameters of all calculated nonlinear constraints in a mat file and then attach the saved values to the corresponding scores of the objective function.
Alan Weiss
Alan Weiss on 14 Jul 2015
There might be another way to record the values. Take a look at this technique using nested functions. Some variant might work for you.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!