Questions tagged [mathematical-optimization]

Mathematical optimization deals with maximizing or minimizing an objective function by choosing values from within an allowed feasible set of possible values. Mathematical optimization is often also referred to as mathematical programming or simply as optimization.

Mathematical optimization deals with maximizing or minimizing a real function by choosing values from within an allowed feasible set of possible values. Mathematical optimization is often also referred to as mathematical programming or simply as optimization.

Thus, the study of Mathematical optimization includes formulating the problem (as a set of mathematical equations), and developing several solution techniques. These techniques exploit the underlying structure of the problem. Different optimization algorithms are suited for different types of problems and vary in solution times and computational complexity.

The goal (to be maximized or minimized) is called the "Objective Function." The set of equations that limit the solution space are the "constraints" and the possible solution space is the "feasible region." In some problems, the aim is to just find any acceptable solution, and these are called "constraint satisfaction problems" in which case there is no real objective function to be minimized or maximized.

Broadly, Mathematical Optimization falls under the area of "Applied Mathematics."

3356 questions
9
votes
2 answers

Reinforcement Learning vs Operations Research

I was wondering when one would decide to resort to Reinforcement Learning to problems that have been previously tackled by mathematical optimisation methods - think the Traveling Salesman Problem or Job Scheduling or Taxi Sharing Problems. Since…
9
votes
3 answers

How to find the "interior boundary" / "interior convex hull" for a list of 3D points?

I need some help with writing this algorithm. For a given set of lines in space, I am trying to find the accessible volume when the origin (reference point) is 0.5,0.5,0.5. Currently, I do the following: For each line, calculate the distance to the…
0x90
  • 39,472
  • 36
  • 165
  • 245
9
votes
1 answer

Algorithm to find the largest inscribed chord of a closed polyline

I'm looking for an algorithm to find the longest chord ("diameter") of a closed polyline. Unfortunately that polyline doesn't have to be convex, but the chord should lie entirely within the curve. Here's an example: The solution I'm looking for is…
9
votes
2 answers

Scipy minimize constrained function

I am solving the following optimization problem: with this Python code: from scipy.optimize import minimize import math def f(x): return math.log(x[0]**2 + 1) + x[1]**4 + x[0]*x[2] x0 = [0, 0, 0] cons=({'type': 'ineq', 'fun': lambda…
Max
  • 185
  • 1
  • 2
  • 12
9
votes
3 answers

Why there is the need of using regularization in machine learning problems?

This might seems a stupid question, but I just can't come up with a reasonable answer. It is said that regularization can help us obtain simple models over complex ones to avoid over-fitting. But for a linear classification problem: f(x) = Wx The…
9
votes
3 answers

Precision of scipy.optimize.minimize

I am trying to calculate the minimal point of function f(x)=(x-2e-17)*(x-2e-17) with scipy.optimize.minimize. The expected, precise result is 2e-17. But no matter how I fine tune the tolerence parameters xtol and ftol of scipy.optimize.minimize,…
zell
  • 9,830
  • 10
  • 62
  • 115
9
votes
2 answers

Efficiently find every combination of assigning smaller bins to larger bins

Let's say I have 7 small bins, each bin has the following number of marbles in it: var smallBins = [1, 5, 10, 20, 30, 4, 10]; I assign these small bins to 2 large bins, each with the following maximum capacity: var largeBins = [40, 50]; I want to…
Matt K
  • 4,813
  • 4
  • 22
  • 35
9
votes
1 answer

Fantasy football linear programming in R with RGLPK

long time listener first time caller to S.O... I am asking a question that has been asked very similarly before, however I don't believe I am smart enough to decipher how to implement the solution, for this I apologize. Here is the link to the…
9
votes
1 answer

Getting standard error associated with parameter estimates from scipy.optimize.curve_fit

I am using scipy.optimize.curve_fit to fit a curve to some data i have. The curves, for the most part, seem to fit very well. For some reason, pcov = inf when i print it off. What i really need is to calculate the error associated with the…
user3282375
  • 125
  • 1
  • 1
  • 7
9
votes
1 answer

r - Portfolio Optimization - solve.QP - Constraints are Inconsistent

I am trying to use solve.QP to solve a portfolio optimization problem (quadratic problem) Total 3 assets There are 4 constraints: sum of weights equal to 1 portfolio expected return equals to 5.2% each asset weight greater than 0 each asset weight…
user3716379
  • 115
  • 1
  • 1
  • 8
9
votes
4 answers

Most efficient way to calculate lexicographic index

Can anybody find any potentially more efficient algorithms for accomplishing the following task?: For any given permutation of the integers 0 thru 7, return the index which describes the permutation lexicographically (indexed from 0, not 1). For…
9
votes
1 answer

Non-monotonic output of Constrained Optimisation in R

Problem The constOptim function is R is giving me a set of parameter estimates. These parameter estimates are spending values at 12 different points in the year and should be monotonically decreasing. I need them to be monotonic and for the gaps…
Stuart
  • 1,322
  • 1
  • 13
  • 31
9
votes
1 answer

Which is faster: x*x or x**2?

I am trying to optimize my Python code. Between: y = x*x or y = x**2 if I need one trillion iterations in a speed-critical program, which one should I choose?
kmonsoor
  • 7,600
  • 7
  • 41
  • 55
9
votes
3 answers

Closest points on 2d segments, passing through third 2d segment

This is easier with a diagram. CaRMetal, attack! I have two 2D line segments, P and Q. I want to find the point Px on P, and Qx on Q, such that dist(Px,Qx) is minimized. So far so good; this is a pretty straightforward task. Now comes the wrinkle.…
9
votes
1 answer

How can I help Clojure understand that 0 is the smallest natural number?

It's easy to define a lazy sequence of natural numbers in Clojure: (def N (iterate inc 0)). Unsurprisingly, if we ask Clojure to find the minimum of N using (apply min N), it gets stuck in an infinite regress. Is there a way to "build in" the fact…