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
16
votes
1 answer

scipy.optimize.leastsq calls objective function with NaN

I am using scipy.optimize.leastsq to attempt to fit a number of parameters to real-world data in the presence of noise. The objective function occasionally gets called with NaNs from within minpack. Is this the expected behavior of…
Matt Liberty
  • 2,416
  • 1
  • 18
  • 17
16
votes
4 answers

Speeding up Math calculations in Java

I have a neural network written in Java which uses a sigmoid transfer function defined as follows: private static double sigmoid(double x) { return 1 / (1 + Math.exp(-x)); } and this is called many times during training and computation using…
Simon
  • 78,655
  • 25
  • 88
  • 118
16
votes
7 answers

mathematical optimization library for Java --- free or open source recommendations?

Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have…
15
votes
5 answers

An algorithm to sort a list of values into n groups so that the sum of each group is as close as possible

Basically I have a number of values that I need to split into n different groups so that the sums of each group are as close as possible to the sums of the others? The list of values isn't terribly long so I could potentially just brute force it but…
Cyborg771
  • 395
  • 1
  • 6
  • 17
15
votes
7 answers

Finding the closest integer fraction to a given random real between 0..1, given ranges of numerator and denominator

Given two ranges of positive integers x: [1 ... n] and y: [1 ... m] and random real R from 0 to 1, I need to find the pair of elements (i,j) from x and y such that x_i / y_j is closest to R. What is the most efficient way to find this pair?
15
votes
10 answers

Dependency Algorithm - find a minimum set of packages to install

I'm working on an algorithm which goal is to find a minimum set of packages to install package "X". I'll explain better with an example: X depends on A and (E or C) A depends on E and (H or Y) E depends on B and (Z or Y) C depends on (A or K) H…
KLi
  • 308
  • 3
  • 9
15
votes
7 answers

What's the most efficient way to detect triangle-triangle intersections?

How can I tell whether two triangles intersect in 2D Euclidean space? (i.e. classic 2D geometry) given the (X,Y) coordinates of each vertex in each triangle.
José Joel.
  • 2,040
  • 6
  • 28
  • 46
15
votes
2 answers

Minimize maximum manhattan distance of a point to a set of points

For 3 points in 2D : P1(x1,y1), P2(x2,y2), P3(x3,y3) I need to find a point P(x,y), such that the maximum of the manhattan distances max(dist(P,P1), dist(P,P2), dist(P,P3)) will be minimal. Any ideas about the algorithm? I would…
YAKOVM
  • 9,805
  • 31
  • 116
  • 217
15
votes
4 answers

Free optimization library in C#

Is there any optimization library in C#? I have to optimize a complicated equation in excel, for this equation there are a few coefficients. And I have to optimize them according to a fitness function that I define. So I wonder whether there is such…
Graviton
  • 81,782
  • 146
  • 424
  • 602
14
votes
4 answers

R optimization with equality and inequality constraints

I am trying to find the local minimum of a function, and the parameters have a fixed sum. For example, Fx = 10 - 5x1 + 2x2 - x3 and the conditions are as follows, x1 + x2 + x3 = 15 (x1,x2,x3) >= 0 Where the sum of x1, x2, and x3 have a known value,…
Scott Worland
  • 1,352
  • 1
  • 12
  • 15
13
votes
1 answer

Quadratic programming in Haskell

Are there any Haskell bindings for quadratic programming libraries? If not, which one should I write simplified bindings for assuming I cannot avoid needing one? Is there a reasonably canonically favored open source library for this?
13
votes
4 answers

Hotel room optimization/sorting algorithm

Is there any well known room optimization/sorting algorithm for hotels ? Problem is to redistribute rooms to maximize occupancy. Let's say I have 10 rooms, start date and end date for every reservation. Some rooms cannot be realocated while others…
synclabs
  • 277
  • 1
  • 4
  • 8
13
votes
1 answer

Can Tensorflow be used for global minimization of multivariate functions?

I've been curious if TF can be used for global optimization of a function. For example, could it be used to efficiently find the ground state of a Lennard-Jones potential? Would it be any better or worse than existing optimization methods, like…
Christopher Mauney
  • 459
  • 1
  • 5
  • 10
13
votes
3 answers

Performance of pyomo to generate a model with a huge number of constraints

I am interested in the performance of Pyomo to generate an OR model with a huge number of constraints and variables (about 10e6). I am currently using GAMS to launch the optimizations but I would like to use the different python features and…
Dimitri Tomanos
  • 153
  • 2
  • 8
13
votes
2 answers

How to find the local minima of a smooth multidimensional array in NumPy efficiently?

Say I have an array in NumPy containing evaluations of a continuous differentiable function, and I want to find the local minima. There is no noise, so every point whose value is lower than the values of all its neighbors meets my criterion for a…
ptomato
  • 56,175
  • 13
  • 112
  • 165