Tagged Questions

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

488 views

Finding a point from a set of contours such that it is nearest to a given point

I have several contour lines and one point. How can I find a point in one of those contour lines which is nearest to the given point? ...
45 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. ...
377 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 ...
97 views

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 ...
761 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 ...
160 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? ...
291 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 ...
945 views

I am trying to solve a (Sequence) Quadratic Programming (SQP) problem in Mathematica. Here’s the problem setup: ...
981 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[]: ...
156 views

Function optimization errors

I have the following Mathematica code (Mathematica version 9): ...
666 views

Is there any fast way to solve a quadratic matrix equation in Mathematica approximately?

Let the square nonsingular matrix $M$ is a given convergent matrix. What are the best scalar values for $\alpha$ and $\beta$ (in the real numbers domain), at which the following quadratic matrix ...
384 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 ...
205 views

Constraint syntax compaction

Is there a more compact way to represent these constraints: NMaximize[{a+b+c,a <= 5 && b <= 5 && c <= 5...
824 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 ...
337 views

A problem on generating convex hull

For example, I typed the following: ...
459 views

NMaximize problem

Could anybody explain to me why the following code fails ? ...
320 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 ...
503 views

496 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 ...
197 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 ...
202 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. ...
71 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 ...
219 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 ...
777 views

using array elements in minimization

I have switched from mupad to Mathematica, however the syntax is completely different here. I want to ...
1k views

Can I use GoogleMap or other GPS data in creation of the Graphs?

I have following graph. ...
125 views

How can I say that all quantities need to be positive (and real)? [duplicate]

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 ...
3k 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}}]; ...
527 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). ...
327 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 ...
331 views

Why my Mathematica 9.0.1 wont work with some samples of Mathematica in Graph Theory?

Bug introduced in 9.0 and fixed in 10.0 FindMinimumCostFlow is introduced in 9.0. I updated my Mathematica recently to 9.0.1 cause the previous version was ...
46 views

How can I assign EdgeCost for the graph edges? [duplicate]

Here is my code: ...
888 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: ...
534 views

...
261 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 ...