Questions tagged [maximization]

53 questions
1
vote
1 answer

How to maximise addition/subtraction combinations?

Suppose I have a list of 10 elements [a, b, c, d, e, f, g, h, i, j] and I can multiply each element by 0, 1, 2, -1, -2. The total of the multiplication factors I use must be equal to zero. Ie if I multiply five numbers by -1 I must multiply the…
1
vote
1 answer

Variable division in or-tools python

I am working with MIP solver provided by or-tools (in python) assume we have two variables x and y . I know how to maximize one single variable OR the sum of two variables. for example, if we want to maximize 2*x we can do it this way objective =…
Scoob
  • 31
  • 4
1
vote
4 answers

Highest Percentage Increase

Lets say we have the following set of numbers representing values over time 1 2 3 10 1 20 40 60 Now I am looking for an algorithm to find the highest percentage increase from one time to another. In the above case, the answer would be the pair (1,…
Karthick
  • 2,844
  • 4
  • 34
  • 55
1
vote
2 answers

Linear programming with minimum and maximum fixed cost

I need your help in the following optimisation problem. I have a maximisation Mixed Integer linear programming problem. I would like to consider the minimum & maximum fixed fee. I've done it in this way.. cost = max(minimum fixed cost , cost rate…
1
vote
0 answers

four-moment optimisation using ortfolioAnalytics package (error with DEoptim)

I want to optimize a currency portfolio using the 4 moment maximisation method and PortfolioAnalytics package in R. this is the code I use: PF<-data ARG = xts(PF$ARGENTINA, order.by=as.Date(PF$DATE)) SING = xts(PF$SINGAPOR,…
1
vote
0 answers

Maximize a function in R with Nas values

I would like to maximize the funcToOpt in the code. Description of the data: wb and X1 are T x N matrix, and Nt a vector of length N the sum of each row of wb is 1 X1 is cross-sectionally standardized (mean=1 sd=0) The standardization implies…
1
vote
2 answers

maximize a function with recursion c++

I am trying to maximize this function in c++: I have put this in the function: int F(int n , int T ){ if( T >= 0 && n == 0){ return 0; }else if( T < 0){ return INT_MIN; } else if(T >= 0 && n > 0){ for(int i = 0 ; i…
1
vote
1 answer

C++ Algorithm for solving maximisation in linear programming

I am learning about maximisation with linear programming, and have come across an algorithm for maximisation with two variables (silver and gold in this instance) but I am unsure what a certain section of the code is doing: using namespace…
Barney Chambers
  • 2,720
  • 6
  • 42
  • 78
1
vote
2 answers

How to select weighted items to maximize profit?

This might sound like a simple problem but I am not able to get a good solution. The problem is similar to a knapsack problem but slightly modified. I have a bag which has a fixed capacity, say C. We have a list of items and their weights. The total…
Neo
  • 141
  • 5
  • 16
1
vote
0 answers

Mixed constrained and unconstrained maximization in R

I have a problem trying to maximize a log likelihood function in R. My function has 5 parameters out of which I would like to constrain 3 to be positive while leave the other 2 (which should be very small, close to 0, but either positive or…
g_puffo
  • 613
  • 3
  • 11
  • 21
1
vote
1 answer

Gain maximization on trees

Consider a tree in which each node is associated with a system state and contains a sequence of actions that are performed on the system. The root is an empty node associated with the original state of the system. The state associated with a node n…
1
vote
0 answers

optimization with inequality and bound constraints

I would like to conduct an optimization with inequality and bound constraints: To maximize f= SEA (a,b,c,d) with constraints Pmax (a,b,c,d)<=145 0 <= a <= 10 80 <= b <= 240 0.5<= c <= 1.5 0 <= d <=0.534 Based on literatures, fmincon is an…
1
vote
1 answer

Maximizing in mathematica with multiple maxima

I'm trying to compute the maxima of some function of one variable (something like this:) (which is calculated from a non-trivial convolution, so, no, I don't have an expression for it) Using the command: NMaximize[{f[x], 0 < x < 1}, x, AccuracyGoal…
Jorge Leitao
  • 19,085
  • 19
  • 85
  • 121
0
votes
1 answer

Maximum Fortune by selling and buying potatoes spices over time

Lets say we have an initial fortune of 10$ and we want to make money by buying and selling potatoes and in a magical way we know the prices($) per kg per year of each potato spice. What is the best algorithm to find the final maximum fortune or a…
P. M. K
  • 13
  • 6
0
votes
1 answer

How to find the maximum value of a function changing one constant value in R?

I have the following linearized plot: a and b are vectors with data, c is a constant. The task is find a value of c that maximizes R^2 for a linear regression a <- c(56.60, 37.56, 15.80, 27.65, 9.20, 5.05, 3.54) b <- c(23.18, 13.49, 10.45, 7.24,…
Daniel Valencia C.
  • 2,159
  • 2
  • 19
  • 38