# [R] Request for help in solving an optimization problem

Amarjeet Kumar k@m@rjeet21 @end|ng |rom gm@||@com
Thu Dec 23 16:39:40 CET 2021

```Dear All.

Warm greetings to you. I need help in solving an optimization formulation
in R software. I tried to solve it in excel solver but it was going up to
local minimum using GRG nonlinear solving method. I thought R can help in
solving this problem so I am explaining the problem in few sentences below:

The optimization problem is to determine weights for ranking six
alternatives(j) based on two attributes(i).

Y1 Y2

2 4

4 5

4 4

5 3

5 2

An aggregate performance function Pj is used to calculate jth alternative
performance to the ideal.

[image: enter image description here] <https://i.stack.imgur.com/JoM3B.png>

Pj is the aggregate performance of the jth alternative relative to the
ideal.

Sj is the relative distance between the jth alternative and the ideal in
terms of the aggregate performance given by

Sj = 1 – Pj

The problem is transformed to finding the set of weights Wi, i = 1, . . . ,
m, which produce the smallest total squared difference between the relative
performance of the alternative and that of the ideal.

Here the maximum value of each attribute is taken as the ideal (Y*). Ideal
for our data is (Y1*,Y2*)=(5,5)

Objective function :

[image: enter image description here] <https://i.stack.imgur.com/Yymud.png>

e is a small value greater than zero so that weights are not zero

After the optimal weights Wi , i = 1, . . . , m, are obtained, the relative
performance of the jth alternative is calculated as [image: enter image
description here] <https://i.stack.imgur.com/AqEqx.png>

The relative distance to the ideal is[image: enter image description here]
<https://i.stack.imgur.com/z3YlD.png> which is the basis of ranking. The
higher value means the alternative is away from ideal and hence ranks low.

I know that R has better capabilities to find solutions for this
optimization problem but, as I have no experience in R, I am unable to move
a step further. If you can find some time to help me in this regard I would
be very thankful to you for this timely help.