Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.

learn more… | top users | synonyms (2)

53
votes
2answers
3k views

Shaving the last 50 ms off NMinimize

The epilogue: A paper where the below answer is used was published. The answer below is cited among the references:) The background: I have to fit an objective function for ~10 000 datasets in near ...
32
votes
4answers
6k views

How to find all the local minima/maxima in a range

I want to find : all local maxima in range all local minima in range From those points I can interpolate and combine functions upper and lower boundary. What I am really interested in, is the ...
31
votes
7answers
1k views

Character edge finding

The following line of code finds the edge of a character: ...
27
votes
5answers
1k views

Identifying critical points of 2/3D image/cubes

Upshot I am interested in identifying critical points of a 3D field/cubes (maxima, minima, tube-like and wall-like saddle points) and 2D field/image (maxima, minima, saddle points). I.e. the ...
18
votes
2answers
622 views

Optimization with assumptions

I have the following problem, when I am trying to optimize function with pre-defined assumptions. I am using Mathematica 8 and I wrote the following simple code ...
15
votes
1answer
442 views

Obtain approximate Hessian using FindMinimum

According to the documentation, when FindMinimum is told to use the method "QuasiNewton" on a unconstrained problem, it uses the ...
15
votes
2answers
365 views

Schedule programing problem with integer linear programming

I know how to model this question on paper, but I don't know how doing it in Mathematica. Imagine , there is a university student who want to choose courses for this semester and he got the ...
14
votes
2answers
502 views

How can I speed up the classic GA for graph coloring?

I'm trying to compute the chromatic number of this graph (which is 28): g = Import@"http://www.info.univ-angers.fr/pub/porumbel/graphs/dsjc250.5.col"; My genetic ...
13
votes
3answers
702 views

Strategies to avoid LessEqual::nord in NMinimize?

When using NMinimize on functions with complex intermediate expressions (but a real end result), quite often one gets the error ...
13
votes
4answers
2k views

Finding Local Minima / Maxima in Noisy Data

I'm trying to find local minima / maxima in noisy data, consisting of data values taken at certain time intervals. Ideally, the function should take a pair of lists (one containing time values and one ...
12
votes
4answers
2k views

Minimizing a function of many coordinates

I'm trying to obtain a series of points on the unit sphere with a somewhat homogeneous distribution, by minimizing a function depending on distances (I took $\exp(-d)$). My points are represented by ...
11
votes
4answers
185 views

Constraint syntax compaction

Is there a more compact way to represent these constraints: NMaximize[{a+b+c,...
11
votes
2answers
145 views

Rotational Averaging of Image Periodograms (FFTS)

I'm writing a code to do rotational averages of image FFT's. I have a working version but it is pretty slow. Wondering if anyone has any thoughts on a way to do this more efficiently. Data looks ...
10
votes
1answer
950 views

Combined numerical minimization and maximization

I want to numerically calculate the maximum of a function defined by the minimization of another function, like the following: ...
10
votes
2answers
750 views

Maximizing a function with assumptions

Using f[s_] := Log[(s/r)^α ((α - 2) n0 r^α + 2 π Pmax ρ r^2) /((α - 2) n0 s^α + 2 π Pmax ρ s^2)]/s When I run the following line: ...
10
votes
1answer
153 views

How to work with Experimental`NumericalFunction?

This question is intimately connected with previous one: "How to create internally optimized expression for computing with high WorkingPrecision?" Oleksandr R. correctly states in the comment: A ...
10
votes
2answers
513 views

Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function?

I have a black-box multiargument multiparametric function of the type SRD[dataPoint_List,params_List] which accepts experimental data along with the parameters of ...
9
votes
3answers
326 views

Strange domain dependency with Maximize

I'm using Mathematica 8 and strangely enough this code: Maximize[{x*(1-0.01 x),x>0},x,Integers] produces the result ...
9
votes
3answers
355 views

FindShortestTour for charity (or: How can I optimize meal delivery with FindShortestTour?)

I've been wondering about this for a while - but never got around to asking - until I saw faleichik's incredible answer to Mathematica Minecraft. I did some work at a not-for-profit a little while ...
9
votes
1answer
292 views

ParallelEvaluate for function minimization

Is there a parallelized version of a minimization routine available in Mathematica? The objective function is non-linear and the gradients have to be numerically computed. Every function evaluation ...
9
votes
1answer
668 views

Multi-objective genetic algorithm in Mathematica?

Is there any implementation of a multi-objective genetic algorithm for Mathematica?
8
votes
3answers
864 views

Which ColorFunction should I use to get such a gradient of blue-cyan-green-yellow-orange-red?

I want to get the effect in the above Figure. Here is my code: ...
8
votes
1answer
225 views

Efficiently filling area with disks located at certain points

Starting from a set of points, I want to fill an area using disks. Each disk's center should be one of the points and the disks should not overlap. I've managed to write a function that, given a list ...
8
votes
3answers
229 views

How can I complete a correlation matrix with missing values?

I would like to complete a correlation matrix with missing entries, such that the resulting matrix is positive semi-definite. Say I want to find some x and some y in the next matrix that satisfy ...
8
votes
1answer
1k views

Solve Lagrange multipliers optimization problem

I have two nested solid figure, where $V(a,h,\tau)$ defines the volume and $A(a,h,t)$ defines the surface. The outer solid figure is parametrized in $a_s$,$h_s$ and $t_s$ (they share a common center). ...
7
votes
2answers
777 views

Implementation of a new Game of Life Rule

I need to implement a new "game of life" in Mathematica: I have three states — black, red and white. Black means go forward, red go back and white take no action. I would like to implement the ...
7
votes
4answers
618 views

NMinimize usage

I would like to minimize functions including the following. NMinimize[{1 - (1 - 1/n)^x - x/n, n > x, x > 1}, {n, x}] However Mathematica complains about ...
7
votes
3answers
296 views

Cannot find the maximum value of a function

Consider the following function: $a Sin(x)+b Cos(x)$ I tried to obtain the maximum value of this function using MaxValue[]: ...
7
votes
1answer
701 views

Minimization by Nelder-Mead

Finding a global minimum for this problem (non-linear optimization by the Nelder-Mead downhill simplex method) may not be possible, but by finding local minimum, I am expecting the value of the ...
7
votes
1answer
644 views

How to speed up Minimum Spanning Tree algorithm?

How to speed up MST algorithm? I work with graphs and I have adopted Prim's algorithm for my needs, from here. The graphs which I use are very dense (number of vertexes: $V=500$ and every vertex is ...
7
votes
2answers
488 views
7
votes
3answers
229 views

How can I efficiently check if a graph is unit distance?

A unit distance graph is a graph that is embeddable in the plane so that every edge has length 1. ...
7
votes
1answer
482 views

Using Mathematica to help to determine the consistency of and numerically solve systems of non-linear equations

The formal problem The question I am about to ask is applicable to many scientific and engineering problems. In short, I am bout to ask for pointers and practical advice for Mathematica beginners who ...
6
votes
2answers
126 views

How to Maximize[Log[n]^(1/Log[n]), n]

I am new to Mathematica and am trying to work out how to use Maximize. Maximize[Log[n]^(1/Log[n]),n] Should give a solution at $e^e$. However in Mathematica you ...
6
votes
1answer
357 views

Defining a non-linear optimization-problem

Consider the following non-linear optimisation problem: ...
6
votes
2answers
344 views

Built-ins for discrete ArgMax or ArgMin?

Wondering whether there are discrete versions of ArgMax / ArgMin, that is, something that will find the part of an expression at ...
6
votes
1answer
264 views

Numerical problems with calculation of function

I have a problem with a calculation which I try to do with Mathematica (8.0.1). I have the following function which describes a cone (with half opening angle ...
6
votes
1answer
328 views

Mathematica vs Sigmaplot (Non LinearModelFit)

I asked a question in a previous post that was closed because "The title of the question is not correct and the issue here is too trivial to help anyone later". NonLinearModelFit It's possible ...
6
votes
1answer
645 views

Linear programming with many variables and parameters

I am trying to reconstruct the answer that is given in this report. (page 153 in Appendix B; Section B.2.1). They are given variables, parameters, constraints, and the objective function to minimize. ...
5
votes
3answers
874 views

Travelling salesman with start and end points for 30 points

I am doing a route optimisation for delivery vehicles and failing dismally. Please see problem statement below. My current solution uses FindShortestTour, but this does not have defined start and end ...
5
votes
2answers
335 views

What alternative notation of subscripts/superscripts that are also treated as SYMBOLS in Mathematica?

I tried to avoid using the subscript $A_0$ in the Module, and get an error with $A[0]$. ...
5
votes
2answers
267 views

Optimum number of cog teeth for two step helical gearbox

Note: Cross-posted at http://community.wolfram.com/groups/-/m/t/137895?p_p_auth=8QnKtT9I. I am to design a two step gearbox. The first step is to choose the number of teeth in each cog wheel in ...
5
votes
2answers
127 views

Numerical Optimization Methods

I am curious if any one has comments on "specific characteristics" of a problem that will deem it to be best solved by a specific optimization method such as ...
5
votes
1answer
301 views
5
votes
1answer
167 views

Fitting Vogner's formula for phyllotaxis to the image of a flower

After having read this question I was inspired to investigate how we could take an image of a plant displaying phyllotaxis and fit Vogner's model of phyllotaxis to the image. The theory is very ...
5
votes
1answer
196 views

FindMaxValue specifics

I'm using FindMaxValue to study the distribution of maxima of Abs[RiemannSiegelZ[t]] between consecutive values of ...
5
votes
0answers
66 views

Experimental`NumericalFunction in NMinimize solution

I try to make a number of optimizations using this code: ...
5
votes
1answer
231 views

Simulated Annealing Convergence

I am using Simulated Annealing method for a simulation based optimization of a process that has 3 variables, using NMinimize. I print the input/output during every ...
5
votes
0answers
132 views

Issue with FindCurvePath

I have a problem with the function FindCurvePath. In some cases it crashes the Mathematica 9 Kernel. Here an example, where it crashes the kernel: ...
5
votes
0answers
182 views

Speeding up multilinear PRA branch-and-bound algorithm with worst-case exponential time scenario with respect to basic events

The algorithm is a branch-and-bound algorithm that calculates dominances for PRA, probalistic risk assessment. The task was to find faster ways to do it in numerical software such as Matlab but we ...