Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.
2
votes
2answers
78 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
0answers
38 views
How can I say that all quantities need to be positive (and real)?
Can you say at the beginning of a script in mathematica that you want all the quantities to be positive (and real)? So that in all calculations, only the real values of these quantities will be ...
0
votes
1answer
42 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
51 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
350 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 ...
2
votes
0answers
91 views
Why my Mathematica 9.0.1 wont work with some samples of Mathematica in Graph Theory?
I updated my Mathematica recently to 9.0.1 cause the previous version was giving me freaky result especially in FindMinimumCostFlow and ...
4
votes
0answers
75 views
When using NMinimize[…,Method->“DifferentialEvolution”] is an “iteration” different than a “step”?
Hopefully this question has a simple answer. I have the following bit of code:
...
0
votes
0answers
46 views
Does setting FindMinimum constraints improve efficiency? [closed]
I am a newbie and this my first post.
I am using the FindMinimum function to minimize a function of between $19$ and $35$ variables and I do this about $200$ times ...
0
votes
0answers
33 views
2
votes
1answer
115 views
0
votes
0answers
80 views
Minimize multivariable function with respect to one variable [closed]
I'm trying to minimize a user function. It's signature is, ptrans[n_, k_, h1_, h2_, fm_, em1_, f_, t0_]. I want to minimize it with respect to ...
5
votes
1answer
320 views
Multi-objective genetic algorithm in Mathematica?
Is there any implementation of a multi-objective genetic algorithm for Mathematica?
2
votes
1answer
93 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
73 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
121 views
FindMaxValue specifics
I'm using FindMaxValue to study the distribution of maxima of Abs[RiemannSiegelZ[t]] between consecutive values of ...
1
vote
1answer
60 views
List comparison in constraints for Minimize
I am trying to solve an optimization problem, a simplified version of which is as follows:
...
1
vote
1answer
140 views
How can I fit a matrix function with multiple variables to given eigenvalues?
I have a 5x5 matrix function H[kx]
...
3
votes
3answers
220 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
...
1
vote
0answers
172 views
Methods for NonlinearModelFit
I am using NonlinearModelFit for a thesis project.
I get quite different results if I change the Method to LevenbergMarquardt or QuasiNewton or ConjugateGradient ...
0
votes
0answers
79 views
Function Nodal2`NodalNetwork is not evaluating [closed]
I am using a default package Nodal2.m for nodal analysis of a Voltage Controlled Current Source, but it's giving the same statement back in output instead of Y ...
3
votes
1answer
97 views
Distance between two functions satisfying a constraint
My problem is that I have two functions that are described as follows:
...
10
votes
4answers
337 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
57 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
0answers
32 views
How can I increase the number of iterations for NMinimize? [closed]
How can I increase the number of iterations until convergence is assumed for NMinimize? Why does it strictly quit-out after 100 iterations?
0
votes
1answer
85 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$)
...
0
votes
1answer
90 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
162 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 ...
4
votes
0answers
97 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 ...
7
votes
1answer
141 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 ...
42
votes
2answers
2k views
Shaving the last 50 ms off NMinimize
The background:
I have to fit an objective function for ~10 000 datasets in near real time (with near real time being on the order of about 10 seconds). I compile the huge objective function, so that ...
0
votes
0answers
52 views
2
votes
1answer
77 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 ...
-1
votes
1answer
127 views
Minimization problem using FindMinimum. Functional value “is not a real number”? [closed]
This question is a follow-up of another one I asked a few days ago. I followed the instructions given in the answer provided by the user that responded. I modified that answer to solve another ...
1
vote
2answers
125 views
NMinimize problem again
Following up my previous question which got great replies, I am now trying to do
...
7
votes
4answers
191 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
87 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
76 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 ...
0
votes
0answers
21 views
Error Handling with LinearProgramming and Aborting subsequent evaluations
I am using a inbuilt LinearProgramming solver to perform an optimization. It is essentially solving a matrix equation and searching for a solution that maximizes a ...
2
votes
3answers
123 views
How can I name “a[[i]]” the parts of Table “a”? Or how to make Table “a” grow inside FindMinimum?
Let's say I want to minimize a function that uses a Table named a with the Conjugate Gradient Method of ...
5
votes
3answers
370 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
141 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 ...
12
votes
3answers
488 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
53 views
0
votes
0answers
156 views
NonlinearModelFit and NMinimize [closed]
I'm doing a non-linear fit on some data. The calculation residual is low, but I prefer to minimize another objective function such as:
...
2
votes
0answers
137 views
Minimization in mathematica [closed]
I have recently had a strange problem with NMinimize. I have a very huge function with respect to 20 parameters. When I ...
8
votes
1answer
496 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
48 views
Mathematica, nested optmization [duplicate]
I want to use the solution of Maximize, defined as a function, in another function. Here's an example:
...
5
votes
0answers
194 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 ...
3
votes
2answers
90 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
161 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 ...





