minimzing the expression to find the variables
Show older comments
i want to perform minimzation to get the values of variable,
i have the following given data:
a=[3.85094026548672, 18.1807706489675, 22.0685840707964, 22.036320058997, 22.0040560471976, 21.9833148967551, 21.9441371681415, 24.511430678466, 24.4791666666666, 24.45151179941, 24.4330752212389, 24.410029498525, 30.9112278761062, 36.1149520648967, 41.3163716814159, 45.2203171091445]
b=b=[957.522123893805, 962.831858407079, 948.672566371681, 923.893805309734, 899.115044247787, 883.185840707964, 853.097345132743, 824.778761061946, 799.999999999999, 778.761061946902, 764.601769911504, 746.902654867256, 739.823008849557, 736.283185840707, 730.973451327433, 729.203539823008]
lb_x=[3.8509,30.9112,63.4418,3.5698,3.2909,17.6254,0.2120,27.5857,65.7679,32.7733, 157.6696,67.318860619469, 64.4704092920354, 85.1124631268436, 128.037426253687, 152.502765486725]
similarly i have values for ub_x, lb_y, ub_y, lb_w, ub_w, reg1, reg2
for i = 1:numel(a)
r1 = reg1(i);
r2 = reg2(i);
expr = expr + w(r2) * (sqrt((x(r1)-a(i))^2 + (y(r1)-b(i))^2)) - w(r1) * (sqrt((x(r2)-a(i))^2 + (y(r2)-b(i))^2));
end
i want to minimize expr = expr + w(r2) * (sqrt((x(r1)-a(i))^2 + (y(r1)-b(i))^2)) - w(r1) * (sqrt((x(r2)-a(i))^2 + (y(r2)-b(i))^2)), in order to get the different values of x,y and w
for k=1:26
x.LowerBound(k)=lb_x(k);
x.UpperBound(k)=ub_x(k);
y.LowerBound(k)=lb_y(k);
y.UpperBound(k)=ub_y(k);
w.LowerBound(k)=lb_w(k);
w.UpperBound(k)=ub_w(k);
end
showbounds(x)
showbounds(y)
showbounds(w)
Kindly suggest a way to perform this minimzation
2 Comments
I don't understand the arrays reg1 and reg2. They must be index arrays of integers between 1 and 16 because you access components of x and y by using them. So is the order of the elements from 1 to 16 also to be optimized independently in these two vectors ?
Akhil
on 15 Jan 2024
Accepted Answer
More Answers (0)
Categories
Find more on Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!