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

How to ask for second best solution to a MIP using JuMP

I have a Mixed Integer Programming problem. I can use JuMP to find the optimal solution. But how can I find the second best solution? Or the third-best etc. This potentially might be another equally optimal solution, or it might be a worse…
8
votes
1 answer

Optimizing in R using multiple variables using Rsolnp

I had asked this question earlier, and wanted to continue with a follow-up since I tried some other things and they didn't quite work out. I am essentially trying to optimize an NLP type problem in R, which has binary and integer constraints. The…
8
votes
1 answer

Minimize time spent when travelling a designated path

This question is related to this one, it was derived from optimizing the path over a set of points. Situation here is as follows: An object travels a designated path consisting a list of 2D points. (More Ds are possible, but since each turn is…
Vesper
  • 18,599
  • 6
  • 39
  • 61
8
votes
1 answer

How to properly use carry-less multiplication assembly (PCLMULQDQ) in zlib CRC32?

I've recently been playing around with CloudFlare's optimized zlib, and the results are really quite impressive. Unfortunately, they seem to have assumed development of zlib was abandoned, and their fork broke away. I was eventually able to manually…
Geoff Nixon
  • 4,697
  • 2
  • 28
  • 34
8
votes
2 answers

Element-wise constraints in scipy.optimize.minimize

I'm using scipy.optimize.minimize's COBYLA method to find a matrix of parameters for a categorical distribution. I need to impose the constraint that each parameter is greater than zero, and that the sum of the rows of the parameter matrix is a…
8
votes
2 answers

Create scipy curve fitting definitions for fourier series dynamically

I'd like to achieve a fourier series development for a x-y-dataset using numpy and scipy. At first I want to fit my data with the first 8 cosines and plot additionally only the first harmonic. So I wrote the following two function defintions: #…
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
8
votes
4 answers

Minimizing a multivariable function with scipy. Derivative not known

I have a function which is actually a call to another program (some Fortran code). When I call this function (run_moog) I can parse 4 variables, and it returns 6 values. These values should all be close to 0 (in order to minimize). However, I…
8
votes
2 answers

Automatic differentiation

I am working on my project of graduating, particularly, about fluid dynamics and I have a system of non-linear equations to solve, I choose the Newton's method so I have to pass through the Jacobian of the matix (actually 12x12 matrix). Every…
Syntax_ErrorX00
  • 213
  • 3
  • 7
8
votes
1 answer

non-finite finite-difference value, many data become inf and NA after exponential

I'm going to find the parameters for a rank-logit model. But the error always shows that there are non-finite finite-difference value. If I change the "b0<-rep(0,5)" to "b0<-rep(-1,5)", the number after non-finite finite-difference value changes…
Jiawen Jiang
  • 109
  • 1
  • 1
  • 6
8
votes
3 answers

Writing COIN-OR CBC Log File

I'm using COIN-OR's CBC solver to solve some numerical optimization problems. I'm structuring the optimization problem in Python via PuLP. I've noticed that solvers like GUROBI and CPLEX create log files, but I can't seem to figure out how to get…
8
votes
2 answers

minimizing a multivariate, differentiable function using scipy.optimize

I'm trying to minimize the following function with scipy.optimize: whose gradient is this: (for those who are interested, this is the likelihood function of a Bradley-Terry-Luce model for pairwise comparisons. Very closely linked to logistic…
lum
  • 1,503
  • 12
  • 17
8
votes
3 answers

Solving system of nonlinear equations with python

Can I solve a system of nonlinear equations in terms of parameters in python? Is there a example or tutorial? I can do this easily in maple, but the expressions for my particular system are pretty big and copying them over is quite hard. Example:…
8
votes
3 answers

Optimising a recursive brute force into a more mathematical/linear solution

I've written this Haskell program to solve Euler 15 (it uses some very simple dynamic programming to run a tad faster, so I can actually run it, but removing that you would expect it to run in O(2^n). -- Starting in the top left corner of a 2×2…
8
votes
3 answers

Usage of scipy.optimize.fmin_slsqp

I'm trying to use the scipy.optimize package to find the maximum of my cost function. In this particular case: I have a list of prices which vary over the day. To make it easier, lets assume the day has 8 hours and the price in each hour are as…
Jochen
  • 155
  • 1
  • 3
  • 15
8
votes
3 answers

Algorithm for finding smallest collection of components

I'm looking for an algorithm to solve the following problem. I have a number of subsets (1-n) of a given set (a-h). I want to find the smallest collection of subsets that will allow me to construct, by combination, all of the given subsets. This…