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

Optimise a function with two parameters and constraints in R using solnp function?

I have the following function and would like to optimise parameters x and y in order to maximise the output. I am trying to do that using optimise. EDIT Thanks to the comments here I am able to optimise using Rsolnp::solnp. But now I get error when…
elmaroto10
  • 516
  • 4
  • 12
1
vote
7 answers

Looking for ODE integrator/solver with a relaxed attitude to derivative precision

I have a system of (first order) ODEs with fairly expensive to compute derivatives. However, the derivatives can be computed considerably cheaper to within given error bounds, either because the derivatives are computed from a convergent series and…
timday
  • 24,582
  • 12
  • 83
  • 135
1
vote
0 answers

Optimize output of a script by varying input parameters

I have a written a script that uses the code below and I would like to optimize rsi_high and rsi_low to get the best sharpe_ratio: # import numpy import talib as ta global rsi_high, rsi_low rsi_high = 63 rsi_low = 41 def myTradingSystem(DATE,…
1
vote
0 answers

Cplex Python equivalent of Callable Library CPXaddcols

I am trying some performance experimentation using the CPLEX Python API and found that most of the CPLEX row or column updates are via sparse pair or sparse triplets. On large matrices ( millions of columns), it just gets too slow. I am looking for…
1
vote
0 answers

Using optim () in R to find a minimum of a two variable function

I need to find a minimum of a two-variable function. I currently use the R function optim() but I have just found out that the result varies based on the trial values passed to the function. How to solve this problem? That is the function I refer…
1
vote
1 answer

R : Robust nonlinear least squares fitting of three-phase linear model with confidence & prediction intervals

I would like to fit a monotonically increasing three-phase linear model using nls in R. Say I have data y <- c(4.5,4.3,2.57,4.40,4.52,1.39,4.15,3.55,2.49,4.27,4.42,4.10,2.21,2.90,1.42,1.50,1.45,1.7,4.6,3.8,1.9) x <-…
Tom Wenseleers
  • 7,535
  • 7
  • 63
  • 103
1
vote
2 answers

Pyomo parallel processing to solve an instance

I'm following the steps here in order to use all my computing power (10-core Intel i9 CPU) and solve a one-instance abstract Pyomo model. However, it seems that the solver is just using one CPU core and it takes more than 2 days to return a solution…
1
vote
1 answer

Differential evolution in SciPy

I am trying to use differential_evolution from SciPy. I have three matrices: x, y and P - all of size (14,6). I have to use the following formula: z= np.log10(g)+ np.log10(c)*np.log10(P) to find the value of c (real number from 0 to 2) which…
1
vote
1 answer

Specifying lowBound and upBound in PuLP(Python)

My decision variable, which is to be minimized is this: DV2 = { "P1" : {"V1" : 38.11, "V2" : 21.47, "V3" : 27.98, "V4" : 24.95, "V5" :25.22}, "P2" : {"V1" : 31.10355934, "V2" : 34.20506007, "V3" : 30.46890595, "V4" : 33.74346353, "V5" :…
1
vote
0 answers

Estimating the parameters of ODE system using several data sets

I have a system of 2 ODEs and I want to fit this system to some data in order to estimate some model parameters. There are two data sets. I want to fit the model to these two data sets simultaneously and the parameters should be the same when…
1
vote
1 answer

Eliminate equality constraints in a pyomo model

I want to eliminate linear equality constraints on integral variables in a pyomo model by substitution. For instance, I wish to transform the model by substituting ( * ) to Is there a way to perfom such a substitution in a pyomo model? I will…
1
vote
0 answers

Non Linear optimisation solving optimal resource allocation in R

I am trying to solve a staffing problem in R . Here is my problem Given a Walk in Center with a given allocation of demand per hour in 15 hours during the day (7:00 am to 9:00 pm) . find the optimal Number of staffing required to cater to the demand…
1
vote
3 answers

Parameter optimization with weights

For this function : import numpy as np def my_function(param1 , param2 , param3 , param4) : return param1 + 3*param2 + 5*param3 + np.power(5 , 3) + np.sqrt(param4) print(my_function(1,2,3,4)) This prints 134.0 How to return 100 instead of…
1
vote
1 answer

Using SciPy's minimize to find the shortest path in a graph

I am trying to find the shortest path in the following graph from G to C and I wrote the following code to accomplish that. First I give the equations and constraints I believe I should use: We maximize dc subject to: db-da <= 8 df-da <=…
Addem
  • 3,635
  • 3
  • 35
  • 58
1
vote
1 answer

Can I provide a solver in Google's ortools package with a BFS to start?

I'm solving a very large LP — one which doesn't have 0 as a Basic feasible solution (BFS). I'm wondering if by passing the solver a basic feasible solution, I can speed up the process. Looking for something along the lines of:…