mathematical-optimization

Pareto Optimal Front

旧街凉风 提交于 2019-12-10 00:01:12
问题 I am trying to obtain the pareto optimal front for the two fitness functions. I sorted the undominated solutions by using a dummy matrix that allocated "ones" in the matrix for any undominated solution. When I plot the pareto front it keeps including points that I know are not part of the pareto optimal. However, I cannot seem to find the cause of this problem. Any help would be really appreciated. for i = 1:1000 f1(i) = x(i,1)^2; f2(i) = (x(i,1)-2)^2; end store = zeros(1000,1); for i = 1

Optimization to find complex number as input

隐身守侯 提交于 2019-12-09 18:12:05
问题 I am wondering if there is a C/C++ library or Matlab code technique to determine real and complex numbers using a minimization solver. Here is a code snippet showing what I would like to do. For example, suppose that I know Utilde , but not x and U variables. I want to use optimization ( fminsearch ) to determine x and U , given Utilde . Note that Utilde is a complex number. x = 1.5; U = 50 + 1i*25; x0 = [1 20]; % starting values Utilde = U * (1 / exp(2 * x)) * exp( 1i * 2 * x); xout =

Java Library? - Simplex / Linear Programming / Optimization [closed]

感情迁移 提交于 2019-12-09 06:51:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm looking for an optimization library. My two requirements are that it does not use JNI and that it does not have license restrictions preventing it from being used on multiple computers commercially. The only one I've found that meets these requirements is Choco, but it is unusably buggy. 回答1: Since I couldn't

Minimize maximum manhattan distance of a point to a set of points

限于喜欢 提交于 2019-12-09 04:39:19
问题 For 3 points in 2D : P1(x1,y1), P2(x2,y2), P3(x3,y3) I need to find a point P(x,y) , such that the maximum of the manhattan distances max(dist(P,P1), dist(P,P2), dist(P,P3)) will be minimal. Any ideas about the algorithm? I would really prefer an exact algorithm. 回答1: There is an exact, noniterative algorithm for the problem; as Knoothe pointed out, the Manhattan distance is rotationally equivalent to the Chebyshev distance, and P is trivially computable for the Chebyshev distance as the mean

Algorithm Optimization - Shortest Route Between Multiple Points

余生长醉 提交于 2019-12-09 04:21:34
问题 Problem: I have a large collection of points. Each of these points has a list with references to other points with the distance between them already calculated and stored. I need to determine the shortest route that begins from an origin and passes through a specific number of points to any destination. Ex: I'm on vacation and I'm staying in a specific city. I'm making a ONE WAY trip to see ANY four cities and I want to travel the least distance possible. I cannot visit the same city more

Why does FindMaximum with Newton's method complain it can't find a sufficient decrease in function?

痴心易碎 提交于 2019-12-08 21:00:31
Firstly, this seems like (from ContourPlot) a fairly straightforward maximization problem, why is FindMaximum with Newton's method having problems? Secondly, how can I get rid of the warnings? Thirdly, if I can't get rid of these warnings, how can I tell if the warning is meaningful, ie, maximization failed? For instance, in the code below, FindMaximum with Newton's method gives a warning, whereas the PrincipalAxis method doesn't o = 1/5 Log[E^(-(h/Sqrt[3]))/( 2 E^(-(h/Sqrt[3])) + 2 E^(h/Sqrt[3]) + E^(-(h/Sqrt[3]) - Sqrt[2] j) + E^(h/Sqrt[3] - Sqrt[2] j) + E^(-Sqrt[3] h + Sqrt[2] j) + E^(Sqrt

Getting Exit-Flag: 0,2 with SQP algorithm of fmincon Matlab function

懵懂的女人 提交于 2019-12-08 11:39:27
问题 I have a large scale multi objective optimization problem to solve with fmincon solver of Matlab . I tried different solver to get a better and faster output. Here is the challenge: I am getting Exit Flag: 1,0,4,5 for different Pareto points ,as it is a multi-objective optimization problem, with Active-set algorithm . Then I tried to check different algorithms like interior-point and sqp for generating the Pareto points. I observed that sqp returns few exit flags 1 , some 2 and few 0 but not

Optimization in R for multiple variables

霸气de小男生 提交于 2019-12-08 09:48:41
问题 I want to solve an optimization problem in R; The dummy data for the same is given below. # Input Data DTM <- sample(1:30,10,replace=T) DIM <- rep(30,10) Price <- 100 - seq(0.4,1,length.out=10) # Variables that shall be changed to find optimal solution Hike <- sample(0:1,10,replace=T) Position <- sample(-2:2,10,replace=T) # Objective function hikes_till_now <- cumsum(Hike) - Hike PostHike <- numeric(10) for (i in seq_along(Hike)){ PostHike[i] <- 99.60 - 0.25*(Hike[i]*(1-DTM[i]/DIM[i])) if(i>1

Faster Algorithm to Tailor Given Mathematical Expression [duplicate]

两盒软妹~` 提交于 2019-12-08 08:04:29
问题 This question already has answers here : How can I find the minimum index of the array in this case? (3 answers) Closed 9 months ago . Is there a more optimized solution to solve the stated problem? Given an array 'arr' of 'N' elements and a number 'M', find the least index 'z' at which the equation gets satisfied. [ ] is considered as floor(). Code: counts=0 ans=0 while(ans==0): s=0 for i in range(counts,len(arr)): s+=int(arr[i]/(i+1-counts)) if(s>M): break if((i+1)==len(arr) and s<=M):

network directed graph optimization package in R

╄→尐↘猪︶ㄣ 提交于 2019-12-08 06:56:23
问题 I have used R package lpsolve in past, but feel that it is not perfect for my current problem. I want to optimize below problem. I have nodes and links as depicted in the diagram. I start from new york and I want to ship fruits to customer on day 4. Each node consist of 4 parts: physical location, item, site type, time. You can say that node name is combination of above 4 fields. I can take 2 paths. My objective is to meet the customer demand and to send all fruits to sink at minimum cost.