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

learn more… | top users | synonyms (2)

0
votes
1answer
94 views

No Speedup Compiled Function in FindMinimum

The problem: I would like to minimize an objective function with respect to 12 variables. Minimization should be executed as fast as possible. Compiling the objective function increases the execution ...
0
votes
1answer
139 views

FindMinimum [] methods

Which algorithm is used when we do not use the option Method of FindMinimum[] function. FindMinimum[f,{x,x0}]
0
votes
0answers
39 views

How to manipulate lists to get only part of the value [duplicate]

This is really a question about manipulating the output of Maximize. I have a function of 2 variables, defined thus: ...
0
votes
0answers
41 views

How to fit ODE's coefficient, just like using NMinimize [duplicate]

I want to fit ODE's coefficients to a model. I tried using NMinimize, but it seems it does symbolic instead of numerical calculations. ...
5
votes
2answers
266 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 ...
2
votes
1answer
156 views

NMaximize and Conditional Loop

I have developed the following code that simulates a process that decays over time and then returns to its initial state periodically. When I pass a list of random integers in the interval $(1,0)$ as ...
3
votes
1answer
73 views

quadratic constraint feasibility

Suppose that $A$ is an $n \times n$ matrix, and I have observed some entries of $A$, say, $A_S$ ($A$ restricted on $S$) for some subset $S$ in $\{1,...,n\} \times \{1,...,n\}$. I want to know if it's ...
9
votes
1answer
289 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 ...
1
vote
1answer
135 views

Minimum value with two factors

Approximate the minimum value of $2e^{x-2}-6x+xe^{x-2}$. Is my input correct? If not can you please correct it? ...
1
vote
1answer
134 views

Maximize over permutations

I have a set $S=\{s_1,\ldots,s_k\}$ and would like to maximize a fixed expression over permutations of $S$: $\max f(x_1,\ldots,x_k)$ with $x_i\in S$ and $x_i=x_j\Rightarrow i=j$. Is there a ...
2
votes
2answers
359 views

Quadratic programming problem

I am trying to solve a (Sequence) Quadratic Programming (SQP) problem in Mathematica. Here’s the problem setup: ...
4
votes
1answer
324 views

Packing squares into a circle

I am currently trying to solve and understand a problem about packing the maximum of squares into a circle. What I am trying to do, is to calculate the maximum number of variable sized squares (with ...
18
votes
2answers
618 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 ...
7
votes
3answers
293 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[]: ...
1
vote
1answer
109 views

Function optimization errors

I have the following Mathematica code (Mathematica version 9): ...
1
vote
1answer
185 views

Linear Integer Programming with absolute values in objective function

I'm trying to solve a problem of the form $$ \left|a_{1,0}+a_{1,1} x_1 + a_{1,2}x_2\right| + \left|a_{2,0}+a_{2,1} x_1 + a_{2,2}x_2\right|\to\min, $$ where $a_{i,j}$ are real-valued coefficients and ...
11
votes
4answers
185 views

Constraint syntax compaction

Is there a more compact way to represent these constraints: NMaximize[{a+b+c,...
0
votes
1answer
170 views
0
votes
0answers
42 views

Calculate Shapely Shubic power index for larger datasets (enhance performance of code)

I want to calculate the Shapely Shubik Power Index for larger datasets. The code I have (from wolfram demonstration project) runs forever on my mac with a dataset of 15 elements, eventually my ...
1
vote
1answer
179 views

NMaximize problem

Could anybody explain to me why the following code fails ? ...
1
vote
2answers
290 views

Finding shortest non-zero vector $x$ satisfying $Ax=0 \pmod q$

Let $n$, $m$, and $q$ be positive integers (with $m > n$), and $A$ be a matrix over $\mathbb{Z}_q^{n \times m}$. Using Mathematica, I want to find the shortest non-zero vectors $x \in ...
0
votes
1answer
92 views

Random variation inside NMaximize

I am using NMaximize as following code. ...
9
votes
1answer
659 views

Multi-objective genetic algorithm in Mathematica?

Is there any implementation of a multi-objective genetic algorithm for Mathematica?
0
votes
0answers
88 views

Inconsistent results in fits from NArgMin

EDIT: Just realized I had misspelled "inconsistent." I'm using version 7.0. I'm trying to fit a (noisy) data set to a large-order polynomial. (Just for context: there isn't a model for the ...
7
votes
1answer
692 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 ...
2
votes
1answer
236 views

Finding a fixed vector which minimizes the pairwise distance between noisy elements in two unordered arrays

Let $A$ and $B$ be two sets of $d$-dimensional coordinates of comparible (though not necessarily equal length). For example, here we can set $d = 3$ and have normalized values like: ...
4
votes
1answer
93 views

Exiting FindMinimum when a condition is met

I want to determine if a function f[x] can take negative values. f is expensive to compute and ...
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 ...
3
votes
1answer
413 views

How to maximize a function over a rotation matrix?

I have list of pairs of points: $\{(x_i,y_i)\}_{1\le i\le n}$, $x_i \in \mathbb{R}^3$, $y_i \in\mathbb{R}^2$ and would like to optimize over a rotation $R \in SO(3)$, a translation $t \in ...
1
vote
2answers
142 views

Need an efficient method for finding certain matrices

I am trying to write a function which produces square matrices with certain characteristics. The function should have two inputs: number of the rows, n number of ...
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 ...
1
vote
1answer
106 views

Working precision for each variable

How can I define working precision for each variable individually for example: Maximize[x y< 100, {x, y}] where the working precisions for ...
0
votes
0answers
135 views

Non linear constrained interger Optimization

I need to maximize the equation below which is subjected to some nonlinear constraints Maximize hsum + isum + jsum + ksum + lsum + msum + nsum + osum ...
1
vote
0answers
71 views

NMaximize with matrix input

I defined function f[x_, fixed_] := {...}. Here x is an $M\times N$ matrix. I want to maximize $f$ with respect to $x$. I have ...
0
votes
1answer
243 views

Maximizing trig functions in Mathematica

Just to give some context, my motivation for this programming question is to understand the derivation of the CSHS inequality and basically entails maximizing the following function: ...
1
vote
2answers
216 views

Finding normals to a curve through a given point

I want to find x on curve $y(x)$, where curve $y(x)$ is perpendicular to point $(x_0,y_0)$. for this I minimize the distance between points $(x,y(x))$ and $(x_0,y_0)$, here's an example for point ...
0
votes
0answers
52 views

NMinimize and FindRoot Issues with System of Equations [duplicate]

I am trying to solve a constrained optimization problem with a system of transcendental equations and am running into issues with NMinimize. I have a system of equations (...
1
vote
0answers
116 views

Conditional solution for system of linear equations

I have a linear equation system Q.m = t, with m unkown and where Q has dimensions ...
3
votes
1answer
218 views

Using a user defined NormFunction in FindFit or NDSolve

I would like to use a different norm instead of the 2-norm in FindFit (Mathematica 9). For example, instead of using $$\sqrt{\sum (x_{\mathrm{model}} - ...
3
votes
0answers
127 views

Trouble with Minimize

Minimize[{t^2, 1 == 3*t + 16*u}, {t, u}, Integers] It does not give the solution t = -5 and u = 1. Am I missing something? The solution being known and ...
1
vote
1answer
118 views

Feasibility of Linear Program

I have a set of (real) linear equations/inequalities and I want to know whether they have a solution, and to find at least one. The goal is to do this quickly. ...
1
vote
1answer
198 views

using array elements in minimization

I have switched from mupad to Mathematica, however the syntax is completely different here. I want to ...
0
votes
0answers
63 views

Initializing Minimization [duplicate]

I am trying to implement a model predictive control scheme in Mathematica, e.g. I optimize input sequences by predicting future outputs. So every time I call the cost function it will simulate the ...
4
votes
1answer
175 views

How to solve this simple equation?

I want to minimize a quadratic equation, but Mathematica does not solve it and only rewrites the solution. I wonder if there exist any way I can skip the computation by hand (I can solve it using ...
2
votes
2answers
206 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). ...
0
votes
1answer
830 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
121 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 ...
10
votes
2answers
511 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 ...