Questions tagged [mathematical-optimization]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
91 views

Mixed integer programming with FindMinimum

As this works fine ...
2
votes
0answers
205 views

How I can use FindFit to simultaneously fit two data sets to two equations having shared parameters? [duplicate]

I think that FindFit package with the method Nminimize yields global minimum if initial values of adjustable parameters are ...
0
votes
0answers
78 views

solving the game of fiver

Up to an error by myself, the following code is an implementation of the mixed integer linear programming of the game of Fiver : ...
0
votes
1answer
103 views

Non-linear optimization giving error NMaximize::nrnum [closed]

I am trying to solve the following non-linear optimization problem: Here is my code: ...
2
votes
0answers
41 views

FindMinium produces a worse point that the initially provided one [closed]

I am using FindMinimum to get a local minimum to a non-liner function of 50 variables on [0,1]^50 with some additional constraints. I provide FindMinumum with a feasible point which reaches a function ...
1
vote
0answers
42 views

Affine connection with torsion using xAct

I'm working with xAct and I need to obtain the affinne connection with torsion. Without torsion it is easy: ...
0
votes
2answers
111 views

NMaximize does not globally maximize. What is the alternative for global solution?

...
3
votes
1answer
81 views

How to build a Neural Network with only categorical variables?

I've built mixed data NN, but I'm trying to build an NN that only has categorical variables. In my problem, I cannot represent my categorical variables using the commonly used ...
0
votes
1answer
52 views

Choice of variables name affects the behavior of expression evaluation

I tried to expand this polynomials. With x, it is increasing with the right order, however with b it is in a random order. The only difference is that I change b to x and it works. ...
1
vote
0answers
39 views

Acceptable number of parameters for NMinimize

At the moment I am trying to optimize a fourth order polynomial which contains many parameters. I wanted to ask your opinion based on your experience about what is the acceptable number of parameters ...
0
votes
2answers
80 views

FindMinimum from DensityPlot

I need to find the values of x, y that correspond to the minimum value of the function (in this example it is -1.0, the black area). Code example: ...
1
vote
0answers
34 views

Determine if nonlinear function can be positive subject to nonlinear constraints [closed]

I am trying to determine if a certain nonlinear function can be positive when the variables have to satisfy multiple nonlinear constraints. Currently my code looks like ...
0
votes
0answers
74 views

FindMinimum giving error FindMinimum::infeas:

I'm trying to find the minimum y-coordinate of a point which lies on a side of an equilateral triangle. FindMinimum doesn't work when I change the position of the ...
2
votes
2answers
200 views

Problem with Solve (Lagrange multiplier)

I'm trying to solve a simple maximization problem, which I can easily solve by hand using the Lagrangian method. I want to maximize UH subject to ...
1
vote
2answers
242 views

Discrepancy between Minimize and NSolve

I was trying to minimize a quartic polyonomial equation with a constraint using Mathematica but I got some conflicting results and I wanted to ask to you. Am I making a conceptual mistake or a coding ...
0
votes
0answers
70 views

Optimization problem over a bi-linear function

Here is my code: ...
5
votes
1answer
152 views

Optimization over a bi-linear function

For the function $$ f(x_1,x_2;a_0,b_0)=\\\small\cases{\frac{1}{2}\left[x_1+x_2-x_1x_2+\left(\frac{-1+b_0(1-a_0)}{a_0}x_1+1\right)\left(\frac{-1+b_0(1-a_0)}{a_0}x_2+1\right)\right],\quad 0 \leq x_1\...
2
votes
1answer
103 views

Plotting a 2D plot along the maxima of a 3D plot

so i have a function $f(x,y)$ (sorry i cannot provide the whole function, it is long transfer matrix function) which i have plotted onto a 3D plot to identify the max values of the function. In ...
1
vote
1answer
87 views

Function of three variables: find optimum value of one variable in a region determined by the other two

I need to find the optimal value of h for which the absolute values of f[x, t, h] are near to zero in the region of ...
0
votes
1answer
53 views

Minimax Optimization Over and Interesting Function

n=2; (i_1,i_2)= i mod 2 for example (0,1)=1 mod 2 or (1,1)=3 mod 2 $$f_i(s_0,s_1)={s_0}^{i_1}{s_1}^{i_2}{(1-s_0)}^{1-i_1}{(1-s_1)}^{1-i_2}$$ $$r(s_0,s_1,x_1,k_1)=...
0
votes
1answer
49 views

Find values that minimize function (by passing list as initial searching points)

I have a cost function and I want to find which variables minimize it using the built-in method FindMinimum My cost function is this (keep in mind that ...
1
vote
1answer
125 views

2nd Order ODE with Optimal Control

I'm trying to solve an ODE where there is an optimal control problem involving a tradeoff between the flow cost c and the drift rate ...
0
votes
0answers
75 views

How to involve more cpu cores?

I'm working on Mathematica 11 (Lenovo Laptop, Core i7 cpu, 16GB Ram, SSD storage, windows 10 pro), part of my work is definite double integral, the evaluation time of this integral takes between 50 to ...
1
vote
1answer
427 views

Solving coupled PDE and ODE

I want to solve a system of partial differential equation in mathematica. equation is: $y0=0.5 t0=30 λ_12=0.3 λ_13=λ_23=0.01 λ_21=2.8$ I am new in mathematica. please help me for solving ...
0
votes
0answers
57 views

Is there a way to Connect a function ''normally'' through its Pole?

Basicaly I have this function: ...
0
votes
1answer
103 views

Minimization of the sums of complicated parametric integrals

I have to find the values of the parametersω and λ that minimize the function Int[ω, λ] ...
1
vote
1answer
46 views

Precision error in FindMinimum

I am trying to solve a system of three non-linear equations for three unknowns (e1, e2, phi). I am using FindMinimum to solve the system (I am minimizing the norm ...
0
votes
1answer
56 views

Minimization of a summation of two functions with respect to two constrained variables

I have a question regarding the minimization of a function, which is a summation of two separate functions, with a discrete list for one of the variables. $S[a,c]= \sqrt{\sum_{b=0,4,8,12,16}{(f[b]-g[...
2
votes
1answer
139 views

How do I use FindMinimum with the LevenbergMarquardt method?

Below is my program. I don't know how to define the function f to make it work. Another question: When I define f as a vector ...
0
votes
0answers
54 views

Am I using FindMinimum correctly?

This is the first time I try to use FindMinimum. Am I using it correctly? Before that, is it always possible to use FindMinimum or Minimize? Here my code: ...
0
votes
0answers
49 views

FindMinimum Error - cvec: Constrained optimization is only supported with scalar valued variables

I want to solve a non-linear equation derived with a forward march finite difference technique (defined as "f" in the code). I am using FindMinimum, since I know an approximate initial value for each ...
0
votes
2answers
45 views

How do I use NMaximize on a Function that contains LinearProgramming?

I am trying to maximize a function that effectively has variable matrix elements that need to be optimized using Linear Programming. Here is my function: ...
4
votes
1answer
248 views

Solving optimal control problem when input is constrained

Given a linear time-invariant system: $$x'(t)=Ax(t)+Bu(t)$$ with initial state $x(0)=x0$ and final state $x(T)=xT$. The performance measure to be minimized is: $$∫_0^Tu(t)^2dt$$ The most important ...
1
vote
1answer
281 views

FindMinimum wrongly giving a message that the function value is not a real number [closed]

I am trying to use the method of moments to fit parameters to a distribution. This involves minimizing a function. This certainly gives real numbers, but FindMinimum gives an error message saying that ...
5
votes
1answer
184 views

Numerical solution of KdV equation

I am dealing with the following Cauchy problem for the KdV equation: w'''[t] + 6 w[t] w'[t] - w'[t] = HeavisideTheta[t] w[0] = w'[0] = w''[0] = 0 My problem is ...
3
votes
0answers
93 views

Finding the shortest distance of two points and an area

So I have a region defined by something like MeshRegion[{{0, 0}, {1, 1}, {2, 1/2}, {2, -1/2}}, {Line[{1, 2}], Line[{2, 3}], Line[{3, 4}], Line[{4, 1}]}], and two ...
3
votes
2answers
126 views

Finding minima / minimum curve in ListPlot3D

I have a bunch of data trialstuff corresponding to {x,y,z}, which I put here. I am plotting a graph of it: ...
1
vote
1answer
50 views

Problem with Maximize command in Mathematica

I am new to Mathematica, and don't understand what is wrong with this command. In any of these inputs, the output is just a copy of what I wrote as an input. Thanks a lot for your help. ...
1
vote
1answer
84 views

Minimum distance from P (0,0) to the curve

Which arrow corresponds to the minimum distance. I've this. ...
1
vote
1answer
36 views

Rasterize fails when called inside an NMinimize expression [duplicate]

I'm trying to do an NMinimize based on images where the images are rasterized Graphics expressions that are parametrized by the ...
0
votes
0answers
40 views

Finding extrema of a complicated potential of 4 variables takes too long

I have this particular potential $V(\phi_1, \phi_2, \psi, \rho)$ of 4 variables and I'd like to find the extrema of this $V$ but both Solve and NDSolve seem to take hours without yielding any results -...
2
votes
0answers
112 views

Using of FindMinimum in constrained problem

There is a constrained optimization problem based on finite element method. We should find the optimal distribution of density inside the our region for minimazing the energy of deformation. The ...
1
vote
1answer
103 views

FindMaximum gives erroneous maxima

I computed the NUMERIC solution to a non-linear system of ODE. Kfn[t] = K(t), t>=0, is an entry in the solution. $K(t)$ is periodic with period ...
8
votes
0answers
163 views

FindShortestTour causes kernel crash

I have contacted support, CASE:4075709 UPDATE I have received reply from wolfram support. They have confirmed that this is indeed a bug. There are lots of sets of data that can cause the Kernel to ...
3
votes
2answers
83 views
6
votes
1answer
127 views

Steiner Trees for Unit Polygons?

I know this is a longshot, and it's a rather broad question, but hopefully someone can help. Is there a simple or fast way to find Steiner Trees for unit polygons using Mathematica? By unit polygon, I ...
0
votes
0answers
60 views

Fading plots based on a function in a ParametricPlot [duplicate]

For example, I have this plot below - I want to be able to fade (opacity) of lines based upon a function of x and xi ...
1
vote
1answer
30 views

Ranking Based Partitioning with Mathematica [duplicate]

I have three functions f_1, f_2, f_3 defined on 𝒟=[0,a]×[0,b] and I want to color in blue (resp. red, green) the region of points (x,y)∈𝒟 where f_1(x,y)=Max(f_1(x,y),f_2(x,y),f_3(x,y)) (resp. f_2(x,...
1
vote
2answers
88 views

Maximizing symbolic expression

How can I maximize the following symbolic expression in Mathematica, assuming that $da, db \ge 0$? $\delta(a,b,da,db) = ((a \pm da) (b \pm db)) (1 + y) - ab$ My problem on the first place is that I ...
7
votes
1answer
158 views

How to generate optimal solution and order the rest

This is a decimal maze, you start with 100 points and you must choose the path that gives you the highest score. Rule: You should not go twice for the same point and the same segment. My question: Is ...