Skip to main content
16 votes
Accepted

Ideal programming language for an operations researcher

For modelling, mainly Python. Julia works too but is much less commonly used in companies. For dedicated algorithm implementations, mainly C++. C works too but will require more lines of code and ...
fontanf's user avatar
  • 2,623
10 votes

Ideal programming language for an operations researcher

I am an academic who works on large projects in OR & power systems. This involves a mixture of machine learning (ML), optimization, data-processing, simulations, and more data processing. Our ...
mtanneau's user avatar
  • 4,173
9 votes

Solving MIP in Java with free software

Of the open source LP and MILP solvers, I would recommend investigating the COIN-OR based solvers CLP and CBC. These are C++ based libraries, though work has been done to make them more accessible ...
Mark H's user avatar
  • 550
8 votes
Accepted

how to implement an optimization function with polynomial in Gurobi (Java)

This can be handled by transforming this to a bilinear problem, i.e., a problem only involving products of no more than 2 variables at a time. This is accomplished by lifting the problem into a higher ...
Mark L. Stone's user avatar
6 votes

Ideal programming language for an operations researcher

This is an interesting debate. And key if you remember Sapir - Whorf theory ("linguistic categories influence perception") You may use an Algebraic Modeling Language like AMPL or OPL or GAMS ...
Alex Fleischer's user avatar
6 votes

CPLEX Auto-Benders: How do I get the number of optimality and feasibility cuts?

About the issue you reported on the function getNcuts(), we looked at it and I can confirm that we have a bug in the number of Benders cuts reported by the function ...
Andrea Tramontani's user avatar
6 votes

Java source code for branch and price

I found a manual in Coin-OR Github page where they explained the implementation of the method through 3 different examples. You can find the document in this web address
Oguz Toragay's user avatar
  • 8,652
6 votes

Ideal programming language for an operations researcher

Gretzky: Skate to where the puck is going to be. Or in this case, pucks, Julia being one of the pucks.. Putting on my O.R. hat and viewing language usage as a dynamic system, Julia is on a ...
Mark L. Stone's user avatar
5 votes

Solving MIP in Java with free software

Timefold (previous OptaPlanner) is an open source constraint solver in Java. It's: Used across the globe in governments, Fortune 500 and other companies, startups, nonprofits, ... 100% pure java - ...
Geoffrey De Smet's user avatar
5 votes

Program can't stop when using callback of usercut in CPLEX to solve a branch-and-cut problem

This question was also asked and answered on a CPLEX forum and on my blog. Update: The gist of the answer is that when you add a cut in a callback, CPLEX updates the node solution to reflect that cut ...
prubin's user avatar
  • 39.3k
5 votes

k-means/k-medoids Clustering Implementation in CPLEX Java

Here is how I would do this: you essentially have a facility location problem, every data point is a potential facility and you decide whether you open it or not (i.e., whether it is the leader of its ...
Marco Lübbecke's user avatar
5 votes

Ideal programming language for an operations researcher

Operations research covers a lot of territory. Most of the answers posted are oriented toward optimization, which is fine but a bit limited. For analytics / data analysis, the two most popular ...
prubin's user avatar
  • 39.3k
4 votes
Accepted

Find all Combinations of a Matrix

It sounds like what you want is to reduce each vector in your matrix to the relevant entries, and take the Cartesian Product of the column vectors. That is definitely not a problem where linear ...
Paul Bouman's user avatar
  • 2,100
4 votes

Java in OR: Which non-constraint solving libraries do you use?

A few key ones that I use are: algs4 -- a variety of programs/utilities from an online course at Princeton (Go Tiger!), including some graph/network libraries Various Apache Commons libraries -- for ...
prubin's user avatar
  • 39.3k
4 votes
Accepted

Implementation of Local Branching

You need to use a callback, and CPLEX introduced a new callback system ("generic callbacks") in version 12.8 (I think) while maintaining support, at least for now, for the original callback ...
prubin's user avatar
  • 39.3k
4 votes
Accepted

CPLEX CP Optimizer Java API function missing

I think that you're looking for function IloCP::typeOfPrev. Its documentation is for example here, the description of the general concept is here. Basically, each ...
Petr Vilím's user avatar
4 votes
Accepted

Solution time out for VRPTW in or-tools

Ok so I have figured out a way to speed up the solver and have it return a solution. Key here seems to be adding the following method. ...
k88's user avatar
  • 219
4 votes

Ideal programming language for an operations researcher

Like said in the other answers, first of all, OR covers a big territory. And then you have the business side of things where you are often bounded to certain languages and tools. I think it is useful ...
Steven01123581321's user avatar
3 votes
Accepted

Force gaps between tasks, tasks are scheduled within their job's time windows in Jobshop problem

Here is a working version of your code: You need to change the objective. The obvious optimal is not to schedule any job. You need to add a 0 -> 0 arc to ...
Laurent Perron's user avatar
3 votes

CPLEX CP Optimizer Java API function missing

I'm not a CP Optimizer user, so this may be clunkier than necessary (by an order of magnitude). I'm going to assume that your setup times satisfy the triangle inequality (meaning it's faster to go ...
prubin's user avatar
  • 39.3k
3 votes

Ideal programming language for an operations researcher

Today I'm responsible for the tool chains for 461 engineers, hereof 88 with main focus on OR-like tasks. They cover anything from HPC (20,000 cores) to racks of Nvidia-A100 GPUs to swarms of micro-...
root-11's user avatar
  • 141
2 votes

Solving MIP in Java with free software

The JOpt Mixed Integer Program Optimization Package Wrapper: What is JOpt? JOpt is an open source Java wrapper that provides objects like Variable, Constraint, and Term and lets you express ...
TheSimpliFire's user avatar
  • 5,412
2 votes

How do I learn and use optaplanner ? any detailed tutorials/videos available online apart from the ones in optaplanner website?

These should help: In the OptaPlanner documentation, section 2.4 is a specific Quick Start guide for Spring Boot. But if you're new to Spring, why not learn Quarkus instead, which is faster and ...
Geoffrey De Smet's user avatar
2 votes

ALNS java code with the roulette-wheel-selection?

The idea behind roulette wheel selection is to use a random number generator to pick an index, so that the probability of index $i$ being selected is your $p_i$. One way to do this is to compute ...
prubin's user avatar
  • 39.3k
2 votes
Accepted

How can I change decision variable type in Concert Technologies (with Java)

The type of a variable cannot be changed. However, it can be overwritten for a particular model by adding an IloConversion object, which allows you to specify new types for variables within that model....
Alex Fleischer's user avatar
2 votes

Find all Combinations of a Matrix

In the end, I reduced the matrix by using HashMaps and ignoring the 0 entities. The code needs around 60' to run for a maximum of 2 different row combinations. I am sure that I can still optimize it,...
Georgios's user avatar
  • 1,193
2 votes

CPLEX stuck in solve method - dual simplex solved model

You are solving a MIP not just an LP. Dual simplex solves the LP relaxation of the MIP. After that, the branch and cut process starts. That will usually take even more time than solving the root node/...
Sune's user avatar
  • 6,552
2 votes

RAM overflow when scheduling 1000+ intervals

A stack overflow does not necessarily mean that you ran out of RAM usually being out of RAM throws a java.lang.OutOfMemoryError: Java heap space. To verify this, ...
worldsmithhelper's user avatar
2 votes

CPLEX Indicator Constraints in Java API

I suspect you have not assigned names to your variables. Try doing that and then exporting the .lp file, and I think you will discover that the bidirectional constraint involves a variable that CPLEX ...
prubin's user avatar
  • 39.3k
2 votes
Accepted

if-else query depending on optimization variable in Gurobi (Java)

"variable c (no optimization variable)" is not something that one can say in linear and (mixed) integer programming. There are decision variables and there are parameters (coefficients). ...
Erwin Kalvelagen's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible