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

Plot Table of Equations

I have a code where the first line of the body consists of an algebraic equation involving NIntegrate and the parameter a, for a ...
0
votes
1answer
19 views

Using results from Nmaximize in loop

I try to Append the vector S by z+x whereby z and ...
0
votes
0answers
29 views

Steady state customer behavior in queuing model — Numerical Optimization

With the following code I try to calculate the steady-state equilibrium waiting time at two different queues. A fraction tau of users turns away entriely, a ...
1
vote
0answers
30 views
+100

For any countable totally-ordered $A$, how can mathematica show my choice function gives a unique collection of finite sets whose union is $A$?

Suppose $A=\sqrt{\mathbb{Q}}_{>0}$. We want a unique $\bigcup\limits_{i\le j}A_i$ for $i,j\in\mathbb{N}$ such that $A_i$ is finite, $A_i\subseteq A_{i+1}$, and $\lim\limits_{j\to\infty}\bigcup\...
4
votes
1answer
107 views

Any trick to solve this optimization problem?

I'm relatively new to solving optimization problems using Mathematica. I have an optimization problem but Mathematica does not seem to be able to solve it. I have tried all sorts of way to re-write it ...
0
votes
0answers
16 views

Issue while evaluating MMA expression from Python

This is a follow up to the question posted here I've the following MMA code ...
1
vote
1answer
81 views

Continuous Min-Max problem

Being new to Mathematica, I tried my best to find some biult-in functions or guides on how to solve the classical min-max problem $$ \min_{x} \max_{k} f(x,k,params) $$ with some additional variables $...
5
votes
2answers
164 views
+100

Optimizing the edge lengths of a graph

This is a follow up to my question posted here The following code scales the edge lengths of a graph to be equal to edge weights ...
0
votes
2answers
37 views

FindMaximum under binary constrains

I'm trying to find a maximum for a function whose variables have binary values (either -1 or 1). The clumsy code for that constraint I use is shown below. There must be a more compact code, and I ...
0
votes
1answer
59 views

Maximize an expression with respect to a variable after its minimization with respect to other variables

I started to use Mathematica a few time ago. I want to minimize the following expression (function of $l,p,q,r,c$) with respect to variables $l, p, q, r$ and then maximize the result obtained with ...
1
vote
2answers
79 views

Maximize: x in Vectors[5, R] is not a valid variable

I am learning how to do optimization with a variable number of variables in Mathematica. I tried to write one experiment that I need to do but I have failed to get even a stripped-down version working....
0
votes
0answers
32 views

Speeding up a Table with NMinimize

I have a parametric system of differential equations (a and b are the parameters). For every value of the parameters in a given range I want to find the right initial conditions to fit some ...
1
vote
1answer
33 views

Minimize a function of a variable of four variables and one parameter with constraints

I just started to use Mathematica. Using the following simple command to minimize a function of variables $a,b,c,d$ with parameter $n$, it takes too much time. Do you know if there is a mistake in ...
0
votes
0answers
23 views

Minimize and ParametricNDSolve

I'm trying to fit an observed orbit data={years,xobs,dx,yobs,dy} where xobs and yobs are the observed coordinates and dx,dy the corresponding errors. I must fit ...
6
votes
0answers
113 views

SemidefiniteOptimization for operator norms: Stuck at the edge of dual feasibility

Can someone give a workaround and/or explanation why Problem 1/Problem 2 fail to solve through SemidefiniteOptimization? Problem 3 works. (I'm using 12.1.0 on Mac). ...
0
votes
1answer
41 views

Maximize does not work properly

I am trying to use Maximize to find the maximum value of f, which is a polynomial in terms of ...
0
votes
1answer
48 views

NMaximize seems to be returning the wrong result

I'm trying to use NMaximize to show that entropy is maximized when the distribution is uniform. It seems to work when the random variable is valued, but breaks at 4+...
1
vote
0answers
41 views

Find parameter ranges of a function whose value is within a window by sampling points

Problem: I want to find the ranges of the parameters for a function $f(x,y,z)$ when $0.9 < f(x,y,z) < 1.1$. All parameters are bounded $x , y, z \in [0,1]$. In the real problem the function ...
2
votes
1answer
72 views

Analytical value of minima of a function involving Logarithm and exponential

I am trying to derive the analytical expression for the point of minima of the function $$\frac{c+ x \ln(-2+2 e^{c/x})-\ln (-1+e^{2c/x})}{x [\ln(-1+e^{c/x})-\ln (-1+e^{2c/x}) ]} $$ Here $x$ is the ...
1
vote
0answers
32 views

True global minima of 6 parameter rational function

I need to find the value and positions of the global minima of a 6 parameter rational function. My current try is something like ...
0
votes
3answers
66 views

How to find maxima of a numerical calculation

Suppose I have the following code: ...
2
votes
2answers
65 views

Multiple minimas position in a list

Suppose I have a list of data which is oscillating. I want to calculate the positon of multiple local minimas present in the data. How can i do this?
1
vote
0answers
39 views

ArgMin returning unsolved solution

I have been trying to get the ArgMin function to work so that I can find the value of $s$ that minimizes this function: $$ f(s)=e^{-sa}\left(pe^s+(1-p)\right)^n\style{font-family:inherit;}{\text{, ...
5
votes
0answers
40 views

Effectivelly using Compile for calculate a Unitary transformation

I am new to Mathematica, and this is my first post, so if my question is not clear enough, I would be glad to read the comments and edit my question to add more information. The problem I need to ...
1
vote
0answers
33 views

Find the (unique) 9-dimensional ellipsoid of maximum volume lying with the convex set of 4 x 4 symmetric, positive-definite (trace 1) matrices

Find the unique (JohnEllipsoid) maximum volume ellipsoid lying within the 9-dimensional convex set formed by the $4 \times 4$ symmetric, positive-definite ("density") matrices with fixed ...
0
votes
0answers
41 views

FindInstance taking too long

I just started to use Wolfram Alpha Notebook Edition. I am using FindInstance command to evaluate the sign of an expression with $8$ variables, under simple constraints, but it takes too much time. Do ...
1
vote
0answers
62 views

Multi-objective nonlinear programming [closed]

How to use mathematica to solve multi-objective nonlinear programming. These are two objective functions: \begin{array}{l} M{\rm{ = }}{{\rm{C}}_1}{\rm{ - }}\sum\limits_{i = 1}^{15} {\sum\limits_{j = 1}...
0
votes
1answer
57 views

How could I know if this function is strictly decreasing in m?

I have the following function: ...
0
votes
0answers
31 views

Finding the minimum of a complicated Function

I want to find the minimum of the following function ...
0
votes
0answers
56 views

Finding minimum of a function in Mathematica

I am trying to find the minimum of the following function $\frac{1}{2} \left(-\alpha ^2 \sin (\theta )-\alpha ^2 \cos (\theta )-\alpha ^2 \sin (\theta ) \tan (\theta )+\frac{4 \alpha ^3 \sin ^3(\...
0
votes
0answers
33 views

Maximization by imposing an asymptote constraint

I am trying to plot the profit curve for optimal e(or effort) with respect to c. ...
0
votes
0answers
30 views

Using Experimental`OptimizeExpression for expression optimization

I am trying to optimize the following expression (example only) expr = Normal[Series[(1 - y - 2 z)^-2, {z, 0, 3}]] whose output becomes ...
0
votes
1answer
35 views

How to optimize a function with two variables such that the constraint is satisified

I have a hollow bar with outer diameter d1 and inner diameter d2. One end of the bar is fixed and the other is subjected load. ...
0
votes
3answers
54 views

NMinimize: How to avoid solutions that do not satisfy constraints within a certain tolerance?

I just started to use Mathematica a few weeks ago. Using NMinimze, I would like to avoid solutions that do not satisfy certain constraints (although they "almost" satisfy them). Do you know ...
1
vote
0answers
51 views

Maximize taking too long

I just started to use Mathematica a few weeks ago. I am afraid there is something that does not work on my laptop because, for the following simple command, it takes too much time. Do you know if ...
0
votes
0answers
26 views

Reduce does not solve a system of equations

I am trying to solve a system of 7 equations and 7 unknowns given a set of assuptions. I am only interested in obtaining V3 as a function of the exogenous parameters. I am using the following code: <...
1
vote
1answer
67 views

How to express that at least 4 of 14 variables in linear programming are greater than 10?

A restriction condition in linear programming/non-linear programming problem (function Maximize), t1, t2,..., t14, how to express that at least 4 of the variables are greater than 10?
0
votes
0answers
51 views

Nmaximize error : The function value Indeterminate is not a number at

I have been looking on the StackExchange for solutions to my issue... but I can't find. So I am asking for a solution to the following problem: First I define some functions, the function to be ...
0
votes
1answer
26 views

How to define the judgment function of extremum points

I encountered a problem in solving the math problem in China's 2019 postgraduate entrance examination. I need to judge whether $f(x)=\left\{\begin{array}{cc} x|x|, & x \leq 0 \\ x \ln x, & x&...
2
votes
0answers
50 views

How to generate a large number of constraints for all indices ($\forall i$)

Is it possible to generate a set of constraints in the form "$\forall$". For example: \begin{align} \min\ & f\left(\sum x_i\right)\\ s.t.\ & \\ & x_i\geq 17 && \forall i=...
7
votes
3answers
258 views

How to choose the shortest route? (Vehicle routing problem)

This question is about a small instance of the classical vehicle routing problem (VRP). Someone needs to start from home and complete the three tasks of going to the post office to send a letter, ...
0
votes
0answers
40 views

How to minimize a function taking a matrix argument

I have an objective function objective which takes an arbitrary-sized matrix as input and returns a positive real scalar. I would like to minimize this function ...
0
votes
1answer
101 views

How do we use mathematica to apply my average to this example? [closed]

I have defined a set function and an average. If you need help understanding my definitions, let me know. I will do my best to explain. Question How do I use Mathematica to apply my definition of ...
0
votes
0answers
18 views

Scaling the edge length of a graph to be equal to edge weight for 3D graphs

This is a follow up to my previous post here The following is the solution provided here to set the edge length of a graph equal to the edge weights for a 2D graph posted in the previous post. The ...
1
vote
1answer
15 views

Errors giving … is not a number when Trying to minimise a function [closed]

I'm trying to minimising the following equation wrt ssq and mq ...
7
votes
1answer
120 views

Furthest point from nearby objects, packing a sphere on a region interior

Suppose I have a boundary $\partial\Omega$ of a region $\Omega\subset \mathbb{R}^3$ and within this are some compact objects $B_i\subset\Omega$. They could be points, lines, polygons, complex 3D ...
0
votes
1answer
95 views

Mathematica does not solve system of equations

I am trying to solve a system of 7 equations and 7 unknowns given a set of assuptions. I am only interested in obtaining V1 as a function of the exogenous parameters. I am using the following code: <...
1
vote
1answer
52 views

Argmax - all maximizer positions

Generally the Argmax function returns one position, where a function is maximized. Is there a easy way to obtain a list of rules for all maximizer points?
1
vote
1answer
57 views

Scaling the edge length of a graph to be equal to edge weight (again)

This is a follow up to my previous question posted here The following is an excerpt of the solution provided here to set the edge length of a graph equal to the edge weights ...
0
votes
1answer
33 views

“Constraints should be equalities, inequalities, or domain \ specifications involving the variables”, leading to unexpected results

While trying to maximize the function fun[x_, a_, b_], over parameters $a$ and $b$, and plotting the resulting maxima with respect to $x$, I encountered the error ...

1
2 3 4 5
31