NSGA II and objective function in matlab

In summary, the conversation discusses using the NSGA II algorithm in Matlab to solve a multiobjective optimization problem. The objective functions involve maximizing R and minimizing S, with constraints on the variable w. The speaker requests help with implementing their specific objective function in the code provided. They mention having difficulty modifying the code and being new to Matlab.
  • #1
Tilfani
12
0

Homework Statement


I would like to solve a multiobjective optimization problem with NSGA II using matlab. The code can be found here https://www.mathworks.com/matlabcen...a-ii-a-multi-objective-optimization-algorithm
I'm looking for a help to implement my objective functions in this code.
The variable is w, while c, b and are known array vector. And Rm is a scalar
Sigma is (n,n) matrix with n=30

Homework Equations


Max R = w'c + w'bRm
Min S = w'Sigmaw
s/t sum(w) = 1 and all elements of w are ranging between -1 and 1.

The Attempt at a Solution


I request use the code in the link to solve the above objective function
 
Physics news on Phys.org
  • #2
.I have tried to modify the objective function in the code but it's not working.I'm a beginner in matlab and need help to get my objective function running.
 

FAQ: NSGA II and objective function in matlab

What is NSGA II and how does it work?

NSGA II (Non-dominated Sorting Genetic Algorithm II) is a multi-objective optimization algorithm used in engineering and computer science. It is based on the concept of evolution and natural selection, where solutions (individuals) compete and reproduce to find the most optimal set of solutions. It uses a non-dominated sorting technique to rank individuals and maintain a diverse set of solutions.

How do I implement NSGA II in Matlab?

To implement NSGA II in Matlab, you can use the built-in function gamultiobj. This function takes in the objective function, decision variables, and constraints as inputs and returns the Pareto front of optimal solutions. You can also customize the algorithm by specifying parameters such as population size, crossover and mutation operators, and number of generations.

What is an objective function and how do I define it for NSGA II?

An objective function is a mathematical function that represents the goal or objective of the optimization problem. In the context of NSGA II, the objective function is a multi-dimensional function that takes in decision variables and returns a set of values that represent the fitness of the solution. It is important to define a realistic and relevant objective function for a successful optimization with NSGA II.

How do I evaluate the performance of NSGA II in Matlab?

To evaluate the performance of NSGA II in Matlab, you can use the paretofront function. This function takes in the solutions generated by NSGA II and returns a logical vector indicating which solutions are on the Pareto front. You can also plot the Pareto front to visually assess the diversity and convergence of the solutions.

Can I use NSGA II for single-objective problems?

Yes, NSGA II can be used for single-objective problems. In this case, the algorithm will still generate a diverse set of solutions, but they will all have the same fitness value. However, it is recommended to use a single-objective optimization algorithm for such problems, as NSGA II is specifically designed for multi-objective optimization.

Similar threads

Back
Top