Questions tagged [r]

For questions about solving Operations Research problems using the R programming language.

Filter by
Sorted by
Tagged with
2 votes
1 answer
48 views

Is it possible to merge two objective functions using the LpSolve package in R?

I have been using the LpSolve package to solve a minimization problem in my final course work, but I need to reconcile this problem with a maximization problem. Conducting several researches, I ...
user avatar
2 votes
1 answer
84 views

3D Knapsack Problem: R or Python Packages?

For an upcoming client project, I'm looking to do a 3D variant on the knapsack problem. Basically, there's a bin of dimensions $x,y,z$, and I have $K$ units of an item with dimensions $a,b,c$. (...
user avatar
3 votes
1 answer
65 views

Application with VIKOR multicriteria method

What to do in these cases where I can't rank by the VIKOR multicriteria method because Q has no value? ...
user avatar
  • 227
0 votes
1 answer
61 views

Conflicts with weights of the topsis method in R

Why can't I generate for the topsis method, choosing a w <- c(1, 0)? As far as I know it has to be the sum of the weights ...
user avatar
  • 227
6 votes
3 answers
127 views

Linear Programming problem for finding supplier

I have a linear programming problem in front of me that I am searching to solve in R (any package), seems like an unbalanced assignment problem to me with relaxed constraints on columns (repeated ...
user avatar
  • 183
1 vote
0 answers
27 views

How to utilize Spearman Rho coefficient

The dataset below presents the ranking of different multicriteria methods. My idea is to generate a final ranking based on the multicriteria methods for all alternatives, but it can be seen that in ...
user avatar
  • 227
2 votes
1 answer
56 views

Using VIKOR multicriteria method in R

I'm using the VIKOR multicriteria method from the MCDM package. The example can be found here: https://cran.r-project.org/web/...
user avatar
  • 227
1 vote
0 answers
45 views

How to use PROMETHEE multicriteria method in R

I used TOPSIS multicriteria method to select the best number of clusters out of the 34 options. As weights I used 0.5 for each criterion. The ...
user avatar
  • 227
1 vote
1 answer
63 views

How to Use the Weighted Sum Method in R

I would like to use the weighted sum method to select the best number of clusters out of the 34 options. As weights I would like to use 0.5 for each criterion. The coverage criterion is to minimize ...
user avatar
  • 227
1 vote
1 answer
64 views

Use the Weighted Sum Method in R

I would like to use the Weighted Sum Method (Multi Criteria Decision Making) in R in this database below. The resolution of the issue is here: https://www.geeksforgeeks.org/weighted-sum-method-multi-...
user avatar
  • 227
4 votes
2 answers
123 views

R package for multi objective integer evolutionary algorithm

I have a discrete event simulation (simmer package) based on probability distributions in R. I would like to optimize the variables according to several (2 or more) objectives. I used the NSGA-II ...
user avatar
  • 41
2 votes
2 answers
86 views

How to use `cplexAPI` to solve quadratic programs/quadratically constrained linear programs?

I am trying to use cplexAPI to solve quadratic programs or quadratically constrained linear program. While it seems to be pretty straightforward to use ...
user avatar
  • 21
4 votes
2 answers
163 views

Optimizing a capacitated clustering problem with Greedy search algorithm

So, I am trying to implement a greedy search algorithm to cluster a number of points. Each point has a specific demand and each cluster shouldn't exceed that demand. Now, when I run it for a smaller ...
user avatar
3 votes
0 answers
117 views

How to approach this Truck Utilisation problem?

The problem statement currently I have is very broad (or you can say very vague at the same time): I have a number of dropping locations (Customer locations) I have the location of the HUB I have a ...
user avatar
5 votes
4 answers
458 views

Solving Capacitated VRP with multiple various sized vehicles

I am looking to form a Capacitated VRP problem like this: I have 40,000 dropping locations with Demands of each point available I have 5-6 types of vehicles available with different capacities and ...
user avatar
3 votes
1 answer
123 views

Problems with reading CPLEX LP models from file in R by package 'lpSolveAPI'

As an R user, I'm trying to read a CPLEX LP model from file by using the read.lp function from package lpSolveAPI. Here's the command line (from within RStudio): ...
user avatar
3 votes
0 answers
78 views

R ompr MILPModel array multiplication?

In R, I regularly ompr::MILPModel for optimization. I adapt the below snippet to enable multiplication of a decision variable with two dimensions (e.g., x[i,j] ) ...
user avatar
3 votes
1 answer
366 views

Non-numeric argument to binary operator in MILPModel of ompr package

I am familiar with how to use ompr::MIPModel but I am trying to learn how to use MILPModel to take advantage of the model build ...
user avatar
3 votes
2 answers
157 views

Using R for coding Matheuristic for Research Publication

Given that R possesses superior data pre-processing and post-processing packages, I am thinking of coding a matheuristic using R for publishing in an academic research journal. However, I am unable ...
user avatar
  • 663
5 votes
3 answers
192 views

Reducing number of suppliers for product portfolio

I have the following matrix of suppliers who are able to make a certain product, against all products in my portfolio. What is the best way of finding the solution to "the least suppliers necessary ...
user avatar
  • 151
5 votes
2 answers
1k views

VRP package for R

I work almost exclusively in R and Rstudio, and have found it to be an excellent ecosystem for data analysis and OR, including discrete event simulation, Monte Carlo simulation, MILP, and the ...
user avatar
  • 371
6 votes
1 answer
107 views

DAG shortest path in R - I have a list of nodes, each node's completion time and each node's predecessor(s). How can I turn this to a list of arcs?

Without trying to manually sketch out a graph on paper, is there a simple way I could get the arcs between nodes in this problem? I am using R and it seems there must be an elegant way of doing so but ...
user avatar
9 votes
2 answers
188 views

When should I use a solver for IP and MIP and can I just use a library from Python, R, Matlab, etc...?

Are there any rules of thumb for figuring out when you need to use a solver like Gurobi or CPLEX, and when you can just solve you problems directly with a Python, R, or Matlab package? Is it just a ...
user avatar
  • 2,009
5 votes
2 answers
558 views

Queuing models in R, $\lambda$ Little

It's noted that the number of folks in a stationary system will maintain an average equal to the rate of arrival multiplied by the mean of the service distribution. The formula $L = \lambda w$ is ...
user avatar