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

learn more… | top users | synonyms (2)

9
votes
0answers
151 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 ...
6
votes
0answers
56 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: ...
6
votes
0answers
146 views

Issue with FindCurvePath

I have a problem with the function FindCurvePath. In some cases it crashes the Mathematica 9 Kernel. Here an example, where it crashes the kernel: ...
5
votes
0answers
110 views

PenaltyFunction Option in NMinimize

I am curious if anybody has some experience in using the built-in Option "PenaltyFunction" in any of the numerical optimization functions like NMinimize. According to the documentation the user ...
5
votes
0answers
212 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 ...
5
votes
0answers
109 views

NMinimize seems to call function with the same values multiple times

I have to minimize a function where the evaluation of one parameter set takes very long (around 5sec) and discovered alongside, that NMinimize seems to call this ...
4
votes
0answers
155 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 ...
4
votes
0answers
471 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: ...
4
votes
0answers
409 views

Semidefinite Programming

I want to solve a numerical optimization problem using semi-definite programming. Is there a package or add-on that equips mathematica with this functionality?
3
votes
0answers
69 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 ...
3
votes
0answers
196 views

Optimization with Matrix value constraint

I am trying to find the orientation and position of a polygon resting on a curved surface under gravity.The polygon MUST not be penetrated by any part of the surface below. Here is an example for a ...
3
votes
0answers
154 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 ...
2
votes
0answers
76 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
0answers
134 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 ...
2
votes
0answers
177 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 ...
2
votes
0answers
289 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 ...
2
votes
0answers
400 views

Numerically/Analytically Solving a System of Equations

I have $6$ functions $f_i(x,y,z)$, $(i = 1, \ldots, 6)$ in three variables $x,y,z$, and I would like to find a simultaneous instance of these variables, say $(x_0, y_0, z_0)$, such that $f_i(x_0, y_0, ...
2
votes
0answers
284 views

Having difficulty with the Minimize command

I am having trouble getting an answer to this question...Am I missing something that anybody can see. ...
1
vote
0answers
19 views

What are the differences between these functions when used for NMaximize?

In short, the question is how to construct the function you want to optimize? ...
1
vote
0answers
85 views

Is there any way to solve this convex-concave like optimization problem?

This is a bit of a non-standard way of asking a question perhaps but I couldnt even think of writing any code about the following optimization problem. I wonder if it could be at all solvable and if ...
1
vote
0answers
59 views

Updating procedural fitting algorithm to more efficient style?

For some time now, I have used this procedural programming approach to fit data in my research that is too cumbersome for the built in Mathematica functions. (Although this simple example works fine ...
1
vote
0answers
52 views

NMinimize: Problem with constraints + Simultaneous minimization possible?

Introduction Dear all, I am fairly new to Mathematica. Recently I am trying to do the following: I have a function $$\textrm{hann}[t,t_g,n_m]=\sum\limits_{n=1}^{n_m}a_n\left[1-\cos\left(\frac{2\pi ...
1
vote
0answers
47 views

Optimizing evaluation of expressions dependent on four variables and containing double summation

I would like to optimize my code which I use to evaluate expressions containing double summation. These expressions are dependent on 3 space variables ($r$, $\theta$, $\phi$) and time $t$ and consist ...
1
vote
0answers
57 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. ...
1
vote
0answers
157 views

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
vote
0answers
119 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, ...
1
vote
0answers
92 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 ...
1
vote
0answers
58 views

How to find a scaling parameter in matrix inversion process by MMA?

I simply would like to find the inverse of a given matrix $A$ by the iterative method $X_{k+1}=X_k(2I-AX_k)$ using $X_0=\frac{1}{\sigma_{max}^2}A^*$. An example is as follows ...
1
vote
0answers
41 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
1
vote
0answers
87 views

How to optimize my code?

I use Mathematica to handle data.My trial as below: Interpolation function: ...
1
vote
0answers
90 views

DSolve does not solve my system of PDEs

I am a long time Maple user who had just recently got hands on Mathematica. I have a "simple" system of PDEs, one can be solved easily. But I cant seem to get it work in Mathematica. I am nos sure ...
1
vote
0answers
179 views

Travel time sweet spot using: Mathematica and Google Maps API

I want to use Mathematica to do some time minimisation calculations calling on Google Maps API for travel time data. I'm concerned with travel time, e.g. along roads (by car or walk) and not linear ...
1
vote
0answers
72 views

Linear interpolation over 2 variables

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
1
vote
0answers
61 views

Optimization problem test suites

Mathematica provides nonlinear, unconstrained test problems here: Needs["Optimization`UnconstrainedProblems`"] and LP test problems here: ...
1
vote
0answers
88 views

Increase optimization processing speed

As you know, sometimes numerically solving of optimization problems takes several minutes. For this reason 2 question came up to me: 1 - When one is abort the optimization procedure, how it is ...
1
vote
0answers
90 views

DifferentialEvolution scaling factor randomization

Using NMinimize for finding global minima, one can choose the DifferentialEvolution method. You can find a (not so) detailed ...
1
vote
0answers
103 views

Combination of linear programming with bilevel optimization

I'm not a programmer really (interested in mathematics actually). Excuse me if I can not coding good. I'm also interested in implementation of mathematics results in programming language. That's my ...
1
vote
0answers
123 views

Minimizing a functional takes forever

I need help with minimizing a functional in Mathematica. I have a function $V(\xi)=\sum_{i=1}^\infty C_{3_i}J_0(\xi/C_i)+C_{4_i}Y_0(\xi/C_i),~~~\Sigma\leq\xi\leq\xi_1$, and want to find such ...
1
vote
0answers
87 views

NMinimize memory consumption problem in Mathematica 9 vs. 7 & 8

I am having trouble using NMinimize in Mathematica 9 - Memory consumption overflows. The same NMinimize command, with the same ...
1
vote
0answers
87 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 ...
1
vote
0answers
138 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 ...
1
vote
0answers
124 views

How to express this output in the form $X=A.x$?

This problem arose in my stereo vision project. I have two matrices: $$ A = \left( \begin{array}{ccc} \text{x1}*\text{p131}-\text{p111} & \text{x1}*\text{p132}-\text{p112} & ...
0
votes
0answers
20 views

Maximization of n-variable and n-constraint in matrix form

I am trying to do some maximization using matrix algebra: very simple one is with n = 3 as the following: ...
0
votes
0answers
57 views
0
votes
0answers
46 views

NMinimize tries to find the fit to paramters which are not in the objective function

Consider the codes below: fun[x_] := (x - 4)^2 NMinimize[{fun[x]}, {x, y}] it returns: ...
0
votes
0answers
50 views

Constrained Nonlinear Optimization with expectations functions in the constraints

I am modeling an optimal compensation contract with a CRRA utility function : ...
0
votes
0answers
48 views

Optimiazation method L-BFGS-B

I am comparing a result of optimization using R and Mathematica. Mathematica (NMaximize) has found a significantly better (global optimum) result then R (using ...
0
votes
0answers
41 views

Transform NMinimze into LinearProgramming formulation

I have the following maximization problem that I currently try to solve with Minimize/NMinimize. Unfortunately, this kind of solution method takes really long for large systems of equations and ...
0
votes
0answers
53 views

Improve on timing of NMinimize

I got a little performance problem with the function NMinimize (it takes mathematica approximately 10 minutes to compute the results). Here i s my sample code: ...