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

learn more… | top users | synonyms (4)

0
votes
0answers
8 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
29 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 ...
0
votes
0answers
30 views

Numerical minimization hangs at some steps

Let me briefly explain what I observe and cannot really explain by myself. I occasionally use NMinimize to find optimal parameter sets and sometimes it happens that ...
4
votes
0answers
71 views
+50

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 ...
0
votes
0answers
34 views

Calculations using imported .csv files

How do I co calculations after I have imported two files (in my case .csv files). I want to take the average of the columns/ rows and then display them to the user in a new chart. Example A1 of one ...
0
votes
0answers
40 views

L1-Norm Minimization

I need the function for the L1-Norm Minimization problem formulated here https://reference.wolfram.com/language/tutorial/ConstrainedOptimizationLinearProgramming.html#261990371 ...
3
votes
1answer
92 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
46 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 (...
7
votes
1answer
116 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
38 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 ...
1
vote
0answers
52 views

Finding the global extrema of a surface? [closed]

I am trying to figure out how to find the global extrema of the function surface shown below and can't seem to get answers that make any sense. I am using the FindMinimum and FindMaximum functions ...
0
votes
0answers
58 views

How to solve two point boundary value problem numerically

I'm new to mathematica and I'm interested in solving the following optimal control problem: $$ \min_{\rho_1,\rho2}\int_0^Te^{-\beta t}(Nd(t)+\rho_2y_2(\rho_2k_2-C_2)+\rho_1y_1(\rho_1k_1-C_1))dt $$ ...
0
votes
0answers
94 views

How to optimize a cost function which involve the solution of a ODE system using the NMinmize?

I have created a cost function, the value of which depends on the solution of a ODE (ordinary differential equation). The parameters of the ODE are not determined, and my goal is to determine them ...
0
votes
0answers
47 views

Finding values of a variable fitting a function and minimizing a list of expressions

I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expressions so that each expression is ...
0
votes
0answers
73 views

Fun/Frustration With Coding Coding Theory

I have code following from this post: http://math.stackexchange.com/questions/1317722/fun-frustration-with-coding-coding-theory I think I am done with the code, but now I face a single problem. The ...
-1
votes
1answer
51 views

Find a minimum value which satisfies an equation

I have to find a minimum value of "a" which makes x=-a+b+c, y=-a+b+c^2 positive where a>1, 0 ...
1
vote
1answer
62 views

Problem in minimizing expression

I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expression. The minimum value of ...
2
votes
2answers
83 views

Finding Minimium Periapse Distance Between Spacecraft and Planet

I have the following simple model that simulates a spacecraft orbiting Mars. What I'm hoping to do is be able to find the periapse radius of the spacecraft as I did below, except instead of using ...
1
vote
2answers
78 views

FindMinimum and WhenEvent

Is there any way to incorporate WhenEvent[] into the FindMinimumfunction ? I'm currently trying to minimize an interpolating function with FindMinimum (since the origional function is to cumbersome ...
2
votes
1answer
51 views

NMaximize with Nelder-Mead method fails to convergence when tolerance set too high

Recently I have been working on a optimization problem for which I use NMaximize with Nelder-Mead method. In general, I have to check a lot of systems which are built automatically. I want to skip ...
0
votes
0answers
45 views

Sharp Ratio Maximization, Closed Forms

I am trying to get a closed form for the following first order conditions (n=4): Here's the nb-File. The code is as follows: ...
0
votes
2answers
80 views
2
votes
1answer
64 views

Performance of a bootstrap - time of computation not linear with number of iterations

I'm doing a bootstrap based on this thread with the following code (file.txt here): ...
0
votes
0answers
41 views

Recursive method for the SR1 correction

I am looking to program a recursive formula for implementing the Symmetric rank-one correction. I am not sure exactly where my program fails. Every value is correct except the value for ...
0
votes
1answer
81 views

Both FindMinimum and NMinimize have trouble

I'm trying to minimize a function I wrote, in a not entirely elegant (but functional) way. As a side note, if you have advice on how to write this in a smarter way, that's also welcome. In any case, ...
3
votes
0answers
67 views

Symbolically Minimizing a Max function

I'm having a tough time with seemingly simple symbolic Minimization/Maximization in Mathematica. I would like to use the Maximize function to work on some unknown random variables and so use min/max ...
1
vote
2answers
69 views

Maximise a function over one parameter that is continuous, and one that is discrete

I have a function that I would like to maximise with respect to two parameters: one continuous, another which is discrete. A simple example of this might be the following: ...
1
vote
1answer
53 views

i need a swap mutation code (genetic algorithm) in Mathematica?

I'm working on GA coding to optimize the locators position in fixturing system to minimize the error in precision manufacturing.I need a code for mutation (genetic algorithm) in Mathematica. Here, I ...
0
votes
1answer
68 views

Minimizing using indices, error: Part::pkspec1: The expression cannot be used as a part specification

I want to use Minimize where the variables to minimize are indices pointing into an array. Here a MWE that hopefully shows what my problem is. ...
4
votes
0answers
70 views

How to perform Bayesian optimization with Mathematica?

Does Mathematica have any Bayesian optimization methods for learning hyper-parameters? Practical Bayesian Optimization of Machine Learning Algorithms Jasper Snoek, Hugo Larochelle and Ryan P. ...
1
vote
0answers
47 views

How can I calculate Lagrange multiplier and the critical points with Mathematica? [closed]

I have constraints and a function I want to know the critic points but is there a way that I can compute this method so that I can see results faster
1
vote
3answers
108 views

Minimize method is not giving minimum. Why?

I was doing an optimization but facing a problem getting what exactly Minimize function do. I run the following code: ...
3
votes
1answer
187 views

Finding peaks of data

I want to find peaks in my data. My code in a reduced form so far: ...
0
votes
0answers
56 views

Which method to use for finding maximum without actually computing optimization function explicitly?

I am new to Mathematica and I am currently working on an optimization problem. The optimization function that I have easy to calculate for some assignment of variable but it is very difficult to ...
3
votes
3answers
76 views

Minimizing Multiple Functions

I'm trying to write a script that will minimize a given set of functions. The homework problem I've been given lists a set of dietary information, and I'm supposed to build the optimal salad based on ...
1
vote
1answer
118 views

Equation solution using minimization

I have an equation F[x,y]=0. I need to plot y as a function of x. Due to the properties of ...
2
votes
2answers
104 views

Reordering numerically calculated eigenvalues assuming smooth dependence on a parameter

As was discussed in a different question here on SE (link) if you compute eigenvalues numerically of a matrix which depends on a parameter y, the resulting plot of ...
4
votes
1answer
76 views

What is the status of the FindMinimum method “QuadraticProgramming”?

As a method option to FindMinimum "QuadraticProgramming" is still a valid option. It has the advantage of being significantly ...
0
votes
0answers
50 views

Constrained optimization and problem with complex numbers

I am trying to solve a constrained optimization problem with an implicitly defined function $\pi$. The problem is non linear and of high order, so I use numerical methods instead. The code I use is: ...
1
vote
0answers
27 views

Using ForAll in Maximize to define a bunch of conditions

I'm trying to do something very straight forward. The following maximization works: ...
1
vote
1answer
49 views

NMinimize error: Nearest::neard:

I have this function GuessError, here's a plot assuming a single variable x, Plot[GuessError[10^x, etc..], {x, 8, 12}] , being etc some more variables which are ...
-2
votes
1answer
88 views
2
votes
1answer
71 views

NMinimize works only if expression is pasted directly

Niminize works fine if I copy the minimized function directly by hands, but doesn't work if I try to do something like this: ...
2
votes
1answer
100 views

How can I change a lot of parameters to Real? [closed]

Because of some formulas with Conjugate in a notebook, I have to tell mathematica to change a lot of parameters to Real! I know that I can use Refine with Element or Assumptions: ...
2
votes
1answer
46 views

Application of Maximize: The cuboid constrained to the ellipsoid in $\mathbb{R}^3$

Since I am a student of Mathematics I enjoy to apply MMA to problems that I have a solid understanding in. The following would be such a problem: Maximize $f: \mathbb{R}^3 \to \mathbb{R}$ given by ...
1
vote
1answer
138 views

Why does it matter at what point I replace?

I need to find four orthogonal linear combinations of complicated functions, that vanish at four different points. I use (LK4 is defined below, but its shape should have nothing to do with my ...
3
votes
1answer
99 views

How to stop optimization (e.g. NMinimize) after reaching target value

Suppose we have some function f[x,y] that we want to optimize in way that we are only interested in values (x,y) that guarantee ...
0
votes
0answers
23 views

Timing of an Evaluation is not correctly displayed

From: http://reference.wolfram.com/language/howto/DisplayTheTimingOfAnEvaluationInANotebookWindow.html I ran a process that took about two minutes to finish. But the time recorded is only 0.18 ...
5
votes
0answers
91 views

Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
3
votes
1answer
72 views

Why minimization does not work with symbolic array as arguments

If I try to minimize with constraints a function of several variables, with Gamma regularized function involved in the constraints it seems to works, as shown below (this is just a dummy example ...