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

learn more… | top users | synonyms (2)

0
votes
0answers
39 views

Contour plot plotting problem [on hold]

I was trying to make a contour plot with the following code and it is giving me error message: ...
1
vote
0answers
106 views
+50

Solving mixed integer programming using Mathematica

Let $x_{ij}$ be an $n\times k$ matrix defined as follows: $ x_{ij}=\begin{cases} 1, & \text{if }s_i\text{ is assigned to }S_j \\ 0, & \text{otherwise } \end{cases} $ and $S$ is a set of $k$ ...
-1
votes
0answers
46 views

Non Linear Optimization [closed]

I want to NMaximize an expression for example, say $f(x_0,x_1,\dots)=x_0+x_1+2 x_2+...$ subject to the constraints $(x_1+x_1^2+x_2+x_3 ...
1
vote
0answers
37 views

NMaximize stops evaluating my function when run in parallel

I am trying to maximize the results of a Monte Carlo simulation with respect to some input variables. ...
0
votes
0answers
46 views
0
votes
1answer
89 views

How to differentiate a geometric sum [closed]

How do I differentiate both sides of the equation shown below with respect to r?
5
votes
0answers
200 views

Problems extending NelderMeadMinimize into 2D

Update The eventual route I followed was to adapt a version of the NM-simplex written in C and link to it with MathLink. Once I've tested this out fully I'll post it here. I've been playing around ...
11
votes
2answers
379 views

Find maximum value of interpolation function - obviously wrong result

Minimizing and maximizing interpolation function has already been asked and answered, see here for example. Yet, I observe a strange behaviour. Well, I can understand that the wrong guess of ...
3
votes
0answers
61 views

Efficient processing of Special Ordered Sets with LinearProgramming

I'm playing with integer linear programming, especially problems involving lots of constraints which would appear to be special ordered sets. Below is a toy example, three last rows of the matrix ...
5
votes
0answers
51 views

Listable compiled functions used in NMinimize

This is an example from MMA: cListable = Compile[{x}, (x-1)^2, RuntimeAttributes -> {Listable}] In case of single entry: ...
7
votes
1answer
918 views

Linear programming with many variables and parameters

I am trying to reconstruct the answer that is given in this report. (page 153 in Appendix B; Section B.2.1). They are given variables, parameters, constraints, and the objective function to minimize. ...
9
votes
0answers
133 views

Can code optimize code?

Are there functions, programs or packages that deal with optimizing mathematica code i.e. re-writing ineffecive or convoluted code. -This question has haunted me since I joined SE. The background for ...
2
votes
1answer
77 views

How to build a list of constraints for NMinimize

Let's say I have aset = {-1, 0, 2}. I would like to create a variable Var that takes values from that set, i.e. ...
1
vote
2answers
101 views
1
vote
0answers
70 views

Optimization in Mathematica [closed]

There is a R package called TIMP. By this package someone can fit data to a model. There is a GUI for TIMP called Glotaran. When I fit my data by this package it does not take so much time to get the ...
2
votes
1answer
60 views

How to minimize a list of data points?

I have a list called diff1: ...
1
vote
1answer
120 views

Finding the minimum of a function

I asked this question Mark Minimum Value in DensityPlot. Another question has come up, or better said, a task: Find the minimum of a function. I haven't been able to write the needed code for that, ...
2
votes
0answers
48 views

Maximizing Large Multivariable Function over Region with Parameter Constraints

Brand new Mathematica user here. I have a complicated function to maximize, and thought I would try software like Mathematica instead of taking derivatives by hand. I found some Mathematica ...
2
votes
1answer
88 views

Minimizing a function with some restrictions

I need help in finding a way to minimize a function with some complex constraints. I'm not an expert in this field, but I'm still trying to understand if I can do something with my problem. So, ...
17
votes
1answer
283 views

How to work with Experimental`NumericalFunction?

This question is intimately connected with previous one: "How to create internally optimized expression for computing with high WorkingPrecision?" Oleksandr R. correctly states in the comment: A ...
1
vote
1answer
80 views

Manual maximum likelihood estimation of a mixture with no closed form

Let $X$ be a random variable that is from a mixture of two Lognormals (Lognormals(mu1,sigma) and Lognormals(mu2,sigma)) and set $Y=X_1+X_2+...+X_{10}$ a sum of 10 random variables from this mixture. ...
0
votes
0answers
49 views

how to solve an optimization problem in terms of matrices as the argument

How can I minimize an expression of the form a^T A a where a is a matrix. The following approach does not work if ...
0
votes
1answer
48 views

Solving minimum length confidence interval problem

I'm trying to find the minimum length of a confidence interval for the variance from a sample iid with normal distribution. I tried ...
2
votes
0answers
82 views

Convex optimization

I am playing with some Compressed Sensing (think single pixel camera) applications and would like to have a Mathematica equivalent of a Matlab package call Convex Optimization (CVX). Specifically, I ...
4
votes
0answers
135 views

Simulated Annealing Parameters and Results

I am using SimulatedAnnealing method for a simulation based optimization problem and was wondering if someone can enlighten me on the following features: Is there ...
0
votes
0answers
29 views

What is that Root[…] inside the answer represent? [duplicate]

So I am encountering this situation, in which mathematica doesn't give me the answer, but in a form of "Root". How do I interpret this ? what is the number after the "&" represent? How should I ...
1
vote
2answers
116 views

Minimize loop optimization

I'm new in Mathematica 10. So far, I have a two variable-function and I've use Minimize to find the optimal solution. Nevertheless, I'd like to make a sensibility analysis and study how this optimal ...
0
votes
0answers
80 views

FindMinimum slower in MMA10

I've recently updated one of my PCs (both have the exact same build) to Mathematica 10. After running the exact same notebook (which has two FindMinimum calls) on ...
7
votes
2answers
211 views

Using least independent rectangle area to separate every point

Description I want to add vertical line and horizonal lines between data to make every point have an independent rectangle area. In addtion, every independent rectangle has a number ...
0
votes
1answer
58 views
1
vote
0answers
52 views

on convergence in optimization [closed]

I am trying to solve a nonlinear programming problem using FindMinimum solver on Mathematica. When I execute, it is printing FindMinimum::eit: "The algorithm does not converge to the tolerance of ...
1
vote
1answer
55 views

2D Arrangment/Optimization Problem

Okay, I have a list of angles, call it A. How would I arrange them in a 2D m-by-n grid G such that the distances between each adjacent angle-element (row- and column-wise) is minimized? G has as ...
4
votes
4answers
247 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 ...
1
vote
0answers
87 views

Speeding up NDSolve for system of differential equations

I am wondering if there is a way to speed up this function that solves a system of ordinary differential equations with NDSolve? Thus far I've tried specifying a few different methods such as LSODA, ...
6
votes
1answer
420 views

Simulated Annealing Convergence

I am using Simulated Annealing method for a simulation based optimization of a process that has 3 variables, using NMinimize. I print the input/output during every ...
0
votes
3answers
182 views
1
vote
1answer
54 views

What domain does Resolve assume by default?

Consider the statement: $\forall x\left(x<7\Rightarrow \exists a\exists b\exists c(a^2+b^2+c^2=x)\right)$ This is true provided the universe of discourse is $\mathbb{N}$ Now I use ...
0
votes
1answer
47 views
0
votes
1answer
90 views
17
votes
2answers
492 views

Obtain approximate Hessian using FindMinimum

According to the documentation, when FindMinimum is told to use the method "QuasiNewton" on a unconstrained problem, it uses the ...
56
votes
2answers
4k views

Shaving the last 50 ms off NMinimize

The epilogue: A paper where the below answer is used was published. The answer below is cited among the references:) The background: I have to fit an objective function for ~10 000 datasets in near ...
0
votes
0answers
28 views

Pass model parameters to NDSolve'Reinitialize

I am wondering if there is a way to pass parameter values during the NDSolve'Reinitialize step of the NDSolve process? I've read that one way to possibly speed up repeated calls to NDSolve is to ...
0
votes
0answers
35 views

NMinimize of a Differential equation

f[kpr,tn,tv] is a Block for the Differential equations of a simple control loop with a PID-controller. It calculates the the response x[t] and integrates the t-weighted area under the response. The ...
6
votes
2answers
607 views

Distribution of 10 points within a unit square

Related to some packing problems, following problem arose: Distribute 10 points within a square of sides 1, so that minimal distance between them is maximized. With the help of random simulation, or ...
8
votes
8answers
683 views

Finding maximum or minimum of implicit functions

is there any built in function that can be used to find maximum or minimum of implicit functions? For example, if we have the equation $$x^2 + y^2 = (2 x^2 + 2 y^2 - x)^2,$$ then we can visualize the ...
1
vote
1answer
235 views

Solving a System of four equations (with logs) [closed]

I am trying to solve a system of four equations in four variables. I have read a number of threads on similar issues and tried to follow the suggestions. But I think it is a bit messy because of the ...
0
votes
1answer
59 views

Finding the right DeleteCases pattern for <<199>>

I have a list in Mathematica with several items like <<199>> and <<104>>, I would like to get rid of them using DeleteCases, but none of the patterns I ...
0
votes
0answers
46 views

How do I estimate the Pareto front in my multiobjective optimization problem?

I need to minimize a function of two parameters that gives two "stress" outputs {A,B} = f[tau,mu]. How do I estimate (even roughly), the Pareto front for this ...
0
votes
1answer
104 views

How to include constraints in `NMaximize`

I am trying to find maximum likelihood estimates of parameters for a fairly complicated multivariate distribution. The support of the distribution depends on its parameters so I need to include some ...
1
vote
0answers
61 views

Solve set of non-linear equations with least-squares-fitting - constrain results?

I'm trying to solve a set of functions to determine the material properties from a set of measurement values. (To set up this method I just want to fit my model with some already calculated data). My ...