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

learn more… | top users | synonyms (4)

2
votes
1answer
134 views

How to find Lagrange multipliers corresponding to constraints?

I have a constrained optimisation problem that I solved using Mathematica's FindMinimum function. I would like to know how to get the dual variables corresponding to the constraints I have. Obviously ...
0
votes
0answers
90 views

Set first line in CSV as header in mathematica list

New to stackexchange. Need some help with mathematica - also new to this!. I have a CSV file with 80 something columns and 6000 something rows = 500,000ish elements in total. I am trying to import ...
2
votes
1answer
923 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 ...
0
votes
1answer
76 views

NMaximize against LinearProgramming [closed]

i'm starting my studies of Operational Research with Mathematica and i'm stuck on a problem with 12 variables. In fact, I was able to solve the problem using ...
0
votes
1answer
111 views

How to determine if directories with executable permission and not

I have some directories that have the UNIX executable permission some does not. What tests could I write in Mathematica to test it?
0
votes
0answers
52 views

How to solve a multi-vector optimization problem efficiently?

How to efficiently solve a optimization problem which involves multiple vectors? My optimization problem is: $\min_{\bf{K}_{i}} \sum_{i<j}\left[\bf{t}\cdot(\bf{K}_i-\bf{K}_j)\right]^2$, s.t. ...
0
votes
0answers
107 views

How to speed up my code with constructing matrices

I have run this program for a long time to get the result for n = 2048(about 5hours) and no more result till now (can't run with n = 4096). I would know how to make it more efficient. Any help or ...
0
votes
1answer
51 views

Search optimum on connected simulation

Do you know how can I find minimum/maximum of a simulation written in a Module. The simulation calculates a potential value to a territory after some steps. It would seem like this: ...
10
votes
2answers
482 views

What is the difference between FindFit and NonlinearModelFit

I cannot get the difference between these two fitting functions in Mathematica. I even read in MMA that the result of these two are the same.
2
votes
1answer
133 views

Symbolic quadratic constrained maximization with non-negativity constraints?

Dear Mathematica users, I attempted to maximize the below quadratic function K, subject to x1+x2<=A, and a series of ...
1
vote
1answer
93 views

Why does NMaximize does not follow the constraints that were given to it?

(someone may want to mark it as a duplicate, but I still have to ask! I just can't figure out why!) ...
1
vote
0answers
76 views
0
votes
0answers
41 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: ...
1
vote
2answers
103 views

Incorporating the minimum and maximum of the function in a Dynamic plot

I'm working on my project for class and it's supposed to be a graph that can take functions from the user and display it along with finding the max and min of the graph. But I just don't know how to ...
0
votes
0answers
36 views

3D Ploting in Mathematica Function is getting smeared [duplicate]

A = x^2 + y^2 + Sqrt[x^2 + y^2]; B = x^2 + y^2 - Sqrt[x^2 + y^2]; Plot3D[{B}, {x, -1.5, 1.5}, {y, -1.5, 1.5}] I want to remove this sky blue region from the ...
3
votes
1answer
126 views

Calculate the relationship between the duration of two oscillating functions

I am trying to quantitatively determine the relationship between the length of two oscillating functions. Meaning, what is the duration of the green spike in relation to the blue square? Does anyone ...
0
votes
0answers
56 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
88 views
0
votes
1answer
106 views

Optimizing a System of 5 Equations

I have a system of 5 equations that each define a parameter for a metal I-beam. The common variables are beam width (W), web thickness (Tw), and flange thickness (Tf). I would like to find the best ...
19
votes
2answers
903 views

Optimization with assumptions

I have the following problem, when I am trying to optimize function with pre-defined assumptions. I am using Mathematica 8 and I wrote the following simple code ...
5
votes
2answers
150 views

Test existence of a path from one side of a graph to another

I'm trying to determine how I can test if a path exists from one side of a graph to another as efficiently as possible. If I have the Lines given by: ...
2
votes
0answers
175 views

Mathematica + System Modeler or Matlab + Simulink [closed]

I want to learn control systems(Using Ogata Modern Control Systems Book) and I am not sure in which should I invest : Matlab+Simulink+Control systems = aprox 220 euro Mathematica + Workbench + ...
5
votes
2answers
89 views

Optimization problems over the Integers

Should be an easy question. How can I define a function which gets only integers in a form that I can use to find max and min for instance? Example: Find the Max of the expression ...
0
votes
1answer
62 views

Problem in LinearProgramming [closed]

I wrote a integer Linear programming where matrix c, m and b are: ...
0
votes
1answer
113 views
4
votes
2answers
474 views
2
votes
1answer
125 views

Finding maximum value with LinearProgramming command

So here is a HW problem I was assigned: *Thriftem Bank is in the process of devising a loan policy that involves a maximum of $12 million. The following table provides the pertinent data about ...
1
vote
1answer
46 views

Minimization problem in a subset of Complex matrices

I would like to minimize $||\mathbf{A} \rho -v||$ (where $\rho , v$ are fixed vectors) with respect to the matrix $\mathbf{A}$ elements, but with $\mathbf{A}$ in a subset of complex matrices (i.e. ...
0
votes
0answers
50 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 ...
2
votes
1answer
117 views

Array in Sum in Minimize - error “Part specification x[1] is neither a machine-sized integer”

Help please M = 10; z = Array[x, M] {x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10]} ...
7
votes
4answers
397 views

Finding the point of minimum distance between two parametric functions

I have two functions re and rm, for which I computed the minimum distance between them. Now I would like to add a point at the ...
1
vote
0answers
96 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 ...
3
votes
2answers
334 views

NMinimize/NMaximize is unable to generate initial points

Mathematica 10 generates a warning that it is unable to generate initial points for numerical optimization problems. I picked a particularly simple example. The problem goes away when ...
3
votes
3answers
193 views

How to shade a plotted region in specific direction?

I am using RegionPlot to plot a linear program maximize 30x1+25x2 with the constraints ...
0
votes
1answer
205 views

Optimizing Chi-square distance between two distribution

I want to program the chi-square between two distribution Xu and Vu with length N. This function is defined as below: Xu and Vu are real and positive. ...
1
vote
0answers
77 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
1answer
158 views

Optimization in MMA for time resolved spectroscopy

I want to fit some spectroscopic data with a model. I detect the fluorescence of something over different wavelengths. The detection over each wavelength is one data set in time. The lifetimes of ...
0
votes
0answers
68 views

Using FindFit to return a list of possible best fits

Can I use some variant of FindFit that will return a list of the best fit and some worse fits, not just the best fit? This is for a function where the residual function can have several local ...
0
votes
0answers
93 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: ...
7
votes
0answers
185 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 ...
0
votes
0answers
51 views

How to set the step in NMinimize

I want to fit multiple data sets with 104 variables. I use NMinimize to do that. I minimize the difference between data and my objective function. How can I tell ...
0
votes
0answers
32 views

Optimization of two functions under one common constraint

Is it possible to optimize two functions under one common constraint? So to find the common maximum? For example, Optimization of (* 1 *) x*y^2-x^2 (* 2 *) x*y ...