Gamultiobj with double summation help

  • MATLAB
  • Thread starter funyhony
  • Start date
  • Tags
    Summation
In summary: It may also be helpful to consult the documentation for the gamultiobj function to make sure you are using it correctly. In summary, it is important to carefully check your code and make sure all parameters and variables are correctly defined in order to successfully use gamultiobj or ga for your equation.
  • #1
funyhony
9
0
how can i use gamultiobj or ga, I've input of (i, j) matrix and i want (i,j) output

i've equation to solve with ga

f = sumation from i to class[ sumation from j to rows(yij * log(pij)))]
how to solve with ga


fun f = funGa1(Pij,Yij,class,rows)

f = - symsum(symsum(Yij*log(Pij),i,1,Class-1),j,1,rows)


and in other file

f = @(Pij)funGa1(Pij,Yij,Class,rows)

% 0 =< Pij <= 1
lb = 0;
ub = 1;

options = gaoptimset('PopulationSize',rows*class,'Generations',1000, ...
'Vectorized','on','PlotFcns',@gaplotpareto);
[x fval] = gamultiobj(f,class,[],[],[],[],lb,ub,options)

i've many many errors
like :

1- mtimes Inner matrix dimensions must agree
2- ? Error using ==> mtimes
Inner matrix dimensions must agree.

3- Error in ==> validate>@(x)fitness(x,FitnessFcnArgs{:})
at 136
fitness = @(x) fitness(x,FitnessFcnArgs{:});

and much more

please tell me what i can do
 
Physics news on Phys.org
  • #2
It looks like there is a problem with your code. It is difficult to tell what exactly is wrong without seeing the full code. You may need to review your code and make sure that all of the parameters you are passing in to the gamultiobj function are valid. Additionally, you should ensure that the variables you are using in your objective function (f) are correctly defined and that all of the matrix dimensions are compatible. Once you have reviewed your code and made sure that everything is correctly specified, you can try debugging the code to find out exactly where the error is coming from.
 

FAQ: Gamultiobj with double summation help

1. What is Gamultiobj with double summation?

Gamultiobj with double summation is a type of multi-objective optimization algorithm used in mathematical programming. It is used to find the best solutions for problems with multiple conflicting objectives, by finding a set of solutions that balance these objectives.

2. How does Gamultiobj with double summation work?

This algorithm works by generating a population of potential solutions and evaluating them based on a set of objective functions. It then selects the best solutions from this population and uses them to generate a new population. This process continues until a set number of generations is reached or a stopping criterion is met.

3. What are the benefits of using Gamultiobj with double summation?

The main benefit of using this algorithm is that it can find multiple solutions that satisfy different objectives, rather than just a single optimal solution. This can be useful in real-world problems where there are often multiple competing objectives that need to be balanced.

4. What types of problems can be solved using Gamultiobj with double summation?

This algorithm can be used to solve a wide range of problems, including engineering design, financial portfolio optimization, and scheduling problems. It is particularly useful for problems with multiple objectives that may be difficult to optimize simultaneously.

5. Are there any limitations to using Gamultiobj with double summation?

One limitation of this algorithm is that it can be computationally expensive, especially for problems with a large number of objectives. Additionally, it may not always find the globally optimal solution, as it is a heuristic method and not guaranteed to find the absolute best solution. It also requires careful tuning of parameters to ensure good performance.

Similar threads

Replies
1
Views
2K
Replies
10
Views
17K
Replies
9
Views
4K
Replies
10
Views
4K
Back
Top