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
0 answers

Implement an incremental optimization for MILP

I am trying to implement an incremental optimization where I can feed my MILP model with new constraint/variables and remove some other constraints/variables as time passes. Not to mention solved variables should be treated as fixed values as long…
1
vote
2 answers

Simulation/Optimization Package in R for tuning weights to achieve maximum allocation for groups

I am looking to identify the simulation package in R to identify the perfect weights, that enables me allocate my datapoints into the maximum bucket. Basically, i want to tune my weights in a such a way the achieve my goal. Below is the example. …
Jay
  • 835
  • 1
  • 6
  • 11
1
vote
0 answers

Creating interaction dummy variables for lpSolve constraint

I have a linear programming model I'm trying to optimize, and need some help setting up the constraints to get what I want. High-level: I want to choose items only if their "type" doesn't "conflict" with another item's specific "type". Explaining in…
1
vote
1 answer

PSO ring topology - how does it work?

I know that the topology of the global optimum is searched for each particle and global for the entire swarm. The ring, I know that there are a few neighborhoods and searched a lbest, a local optimum. My question: Is there still a global optimum in…
Saint
  • 5,397
  • 22
  • 63
  • 107
1
vote
0 answers

Keras with Theano backend: custom loss function

I'm trying to create a custom loss function in Keras for a one-layer LSTM regression problem that calculates the mean squared error between only the nonzero values in the label/truth vector, and the corresponding values in the predicted vector. I…
1
vote
0 answers

Adding further properties to a function: timing and iteration improvement

I have a function written in python which does two procedures: Preprocessing: read in data from an array and compute some values that I will later need to prevent repeated computation Iterate and compute a 'summary' of the data at every stage and…
1
vote
2 answers

scipy.minimize does not seem to adhere to constraints

scipy.minimize does not seem to adhere to constraints. Here is a simple example where the constraint is for preventing a negative argument in the logarithm, but the minimize function does not adhere : import math from scipy.optimize import…
Daniel
  • 11
  • 2
1
vote
0 answers

PROLOG code to find cheapest combination of all possible combinations

Complete newbie in PROLOG here. I am provided with a list of parts to implement a hypothetical computational system: %partName(name, type, number, required_types, size, price) part(a-1, a, 1, 2*b, 0.5, 60 ) part(a-2, a, 2, 3*b, 1.0, 25 ) part(b-1,…
1
vote
2 answers

Rectangle Intersection. print message for empty intersection

I have four coordinates: x,y,width=w,height=h and I have two rectangles with the following coordinates: r1.x=2,r1.y=3,r1.w=5,r1.h=6; r2.x=0, r2.y=7,r2.w=-4,r4.h=2 How you can observe this intersection is empty. what I did until now it…
1
vote
3 answers

how to compute the original vector from a distance matrix?

I have a small question about vector and matrix. Suppose a vector V = {v1, v2, ..., vn}. I generate a n-by-n distance matrix M defined as: M_ij = | v_i - v_j | such that i,j belong to [1, n]. That is, each element M_ij in the square matrix is the…
1
vote
1 answer

Generating function derivative as Python callable function

I was reading this question and I was trying to do the same, but I want the function to have a single parameter say x. And that parameter is an array of "values" to be filled by an optimization solver. For instance: def f(x): return x[0]**2 +…
1
vote
1 answer

Setting up a solver constraint that depends on chosen variables with lpSolveAPI

I'm running a linear programming model using lpSolveAPI. I'm able to get the model working, but I want to add a constraint and I'm not sure how to do it, or if it is feasible. The details on the model: Select a total of 5 items, maximizing value…
1
vote
1 answer

Maximum sum of straight line lengths in a convex polygon with constraints

This is a follow up to a question I asked previously. But here is the full question: Consider two convex polygons A and B. Polygon B lies completely inside polygon A. There are two lines with different slopes (both fixed slopes), such that they have…
1
vote
0 answers

Setting up a linear optimizer with an "or" constraint

I have a big linear optimizer I'm running and need some help setting up the constraints to get what I want. It's hard for me to express it in words exactly (hence the vague post-title), so I've written an example, details: Select a total of 5…
CoolGuyHasChillDay
  • 659
  • 1
  • 6
  • 21
1
vote
2 answers

Longest straight line in a convex polygon with fixed slope and constrained endpoints

Consider two convex polygons A and B. Polygon B lies completely inside polygon A. I am trying to find the longest line segment (with a fixed slope) such that: One end of the line segment lies on the boundary of polygon B, and the other end of the…