Questions tagged [mathematical-optimization]
Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.
1,611
questions
2
votes
2answers
194 views
Find the maximum Z in {(X + Y)==Z} using all the digits 0-9 only once
II want to add two integers with different digits to get a third integer with different digits. At the end, all 10 digits have to be different. So there should be 10 digits in total. How you ...
3
votes
0answers
443 views
Using NMaximize to get integer results for a fractional programming problem
I have an optimization problem that I am trying to model in mathematica (wolfram cloud, to be precise).
Link to notebook for code described here: https://www.dropbox.com/s/4jet4t76fe5pysk/ReFormulate....
1
vote
0answers
75 views
Findminimum evaluates input for NIntegrate at non numerical value (NIntegrate::inumr:) [duplicate]
The goal is to minimise a functional in this case I want to find the input function, defined by its (many) values on a grid for which the functional attains its minimum. Below is a piece of code where ...
8
votes
1answer
179 views
Minimizing NExpectation for a custom distribution
As discussed and advised in Meta: Migrate a question..., I've copied a 2012 posted question from StackOverflow (posted before this site began running), which has gotten a lot of attention (but after 3 ...
2
votes
1answer
344 views
Using ouput of ParametericNDSolve as argument in NMinimize: NMinimize::nnum: function value not a number
I am trying to fit some experimental data and I am trying to use NMinimize function to calculate the parameters that fit the experimental dataset. I am also using <...
5
votes
4answers
869 views
Minimal overlap area of circles
I have 20 points in the 2D plane with $(x_i,y_i)$ coordinates.
I want to use Mathematica to optimally distribute 10 circles with equal radius of a given positive value $R$, i.e. to determine with the ...
6
votes
2answers
585 views
Techniques to find all local minima of black box function with n continuous derivatives?
I have a blackbox function f on [a,b] that is known to be continuous, and has n continuous derivatives. The function uses polynomial interpolations (but isn't a polynomial interpolation itself), so no ...
3
votes
2answers
457 views
Maximizing a function defined using NIntegrate [duplicate]
I have two functions fn[x,y,z] which is in integral form and I have another function gn[x,y] which is also in integral form ...
1
vote
1answer
546 views
Calculate Max-Min value and corresponding parameters
I have two functions funA and funB which are also functions a,b,x,and ...
8
votes
1answer
489 views
FindMaximum failing on a trivial problem [closed]
I am trying to solve a trivial optimization problem with FindMaximum but for some reason it is not going.
I reduced the problem down to the following non-working ...
2
votes
1answer
142 views
Numerical functions as constraints for NMaximize
I want to use NMaximize to solve a problem like this:
$\quad \quad \max_y f(y) \text{ subject to } \max_x g(x, y) \leq c.$
Rather than reproduce my (messier) ...
4
votes
2answers
892 views
Maximization in Mathematica using matrix and vector notation
I am trying to solve a simple maximization problem in Mathematica, using matrix and vector notation.
...
3
votes
2answers
401 views
In NMinimize, how can I efficiently handle NIntegrate errors for non-integrable functions?
I am using NMinimize to find parameters that minimise the integral of a function in the least squares sense:
...
4
votes
2answers
1k views
Linear Programming Using Dual Simplex method
I want to solve an optimization problem using the Dual Simplex Method. Although Mathematica gives the result directly when I use the command Minimize but I want to ...
1
vote
0answers
219 views
Solving a Nonlinear Optimization using Primal-Dual Interior point method [closed]
I want to solve an optimization problem using the Primal-Dual Interior Point Method. Although Mathematica gives the result directly when I use the command NMinimize,...
3
votes
1answer
330 views
Simulating an optimization problem
I have an optimization problem like below:
$\text{minimize } - \sum_k w_k \log r_k$
$ a \leq r_k \leq b_k, k = 1, \cdots, 10$
Here, $w $ and $b$ is a set of constant: $w = [w_1, \cdots, w_{10}]$ ...
2
votes
0answers
103 views
FindMinimum pre-conditioning
I am wondering about what kind of pre-conditioning FindMinimum performs on the user specified function (to be minimized) before the actual minimization starts, and ...
2
votes
1answer
252 views
How to find the local minimum points in the multi-dimensional numerical data?
I am trying to get some local minima of an n-dimensional function (which only has numerical form). For two-dimensional function data, we can find the local minimum points from the contour plot easily.
...
1
vote
0answers
67 views
Minimizing values of expressions dependent on more variables [closed]
I need to enforce seven expressions dependent on seven variables to be zero. However, the expressions are quite complicated and generaly I get a system of transcendental equations which only sometimes ...
1
vote
1answer
333 views
How to Minimize a Log/Linear function symbolically?
I have my objective function as :
$\hspace{25mm} \text{Minimize} \sum_k- \alpha_k \log_2 W_k$
$\hspace{25mm} \text{subject to}: 0\leq W_k \leq q', 0 \leq \alpha_k \leq 1 $
$\hspace{25mm} k =0,...
5
votes
1answer
232 views
Sparse Hessian for FindMinimum? Broken?
Is the sparse Hessian mechanism for FindMinimum[] (Method->"Newton") broken? Or am I simply not apprehending its proper setup? Here's what's happening.
Below is for solving the example problem ...
0
votes
0answers
121 views
Simplifying sums of rational trigonometric functions
After simplifying the trigonometric functions as advised before (cf. Simplifying Expressions for FindMinimum), I obtained a sum of 62 similar expressions, the first three as in the below:
...
1
vote
2answers
224 views
Doing same operation on multiple files
Is there a way in mathematica to do same operation on multiple files at once? And preferably have the output in a table or list form?
I want to do the following operation preferably in few non-labor ...
3
votes
1answer
913 views
Solve overdetermined set using Mathematica?
As shown below, this is a overdetermined system. Could you teach me how to find the optimized solution in Mathematica? I know it could be solved by the method of least square, but how to realize it in ...
5
votes
2answers
341 views
FindMinimum[] complains about values outside its constraints
The following optimization has a constraint that b<0, but it's failing because the integral diverges when it tries a small positive b.
...
7
votes
0answers
937 views
Visualizing the Lagrange Multiplier Solution
This question is based on work in Susan Colley's Vector Calculus, 4th ed.
The question is to find and classify critical points of $f(x,y,z)=3xy-4yz+5xz$ subject to the constraint $g(x,y,z)=3x+y+2z=13$...
4
votes
2answers
430 views
Coupled ODEs with parameters subject to optimization problem
I have an equation, but I donāt know how to program it in Mathematica:
x[0]==1; y[0]==1; x'[t]==(a+b) x[t] y[t]; y'[t]==a b y[t]/x[t];
where ...
5
votes
2answers
444 views
NMinimize Constraints on Interpolating Functions
I have the following piece of code and am trying to use NMinimize (the last line in the following chunk of code) to minimize ...
1
vote
1answer
230 views
How to repeatly use random number generator in optimization problem
I am looking to run the optimization problem. I already finish my optimization code as below.
...
5
votes
3answers
2k views
Extrema of a function of three variables
To identify and classify the critical points of the function $f(x,y,z)=x^3+xz^2-3x^2+y^2+2z^2$, I used the Hessian matrix method.
...
5
votes
1answer
455 views
Simple minimization not evaluating
I tried to solve a rather simple optimization problem, which Mathematica apparently cannot handle. A minimal example is the following:
...
3
votes
1answer
186 views
Simplifying Expressions for FindMinimum
I am currently trying to apply the FindMinimum function to find the lowest energy of an expression. My current expression as of now is relatively complicated. It is the summation of 48 similar terms, ...
1
vote
1answer
225 views
4
votes
1answer
270 views
NMinimize fails on Mesh?
Context
I want to identify the minimum of a solution of a PDE found on a mesh.
Problem
I do not understand why NMinimize fails on a mesh?
As a test case, consider:
<...
0
votes
1answer
45 views
How can I name to a saved file with the numerical values of some specific parameters? [duplicate]
I'm using some parameters to determine the elements of a list. I want to save this list with DumpSave, but I need to name it with its parameters.
For example, I use the following parameters
...
2
votes
0answers
137 views
Appropriate method for a Non-linear Optimisation Problem, With Linear Constraints, [closed]
I have a small non-linear, chess related, program with linear constraints and an objective function obtained from a polynomial probability generating function including some decision variables . At ...
11
votes
2answers
574 views
Efficient solution for a discrete assignment problem with pairwise costs
Let's consider a simple graph with N vertices, and a corresponding set of N items. The goal of the problem is to assign every item to a vertex on the graph so that sum of a per-edge (that is item-...
5
votes
1answer
640 views
Using ParametricNDSolve and NMinimize to find accurate interplanetary trajectory arrival periapse radius
I have an interplanetary trajectory simulation that calculates the required velocity (using a Lambert solver) and escape angle for a spacecraft to travel from Earth to Mars. This model does not use a ...
10
votes
0answers
4k views
Precision and accuracy in NDSolve and NMinimize
I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
7
votes
1answer
249 views
NMinimize Example from Wolfram Documentation Center
Here is the third example of NMinimize function from Wolfram Documentation Center at Possible Issues section.
...
8
votes
1answer
469 views
ParametricNDSolve[ ] and NMinimize[ ] in Combination
I have the following code that is used to simulate a spacecraft orbiting Mars, and uses ParametricNDSolve to vary the spacecraft's initial conditions using a parameter value ...
0
votes
1answer
76 views
Finding function by constraints
I have the following coefficient finding problem:
f[x] := a * Log[b*x + c] + d
Constraints:
f[0] = 1
f[80] = 0.5
I want to find the coefficients of f that ...
8
votes
1answer
822 views
Need help with the Lagrange multiplier method
Well I am new to Mathematica and got really stuck solving this problem.
In class, I was ask to use the Lagrange multiplier method to find the maximum and minimum value of $f(x,y) = x^2+y^2$ which ...
1
vote
0answers
378 views
Method used by NMaximize with a binary linear problem
I'm using Mathematica 7's NMaximize to solve a linear programming problem with thousands of 0/1 integer variables, thousands of linear constraints and a linear target. I suppose I could use ...
0
votes
0answers
128 views
Optimization over 6 vectors
Suppose I have an expression which depends on 6 unit vectors
(3 dimensional). Hence, I need to optimize over 12 parameters (every vector contains 3 parameters, but one we can reduce by considering ...
8
votes
1answer
540 views
NMinimize with NIntegrate (crash in symbolic evaluation, memory leak)
This is a "common" problem from what I've seen, but with a different spin.
I have a function I use often that finds a fit of an expression to another expression with some free parameters (e.g. for ...
5
votes
1answer
183 views
Question about FindMaximum
I must advise you that I am an almost total novice in mathematica.. However here is my very simple question..
I know the command FindMaximum[{f},{x}] to find the maximum point and maximum value of a ...
2
votes
1answer
163 views
Transforming an Optimization Problem into a multi-vector Optimization Problem
I am sitting on an MultiAgent optimization problem trying to solve for a quadruple of variables
{e,l,b,c}
In a single agent (...
8
votes
2answers
941 views
Finding the least positive integer satisfying a quantified statement
I'm studying the convergence of the sequence of functions $f_n:[0,1]\subset\mathbb{R}\to\mathbb{R}$ defined by $$f_n(x)=n^2x(1-x^2)^n$$ for $n\in\mathbb{N}$. These functions converge pointwise to the ...
1
vote
0answers
94 views
reset the value of a variable [closed]
Folks, I have a problem in populating a matrix without overriding the values. After performing computations for various values for j, I want to store these values in following matrix. Here is the code:...