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
29 views

My Differential evolution algorithm does not minimise

So far I have implemented the Differential evolution but my output does not show me any minimization is it possible to solve it ...
0
votes
0answers
17 views

Social Planner Problem and Dynamic Optimization

I am reading following article: https://www.tse-fr.eu/sites/default/files/medias/doc/by/nguyen/1august13_jmerev_gln.pdf and trying to code the optimization problem given in the page 6 (eq P-6). The ...
0
votes
0answers
22 views

How to solve Dynamic Optimization problem involving expectations

I am very new in wofram mathematica, so please apologies if my question is too obvious or not clear enough. I have the optimization problem which involves expactations and summation, \begin{align*} \...
-1
votes
0answers
50 views

How do I apply sow and reap in this loop? [closed]

Basically I want to make a graph about the intensity of elp over a line during a time interval. However elp and ...
1
vote
3answers
87 views

Optimizing operations between vectors

Basically I am generating a grid in space (so a vector where v[[1]]=position 1 in x) and a random number of particles in space (so a vector where p[[1]]= position of particle 1 on space). Afterwards, ...
1
vote
0answers
57 views

How can I make ParallelDo faster than Do?

I am trying to optimize my code as much as possible. So first I used a compile and now I am trying to parallelize the code in order to make it faster because in the end I will need to make a loop that ...
0
votes
0answers
67 views

How to Optimize a Finite Element Model with Multiple Variables in Mathematica?

Urgent Help, Please !!! I am attaching my codes for a Finite Element Model which needs to be optimized and the Objective Function ("of" in the code) has been mentioned at the last line of ...
1
vote
0answers
58 views

Dividing list into smaller list using a set of rules?

Suppose we have the list for $n\in\mathbb{N}$ Range[1,n] We choose the number in the list where $x=1$, $x=n$ and $x=1+(n-1)/2$ round closest to and the numbers ...
1
vote
0answers
54 views

Code review of my animation of Ellipsoid method

Feel free to suggest improvements (code-review) to my two functions (calculation and animation). They were made to visualize the workings of the Ellipsoid method in two dimensions. For example, see ...
0
votes
1answer
54 views

Dividing a list of integers into a list of sub-lists?

Suppose we have a list of integers for arbitrary $n\in\mathbb{N}$ Range[1,n] We take the integer in the list that rounds closest to $x=1$, $x=n$, and $x=1+(n-1)/2$....
0
votes
1answer
57 views

How to plot the peak of a wavefunction depending on time

I am trying to define a function to find the spatial peak of some interpolation function of two variables (one spatial variable and one temporal variable) which is the output of ...
3
votes
1answer
37 views

How to use ConvexOptimization on a piecewise function?

I define a simple piecewise convex function, but ConvexOptimization does not take it as a valid input: ...
3
votes
1answer
94 views

How to use ConvexOptimization on a function constructed from data?

Given the following data points sampled from a convex function, how could I construct a convex function that can be minimized using ConvexOptimization? ...
1
vote
2answers
107 views

Mathematica: How can I solve the problem "The Kernel Local has quit (exited) during the course of an evaluation"

I am using a Mac Book with Monterey and 16GB RAM for a calculation with 2 nested For loops. I am relatively new to Mathematika and still trying to learn the language properly, so I hope the problem is ...
3
votes
0answers
83 views

Solving or Minimizing the Norm of the matrix equation $M^TAM - M^TB - B^TM =C$

I am trying to solve the matrix equation $M^TAM - M^TB - B^TM=C$ where I know A, B and C. My unknown matrix is M which has the special form that all the rows and columns sum to zero. i.e. I have four ...
1
vote
0answers
59 views

Can LinearOptimization (ex. LinearProgramming) support other methods (Ellipsoid method)?

Can LinearOptimization (ex. LinearProgramming) support methods other than "InteriorPoint", "Simplex", "RevisedSimplex"? Specifically, I need the Ellipsoid Method. Are ...
0
votes
1answer
60 views

Formalization of one optimization problem or solution of inequalities - Part №2

Continuing the question: Formalization of one optimization problem or solution of inequalities Let's consider a more complex problem. We have two polynomial: $p_1=A_2t^2+A_1t+A_0$ $p_2=B_2t^2+B_1t+B_0$...
2
votes
1answer
69 views

Formalization of one optimization problem or solution of inequalities

I have polynomial: $p=A_2t^2+A_1t+A_0$ $A_0=(x^2-y^2)+xz$ $A_1=x^2+y^2+z^2+\sin(x)$ $A_2=x^4+y^3+z^2$ $x,y,z$ - parameters, moreover $z$ - the value of which varies in the range $[0,1]$. Polynomial $p$...
1
vote
1answer
59 views

How to set Initial Points for optimization problems

How to set Initial Points for optimization problems in MMA? In this case,we do not need to set the range of the variable x1, x2. ...
0
votes
1answer
198 views

Can FindMinimum and NMinimize be so wrong?

Here is a whole block of code that computes a function at the point vx0=2.2 and returns 61.9113, which is much lower than the ...
1
vote
0answers
19 views

mistake results when using SDP for large-scale matrix

Recently I am struggling with a question during my research. Using the following Wolfram Mathematica code I could create any even-order symmetric matrix (matriceNew in mathematica) whose entries is ...
1
vote
0answers
30 views

NMinimize with if condition

...
0
votes
0answers
65 views

How to create an animating torus using mathematica or python? [duplicate]

I want to create this animating torus using mathematica or python. If anyone knows how to make this please try to explain the steps. Thank you zo much.
0
votes
2answers
69 views

How to use FindMaxium for a list of parameters?

How to use FindMaxium for a list of parameters? In the following code, if I assign single values to z and Rth, it works fine. How do I do the same for a list? ...
3
votes
1answer
67 views

How to prevent unwanted output in NMaximize or NMinimize

I have problems with unwanted outputs of NMaximize. I tried to use the command Quiet[] and Off[] in order to turn off the warnings and unwanted outputs but no avail. You can see the NMaximize part of ...
0
votes
0answers
84 views

Is an analytic solution possible?

I have this problem: the parameters are T1, T2, R, Rthhot, Rthcold, and Z with feasible range >0. The variables are Rth and Rload. X and Y are functions of Rload and Rth given by the 2 equations: <...
0
votes
2answers
76 views

Min and Max of a function

I need to obtain for what $a_i$'s the function: $$a_1 \ln (\sqrt{2\pi e} s_1) + a_2 \ln (\sqrt{2\pi e} s_2),$$ has a maximum and minimum, under the constraint $a_1 + a_2 = 1$; also, $s_1, s_2 > 0$. ...
2
votes
1answer
111 views

How FunctionConvexity is implemented in Wolfram Mathematica?

I am wondering how FunctionConvexity was implemented in Wolfram Mathematica. I am trying to prove the convexity of the function $A(v)$: $$ A(v) = -\dfrac{k-1}{\...
5
votes
0answers
58 views

Memory leak in FindMinValue?

I was running some geometric optimisation code today using FindMinValue and for some reason at one point the memory usage goes upwards of 14GB, making the kernel ...
1
vote
1answer
59 views

Minimize Reprojection Error [closed]

I have a function Point= {2, 0, 0, 1}; x = ProjectionMatrix[f] . (RotateMatrix . Point + t) Return[x]; x is a 3D Vector. where the Projection Matrix is ...
2
votes
0answers
32 views

Precision Issue in LinearOptimization - dual solution is not feasible

Trying to solve a linear program with high precision requirements and am interested in both the primal and the dual solution. Prefer solving the primal problem for convenience and solving the dual ...
2
votes
2answers
98 views

Solve Equations using Mathematica

Good day. I have a question of how to get the algebraic expressions for $a$, real part $b$ (denoted $Re(b)$), and imaginary part $b$ (denoted $Im(b)$). Let's say $a$ is a real number and $b$ is a ...
1
vote
0answers
25 views

Iterated LinearOptimization

One common method for solving large linear optimization problems is "column generation". That method is in essence the "revised simplex" method with one change: given a current ...
4
votes
1answer
59 views

Avoid Extrapolation When Using NMaximize on Interpolating Functions

I want to use NMaximize to find the maximum value given by one interpolation function with respect to a constraint given by a second interpolation function. The main problem is that NMaximize produces ...
8
votes
1answer
268 views

How to compute RandomReal faster?

I have variables $E_{1},E_{3}$ that are bounded in the following way: $$ \tag 1 E_{1}>m_{1}, \quad E_{3}>m_{3}, E_{2}\equiv m-E_{1}-E_{3}>m_{2}, \\ -1 < \frac{E_{2}^{2}-m_{2}^{2}-(E_{1}^{2}...
1
vote
0answers
45 views

Plotting a user-defined function with NMaximize

I am not sure what is going on with this plotting. I see that the following code works: ...
2
votes
1answer
56 views

Constrained Optimization with Interpolating Functions

My goal is to use a gradient descent type method to maximize interpolating function1 with respect to the constraint that interpolating function2 <= 0.5. I am working with 4D data (please see below)....
0
votes
1answer
94 views

Two problems with ConjugateGradient

I am trying to solve a maximization problem for which I give you the code and try to step by step show you were it broke down. The first issue is that I have a constrained problem, which I try to ...
1
vote
1answer
47 views

Optimization problem with input variables

I've been trying to solve an optimization problem using Mathematica. I'm 100% familiar with the programme, I just practised a few tutorials available online, but they were very small and the problem ...
0
votes
0answers
24 views

How could I define a different tolerance for each constraint?

I'm minimizing a single variable subject to several different constraints of several variables (all of which are part of the set of numbers to be found). Some of they obey a hierarchy of the form <...
1
vote
1answer
77 views

optimization with multiple parameters and differential equations

There might be some relevant questions and answers, but I couldn't complete my code by myself just by reading them. Sorry that I am very new to Mathematica and my question could be a bit rough and not ...
0
votes
0answers
31 views

How to simply this maximization problem with too many variables and parameters?

I'm someone who is trying to teach himself economics. My training in math is minimal. Forgive any inexact and/or irregular notations and terminologies below. I'm trying to find out if the following ...
2
votes
2answers
193 views

Draw a (1/4) partial 3D cylinder in a quadrant

Here is a code to draw a full cylinder $\theta \in [0, 2\pi)$: Graphics3D[Cylinder[{{0, 0, 0}, {1, 0, 0}}, 1/2]] My question is that how do we draw a 1/4 of the cylinder, such that it only appears in ...
2
votes
2answers
147 views

FindMinimum::lstol

I have a function SQ[b,zQ,zh] where I want to find at which zQ it is a minimum given b and <...
0
votes
0answers
25 views

Maximize function parameter such that constraint is satisfied on entire domain

I want to find the greatest value for At such that the constraint f[At,x]<=0.5 is satisfied for every value of x. I would try ...
0
votes
0answers
64 views

FindMinimum/FindRoot failed to converge

I have a function SQ where it is also determined by sig. For b=0.1 and ...
1
vote
0answers
103 views

How to find quadrilateral with maximum area?

Let the lengths of the sides of a quadrilateral equal a,b,c,d. What is the maximum area of such quadrilaterals? Wiki says that the quadrilateral with its maximum ...
0
votes
0answers
37 views

1
2 3 4 5
37