Questions tagged [ompr]

25 questions
0
votes
0 answers

Guidance on how to setup CPLEX/GLPK optimizer on R Pro hosted on Linux via OMPR

I have an Optimization model in Excel that I am taking over to R now. Researched a bit and found an OMPR package that best suits my needs and looks very easy to work with. Now when I actually reach the end point to solve the problem, I'm lost on how…
LBZR
  • 161
  • 12
0
votes
0 answers

how to optimize my MIP model to find the best combination of columns and rows with minimum of NAN values?

I have a dataframe with lots of NAN values. My objective is to find the best conbination of columns and rows to maximize my data and minimize the NAN values. One solution I found is to use the ompr package and create a MIP model to solve the…
Akram H
  • 33
  • 4
0
votes
1 answer

How to include matrix multiplication in constraint?

I am trying to make run this model. I am trying to maximize:x[4] w.r.t Mv = c(0,0,0,0) lb < v < ub But I have 2 problems, first matrix multiplication. library(ompr) lb <- c(-200, 0, -200, -200) ub <- c(1000, 1000, 1000,…
Omar113
  • 210
  • 1
  • 7
0
votes
0 answers

Calling variable in rmpk optimization

I'm trying to set a model objective, and I have a matrix A with the same number of rows as the number of variables, which are binary. And basically I want to take a columnwise average using only the rows that end up being chosen (where x = 1). In…
Alex
  • 77
  • 1
  • 6
0
votes
1 answer

Error creating MIP problem using ompr package in R

I'm currently using the ompr and roi packages in R to solve a IP type problem. I've managed to solve a simple version, however, I'm now trying to extend the problem, and I only want to include an item in 1 knapsack (don't allow it to appear in a…
0
votes
1 answer

R OMPR package - Limiting the number of unique variable components chosen

I'm using the ompr package for creating and solving an integer programming problem. For simplicity's sake, I will use NFL football fantasy players as my example. I want to maximize the number of points scored across the 2 games, while only playing 1…
0
votes
0 answers

Product to line allocation in R using ompr. Error: The expression contains a variable that is not part of the model

I am working on an allocation problem using R s ompr package. The aim is to allocate Products to production lines. I have written the following code for this: volume <- product$VolumeQ4 #The volume of quarter 4 of each of the…
0
votes
2 answers

ompr : error message when I add some constraint to my model

I have an error message when I add a constraint to my OMPR model (it works properly like this) n = dim(note_mpg)[1] nb_joueurs = 18 perf = scale(note_mpg$performance_beta) cote = note_mpg$cote_alpha poste =…
jpetot
  • 145
  • 1
  • 10
0
votes
1 answer

How do I add a constraint to ompr linear programming constraint in R so that each person can only be put in 1 role?

I am trying to add a constraint to a mixed integer programming model in R so that each person is only assigned to a single role. I have a data frame that looks like this: ID Name Role PreferenceScore ----- ------- ---------…
0
votes
1 answer

Error in optimization problem with ompr package in R

I am trying to code an optimization problem with the ompr package in R. I tried out a few examples and was now comfortable with trying to implement a simple version of my problem. I get multiple errors if I try to change the code I have. This is the…
1
2