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

learn more… | top users | synonyms (4)

1
vote
0answers
11 views

RegionPlot with rank constraint

I am trying to plot the feasible region of a rank constrained semidefinite program shown below: The Mathematica code that I am using is the following: ...
5
votes
7answers
446 views

how to get $n$ equidistributed points on the unit sphere

We can get $n$ equidistributed points in the unit circle using CirclePoints. But how do you get $n$ equidistributed points on the unit sphere(surface of a ball)? ...
-5
votes
1answer
53 views

Setting up teams to play in games [on hold]

Imagine there are 12 teams, numbered 1 through 12. There are 10 games those teams can compete in, with two teams needed per game. There are 10 rounds, and it is important that after the 10 rounds are ...
-1
votes
1answer
61 views

Problem with a chemical optimization problem [on hold]

First of all, I want to say that I'm quite new to Mathematica. I searched a lot on this site to learn how to solve my problem, which this is the problem of my life! I want to minimize a function. It ...
0
votes
1answer
102 views

Is the MMA formulation correct?

Let $H$ be a $4\times 8$ matrix and $R$ is a vector of 2 elements. ...
2
votes
3answers
91 views

FindMinimum step size too small

I'm running a simulation of an electromagnetic system using Radia, an external code that is run from Mathematica. I want to use FindMinimum to determine some ...
22
votes
2answers
1k views

Schedule programing problem with integer linear programming

I know how to model this question on paper, but I don't know how doing it in Mathematica. Imagine , there is a university student who want to choose courses for this semester and he got the ...
5
votes
0answers
78 views

Softmax Regression Classification Algorithm

I'm following the Stanford Machine Learning course while simultaneously developing my Mathematica abilities. I'm having issues with my Softmax Classifier implementation (for ref, have a look at these ...
1
vote
2answers
87 views

Find smallest solution in Solve's solution set

When an equation has multiple solutions, how do you find the first solution? Example: Say we're trying to find the first positive x-intercept of the cosine function: $cos(x)=0 \land x \ge 0$ ...
2
votes
1answer
94 views

Controlling step size in FindMaximum

I have a function of several variables for which I'd like to find the maximum. On one hand, it's easy to work with in the sense that it's smooth, and its only local maximum is a global one. On the ...
0
votes
0answers
57 views

Solve equations involving summation expressions in Mathematica

I am trying to solve the simple linear regression equation analytically in Mathematica (not using builtin functions). I managed to calculate the gradient as follows f is loss function using RSS and ...
0
votes
1answer
54 views

Calculating extrema of a given function on a geometrical region

I've never used Mathematica before. Now I have to figure out, for one of my classes, how to find the max and min of the function $f(x,y)=x^3+2\ xy$ over the triangular region of the plane with ...
0
votes
0answers
28 views

Gradient Descent's Update Rule for Multiparameter Functions

I'm sure this has been answered before, but I haven't been able to find it. I'm trying to manually implement gradient descent for some function, f, with a vector of any length. I define the update ...
4
votes
2answers
58 views

How to pass numerically evaluated constraints into nminimize?

I have a set of complicated 100 constraints which can be computed numerically for the given iterative values of the design variables. Once evaluated the lhs of the constraints are available as a ...
0
votes
0answers
10 views

combinatorics questions [migrated]

How much words we can make from $0,1,2$ ? The restriction is we cant put the digit $2$ after the digit $2$. My solution: I tried to solve it with Inclusion-Exclusion Principle count the number of ...
0
votes
1answer
57 views

Finding the max points of a surface, maximize

So, this should not be hard at all, in fact no one seems so be having my issue so it should be me missing out on a point of information or just experience. So my mission is to with Mathematica find ...
2
votes
1answer
379 views

ParametricNDSolve KKT Constraint Directly

I am trying to directly solve for an optimal control using Pontryagin Maximum, where H is the Hamiltonian, in the presence of a KKT constraint. The constraint is ignored. I am wondering if a direct ...
1
vote
2answers
217 views

How to find a graphical solution for extreme values using Lagrange multipliers

I need to find the maxima and minima of a function. I managed this analytically with no problem, but now I need to show in a graphic the intersection of the functions. My function is: ...
1
vote
1answer
43 views

Numerical evaluation of large number of constraints in nminimize at each step [closed]

I am trying to solve an optimization problem with complicated constraints which can be computed only numerically. I have written a module that computes lhs of these constraints. Now I need to tell ...
7
votes
3answers
139 views

Locally Weighted Linear Regression

I am following the online Stanford Course in Machine Learning and I am trying to implement the algorithms on the fly in Mathematica. Currently, I have issues with minimizing the Locally Weighted ...
0
votes
0answers
34 views

How to make FindMiniumum work with delayed function and NIntegrate [duplicate]

I can plot my function penalty[v] just fine, but FindMinimum doesn't work, it just complains non-numerical values from ...
1
vote
1answer
62 views

Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
0
votes
0answers
21 views

Question about finding the minimum for self-defined function

My self-defined function is too complicated to paste here, and it works well with numerical values assigned. Basically, I have something like this , which contains 12 parameters. With numerical values,...
1
vote
0answers
119 views

Solve a certain optimization problem [closed]

I am new user of Mathematica. I want to solve an optimization problem. W = (n (X-Y-Z) p / Z q)^(1/a) where a > 0 I ...
8
votes
2answers
140 views

Using StepMonitor/EvaluationMonitor with DifferentialEvolution in NMinimize

My question about tracking the progress of a minimisation/fitting process is two-fold: 1. The first part of my question can be considered a slight duplicate/follow-up of this question. There the OP ...
2
votes
1answer
139 views

Using Minuit2 to minimize a Mathematica function

FindMinimum is great, but sometimes it is difficult to get an idea of the uncertainties and intermediate evaluation diagnostics. How to define a function in ...
15
votes
0answers
160 views

FindMinimum doesn't increase step size when necessary

I've spent much time finding a minimal example demonstrating this problem with FindMinimum. Normally one faces this problem when fitting very large and complicated ...
3
votes
0answers
56 views

ShortestTour Problem with Constraints [closed]

I can solve a travelling salesman problem with FindShortestTour[], but couldn't find any function to solve a shorest tour problem with additional constraints like cost, fuel capacity etc. How cam I ...
0
votes
0answers
113 views

Find coordinate {x, y, z} where two functions are minimal

I am trying to find a point in a ListPointPlot where the total RegionDistance is minimal AND the total differences of the <...
0
votes
3answers
58 views

Maximum value of a function using loops

I have a function ab+bc+a/c, where a,b and c ranges from 1 to 5.I have to get an output of maximum value of this function and the values of a,b and c which give that maximum value. Is it possible to ...
1
vote
1answer
83 views

Optimization of the solution to an ODE

Apologies if this is obvious -- I'm very new to Mathematica. I'm trying to minimize the solution to an ODE with respect to a variable. The following code generates the solution to the ODE, ...
0
votes
0answers
55 views

Minimize: which algorithm is in use?

How can I know which algorithm has been used by Minimize to solve a given problem? Can I force Minimize to use a specific ...
2
votes
1answer
44 views

Finding parameters with NMinimize doesn't do any steps

To find the best fit for an SVM, I have to constantly re-train my classifier with different parameters based on the result of the test set. I created a helper function which trains the SVM with the ...
0
votes
1answer
63 views
0
votes
0answers
38 views

NMinimize to Optimize Parameters for Quarter Car Model

I am very new to Mathematica and am trying to simulate a mountain bike suspension by using a quarter-car model and I have input a displacement vs time road profile for two bumps for the excitation. ...
0
votes
0answers
100 views

Absolute minimum of a function

I would like to ask for some recomendations in order to get a faster result of a function evaluation to get the absolute minimum. In my desperate moments I have written the following code to get the ...
1
vote
1answer
39 views

How do I Maximize over a Cuboid region?

So, I want to, say, find a maximum value of $|x_1x_3+x_1x_4+x_2x_3-x_2x_4|$ in a unit cube in 4D; how do I do that? I've tried ...
2
votes
3answers
93 views
0
votes
0answers
37 views

From “NMinimize::nosat: Obtained solution does not satisfy the following constraints within Tolerance”, can prove something?

I got a very very complicated function G[r1,r2,F1,F2] to minimize. It has four variables, r1,r2,F1,F2. When I introduce the ...
0
votes
0answers
40 views

How to set step size in FindMinimum?

My initial guess is very close to the solution. So I want step size is to be very small. Is there anyway to control the step size in the findminimum function?
0
votes
0answers
42 views

How to solve a constrained minimization problem?

I unsuccessfully tried ClearAll; Minimize[x^(8/5) + y^(8/5) + z^(8/5), x*y*z + x^2 + y^2 + z^2 == 4, {x, y, z}] No output during few hours. I am interested in ...
5
votes
0answers
58 views

“PostProcess” and “Tolerance” in DifferentialEvolution? [closed]

What is "postprocess" option in DifferentialEvolution method (for instance when using ...
1
vote
1answer
54 views

Step Monitor option in DifferentialEvolution

Using the "Step Monitor" option what exactly do I read? Does it show me the "best solution" for each population? Or does it show me each search point in the population? Also is there an integrated "...
10
votes
3answers
239 views

How to describe the convex hull of a set of points as an implicit region for optimization?

Last edit: 2016-05-03 A.G.'s answer was the one helped me the most, see explanation at the end of this question. Original question In Mathematica you can create out of a set of points in 2D and 3D ...