How to get the Values of nonlcon in gamultiobj?

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

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

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.
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)

Asked:

on 13 Jul 2015

Commented:

on 14 Jul 2015

Community Treasure Hunt

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

Start Hunting!