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

learn more… | top users | synonyms (2)

2
votes
2answers
248 views

Optimizing functions taking matrix arguments

I'm looking for general information on how to optimize matrix valued functions, I have the following function I'm looking to maximize (or figure out if this is possible at all). ...
1
vote
1answer
1k views

Using NonlinearModelFit to fit data with errors

Assume we have some data of measurements SeedRandom[9]; data = Table[{i,2*(1 + 5*RandomReal[])*Exp[-0.01*(1 + RandomReal[])*i]}, {i, {0, 100, 200, 400, 700}}]; ...
2
votes
0answers
157 views

Speeding up a numerical constrained quadratic optimization

I'm trying to solve a quadratic optimization problem in 35 variables, $\vec{α} = \left< α_1, \ldots, α_{35}\right>$: $$ \begin{aligned} &\operatorname*{maximize}_\vec{α}&&1.0\cdot ...
12
votes
2answers
574 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 ...
4
votes
0answers
361 views
2
votes
1answer
173 views

How can I change the MPS format in Linear Programming samples of Mathematica?

I am trying to play with some linear programming examples of Mathematica as ExampleData[{"LinearProgramming", "blend"}, "Equations"]. It gives me the MPS format of ...
4
votes
1answer
124 views

Minimize failing on a polynomial

Calling: Minimize[{-0.4877 - 0.1190 r^2 - 0.1885 r^4 + 2.9703 z - 0.5531 z^2, 0 <= z <= 3.5 ∧ 0 <= r <= 1.75}, {r, z}] returns ...
5
votes
1answer
227 views

FindMaxValue specifics

I'm using FindMaxValue to study the distribution of maxima of Abs[RiemannSiegelZ[t]] between consecutive values of ...
1
vote
1answer
158 views

List comparison in constraints for Minimize

I am trying to solve an optimization problem, a simplified version of which is as follows: ...
4
votes
3answers
370 views

How to find the minimum of this constrained expression?

Let $x$, $y$, $z$ be three nonegative real numbers and $x^2 + y^2 + z^2 = 5.$ Find the minimum of the expression $$E=\dfrac{1}{2}x^2 y^2 + y^2 z^2 + z^2 x^2 + \dfrac{96}{x + y + z + 1}.$$ I tried ...
3
votes
1answer
188 views

Distance between two functions satisfying a constraint

My problem is that I have two functions that are described as follows: ...
1
vote
1answer
175 views

How does FindShortestTour work?

How are FindShortestTour and the algorithms therewithin implemented internally? Also: Can I access some form of incremental, in-progress result during evaluation? ...
0
votes
1answer
628 views

How to find the global maximum of a function? [closed]

I tried the following but plotting the function clearly reveals that there is a global maximum around $r = 7$ (here $a = 0.53$) ...
2
votes
1answer
344 views

Inequalities with assumptions and constraints

I'm using Mathematica 8 I've been searching the net without luck for this specific solutions: Suppose I have an inequality f(x;M,m)>0 where I KNOW that M>4m and m>0. How can I let Mathematica know ...
1
vote
2answers
478 views

Area of the largest rectangle bounded by $y=x^2$ and the x-axis within the unit interval

I am trying to find the area of the largest rectangle (whose sides are parallel to the coordinate axes) contained in the region bounded by the graphs of $y = 0, y = x^2,$ and $x = 1$ using ...
5
votes
0answers
196 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 ...
2
votes
1answer
106 views

InterpolatingFunction with growing Domain

I want to find roots of a function that is very slow to calculate (the function itself involves a bunch of FindMaxima) so I interpolate the function in a region where I think it likely the the root ...
2
votes
2answers
247 views

NMinimize problem again

Following up my previous question which got great replies, I am now trying to do ...
8
votes
4answers
975 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 ...
0
votes
1answer
158 views

Alleviating a bottleneck involving a function call with symbolic derivatives

I have a bottleneck problem involving a function call with symbolic derivatives. I don't have much experience with Mathematica (or any dynamic language) and I'm certain that the way I've set this up ...
0
votes
1answer
285 views

What is the correct way to use NIntegrate inside the FindMinimum function?

I'm having minor issues with the FindMinimum function when using NIntegrate inside. The functions work perfectly well but I get ...
5
votes
3answers
1k 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 ...
2
votes
1answer
427 views

Problem using the DifferentialEvolution method of NMinimize [closed]

I have a function of 20 parameters, which 3 of the parameters are my physical parameters, and the others are pull terms to fix the errors. The goal is finding the global minimum of this function, to ...
13
votes
3answers
776 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 ...
0
votes
1answer
78 views
10
votes
1answer
1k 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: ...
0
votes
0answers
262 views

Mathematica, nested optmization [duplicate]

I want to use the solution of Maximize, defined as a function, in another function. Here's an example: ...
3
votes
2answers
132 views

Find condition under which variables fall away

I have a somewhat lengthy expression, looking like expr = 1 + x + b + Pi + 2*a Is there some way of generating a relationship between ...
6
votes
2answers
415 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 ...
1
vote
0answers
123 views

How to express this output in the form $X=A.x$?

This problem arose in my stereo vision project. I have two matrices: $$ A = \left( \begin{array}{ccc} \text{x1}*\text{p131}-\text{p111} & \text{x1}*\text{p132}-\text{p112} & ...
32
votes
7answers
2k views

Character edge finding

The following line of code finds the edge of a character: ...
1
vote
1answer
144 views

Seemingly simple optimization problem is slow

I'm trying to generate a demand curve numerically, given a utility function. The function for the demand is defined like so: ...
1
vote
1answer
421 views

Optimizing the fitting of Ordinary Differential Equation(NDsolve) involving interpolation functions

I am a newbie to this forum. I am trying to use NDsolve to solve some ODEs involving the interpolation function. Then, I will compare the fitted curve and data to determine the ODE coefficients. ...
1
vote
0answers
60 views

Using lists as optimization parameters [duplicate]

Possible Duplicate: Minimizing a function of many coordinates Suppose that the function $F[\vec{x}]$ computes a certain polynomial of the elements of the list $\vec{x}$. How can I use ...
2
votes
0answers
343 views

Numerically/Analytically Solving a System of Equations

I have $6$ functions $f_i(x,y,z)$, $(i = 1, \ldots, 6)$ in three variables $x,y,z$, and I would like to find a simultaneous instance of these variables, say $(x_0, y_0, z_0)$, such that $f_i(x_0, y_0, ...
2
votes
1answer
390 views

Restrictions problem

I tried to program a simple linear optimization model and don't know where my mistake lies. The function should be a sum over "t" and "z" from the product of two constants ("e" and "H") and the ...
2
votes
3answers
1k views

Determining the local extrema of discrete data [duplicate]

Possible Duplicate: Local max/min of Mathematica data sets If I have a continuous function f (for example ...
4
votes
1answer
221 views

Maximizing functions with Which statements

I'd like to be able to find the maximum value that my Capex function (see below) generates. This is a fairly simple function so I could just add it up but I have more complex functions of a similar ...
1
vote
1answer
672 views

How to find local minima of a multivariate function with singularity?

I am working on a logistic regression problem which requires minimizing a cost function J[{theta0, theta1, theta2}, X, y] to find the optimal value for fitting ...
2
votes
1answer
269 views

About high dimensional integrals

I want to be able to do high dimensional integrals like, (..naively I wrote it as this..) ...
8
votes
1answer
740 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 ...
14
votes
2answers
539 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 ...
2
votes
1answer
851 views

FindMaxValue and FindMaximum - how to find GLOBAL maximum and not just LOCAL maximum

I will not be able to provide a simple minimum working example here as this seems to be very specific. I have an interpolating function which I substituted into a PDE and then plot said PDE at a ...
7
votes
2answers
817 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 ...
3
votes
1answer
570 views

How to use mathematica to create school time-table?

I wonder if it is possible to use Mathematica for helping myself to create school timetable. I have a feeling that it requires quite simple optimization algorithm, but I have never been into ...
1
vote
2answers
176 views

Scalar product of two vectors have the least value

In geometry 3D, let $A(1,2,-3) $ and $B(-1,4,1)$ are two points. In the plane $(P):2x-3y+3z-17=0$, find a point $M$ such that the scalar product of two vectors $AM$ and $BM$ will have the least value. ...