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
1
vote
1 answer

Problem does not follow DCP rules in CVXPY

"Problem does not follow DCP rules" happens at the objective function but mathematically this is convex (I proved) and when I applied the same problem to CVXOPT, it worked. I don't know what I should modify. x = cp.Variable(data_length) obj =…
Jimmy
  • 11
  • 1
  • 6
1
vote
1 answer

Scipy.optimize minimize function arguments don't work for multiple vector inputs

I am trying to generate the solutions to PCA weights for some (yield-curve) market-data. However, I am getting an error message in my scipy.optimize.minimize function. The main error is that it seems to be reading the arguments into the minimization…
1
vote
1 answer

Optimizing a piecewise linear regression

I have written a function that, given parameters, can apply a piecewise linear fit, with arbitrarily many piecewise sections, to some data. I am trying to fit the function to my data using scipy.optimize.curve_fit, but I am receiving an…
JoshD
  • 47
  • 1
  • 10
1
vote
3 answers

Matlab optimproblem: Possible to use 3rd party ILP solver?

I've been browsing the Matlab's [mixed] integer linear program ([M]ILP) commands/classes documentation to see if there is a way to define an "optimization problem" (optimproblem) and call out to an external [M]ILP solver using an API rather than…
1
vote
2 answers

Find maximum value of a function for a constrained boundary variable using Matlab or Matlab symbolic tool?

I am currently solving equations and I need to find the maximum value of a function. The equation is v = sqrt(u^2+2*a*s); where 0.1 <= a <= 1.5 and u = 2.75; s = 3.194; I have to solve a sequence of equations where each time I have one variable…
1
vote
1 answer

Solving the assignment problem with specific constraints

Imagine the following data (the code to reproduce all the outputs is at the end): df cars horsepower year safety 1 Toyota 140 2008 4 2 Chrysler 120 2009 4 3 Ford 140 2010 5 4 …
1
vote
0 answers

Trigger nested `KeyboardInterrupt` try-except

In areas like searching or optimization, some functions (e.g. sklearn.neural_network.MLPRegressor.fit) are designed such that when KeyboardInterrupt is sent, it returns the current best result immediately (rather than raising an exception). This is…
1
vote
1 answer

Bounded Optimization using scipy Libraries

Let us suppose a loglikelihood function f(x, y, z) = prob(k0)* log((1-x)^(1-y)) + prob(k1)*log((1-x)^(1-z)) and there exists constraints such that possible values of x, y and z should lie between 0 and 1. The goal is to minimize the function and…
1
vote
1 answer

How to calculate multiples of values that sum to a given value?

I've got an optimization problem where I am trying to find the optimum number of products that add up a specific $ value. All items must be selected and repetition is allowed. For example: desired total >= 12 and <= 13 hat $3 shoes $5 tie…
dweeb
  • 539
  • 2
  • 6
  • 21
1
vote
0 answers

Asymptotic distribution of portfolio weights in R

I obtained a minimum-risk frontier by minimizing covariance of the asset returns (risk measure). This is known as the modern portfolio theory which was proposed by Harry Markowitz in 1952. Now I want to obtain a confidence interval for the portfolio…
1
vote
1 answer

Minimizing SSE using Scipy.optimize minimize

I am trying to optimize SSE (sum of squared error) of a function using scipy.optimize. To test with, I created a simple problem as below code. But the optimized parameters output by scipy never makes SSE=0. Can someone help me to understand, where…
1
vote
1 answer

pulp solve function gives same output

I have written the following code for meal generation for different days, but I get the same meal everyday. I want to have "meat" and "Vegetarian" food_groups on alternate days. my dataframe is as follows: id name energy sugar …
Khaned
  • 441
  • 2
  • 14
1
vote
2 answers

Optim function returning wrong solution

I'm trying to get a function minimum with optim in R, the problem is that the par solution returned by the method is not correct and change if i introduce a different initial point. I will show you some code and the output in getting. What am I…
Ray
  • 113
  • 1
  • 15
1
vote
0 answers

How to minimize an objective function with series of sums in Matlab?

I'm trying to minimzies the following optimization problem in MATLAB (sorry for the ugly form, but apparently I need more reputation to post images): w* = argmin f(w)=\sum_{i=1}^{n}\sum_{j=1}^{n}(w_i(Cw)_i-w_j(Cw)_j)^2 s.t. 1^Transposed *…
Dirty Dan
  • 15
  • 5
1
vote
1 answer

Minimizing Function with vector valued input in MATLAB

I want to minimize a function like below: Here, n can be 5,10,50 etc. I want to use Matlab and want to use Gradient Descent and Quasi-Newton Method with BFGS update to solve this problem along with backtracking line search. I am a novice in Matlab.…