Questions tagged [operations-research]

Operations Research is the application of quantitative techniques to decision making, typically involving mathematical optimization. Problems include dynamic programming, linear programming and Integer programming & discrete optimization.

Operations Research is the application of quantitative techniques to decision making, typically involving mathematical optimization. A problem is modeled as a math formulation, and the solution obtained via a solver. Problems in OR include dynamic programming, linear programming and Integer programming and discrete optimization.

The other names for Operations Research (OR) include Decision Science, Management Science, or Operational Research.

The Wikipedia page on Operations Research. INFORMS, the society for OR practitioners has a lot of relevant information.

192 questions
0
votes
1 answer

How to use a Pyomo variable result to interpolate a from a list during optimisation?

Let's say you own a fruit store and want to find the optimum number of apples to sell each day. However, there is a different price associated depending on how many apples are sold (you have no say in these bundled price pairs). e.g. …
Jwem93
  • 243
  • 1
  • 7
0
votes
0 answers

Advanced transportation optimization problem

I'm trying to explore OR problems and wanted to know what algorithm fits here. Consider fuel stations with lithium ion battery that service replacing battery at each refuel ( you replace your batters with a new one). As an optimization problem, I'd…
0
votes
1 answer

Can an optimization constraint be implemented with 2 variable that declared with different feature?

My goal is to write the following constraint with the doxplex.mp.model with Python API: P[t,j] >= s[t-j+1] - sum(s[k=t-j+2] from k to t) for t = 1,....,N, j = 1,...,t my code. from docplex.mp.model import Model clsp = Model(name = 'capacitated lot…
0
votes
0 answers

Retrieve bit string from NEOS

I am trying to solve an LP file(Link to google drive if you would like to try it) via CPLEX on the NEOS servers. I can find the objective value quite easily, that being 9.200000000000e+01. However, I am also looking for the bit string to let me know…
0
votes
1 answer

'generator' object has no attribute 'is_expression_type'

I am using pyomo to model a problem and am having some difficulty in constructing a constraint using data from a block. I have the block all set to go, totally debugged. When I go to access some of the data from it as part of a constraint, I receive…
0
votes
0 answers

problem about vehicle routing problem by Gurobi Python

I have a vehicle routing problem solved by linear programming, but I'm confused about the constraints of it (see the model on figure 1). in the model, u and x are decision variables, and we set node 0 as the depot, nodes 1 to n as customers.…
0
votes
2 answers

How to modify variables and constraints of an existing Google OR-Tools Constraint Programming model?

I have written a constraint programming model using Google OR Tools in Python, which uses CP solver. I need to run that model multiple times, and in each run I modify constraints. Currently, I create the model object from scratch, every time I want…
0
votes
1 answer

Gurobi is not Minimizing the Objective function

The problem is as follows: Let predict = [15, 15, 17, 16, 14, 15, 16, 14, 14, 22] be a list of numbers. I want a sequence of number x = [x0,x2,x3,....,x9] such that |x[0] - predict[0]| + |x[1] - predict[1]| + ...+ |x[9]-predict[9]| is minimum. The…
ABCD
  • 7
  • 3
0
votes
1 answer

Correctly formulate a constraint in Gurobi Python

I am using a python IDE with gurobi to model and solve a problem for an assignment. The problem, although not stated seems to be an OVRP(Open Vehicle Routing Problem)(with some extra constraints). The code i have right now is: from itertools import…
user9053043
0
votes
1 answer

Single-source and multi-destination problem in CPLEX/Docplex?

Can we use the CPLEX/Docplex for single-source and multi-destination problem in a network? For example, routing a vehicle from a source to visit multiple destinations in a single trip minimizing the overall travel time.
0
votes
1 answer

What is another way to solve this quadratic problem within CPLEX?

I would like to know if there is another form of coding that could be used (within CPLEX) to have the same results as in the code below: dvar int+ n[1..2]; dexpr float z = - 3*n[1]^2 - 4*n[2]^2 - 4*n[1]*n[2] + 5000*n[1] +…
0
votes
1 answer

How can I solve a Knapsack problem with CPLEX?

Can someone please help me with a code to this problem. The problem wants me to maximize total benefit by filling a 10-lb knapsack with the following data pic:
0
votes
0 answers

Staff Planning Optimization Problem using Pyomo

I am trying to solve this staff planning optimization problem but not able to create the objective function, decision variables and constraints. Need help please. The company operates in three states: A, B and C. The state-wise demand for insurance…
Suraj
  • 1
  • 1
0
votes
0 answers

How is it possible to call functions in PuLP (Python) constraints?

Use case This is just an easy example for understanding, how and why it is not working as expected. There is a set of processes, which have a start and a finishing timestamp. the start timestamp of a process must be after the finishing timestamp of…
FXG
  • 491
  • 3
  • 10
0
votes
2 answers

How to import CSV file in Python API of CPLEX

I would like to import this file http://people.brunel.ac.uk/~mastjjb/jeb/orlib/files/scp61.txt . Does CPLEX support this format in Python? I converted the text file to a CSV file then wrote this code cplex.read("scp61.csv") but I got this…