7
$\begingroup$

First I want to say that I'm very new to this field.

As far as I understand it, there are two different ways to use a Constraint Programming (CP) Solver:

  1. Using the API from the Solver itself. For example .Net Interface for IBM ILOG CPLEX.
  2. Using a Framework that works with many solvers. The Framework translates the constrains in the format that the chosen solver can read. For example, AMPL.

There is a related question that gives a very good explanation and insights. @Rob posted a very detailed answer with many solvers. The disadvantage is that the list shows, in that language the solvers are coded and not in which they can be used. Also, it's not up to date.

The Problem that I want to solve is a Job Shop scheduling problem, which also has parallel machines. It is for planning real production and not a research project.

The project is programmed in .Net Core, so I am looking for a solver or a framework that has a compatible API for .Net Core. The desired is a framework that can use various solvers in the background.

I found that CPLEX has an interface for .NET.

The second is Google OR, there @Laurent Perron answerded in the question:

Now, to answer you questions, the goal of OR-Tools is to interact with the scientific community and the OR community. This being said, we are very pleased to see a large community of commercial users relying on it for their business, and we do our best to support them.

So this two might be possiblities.

So, my question is, "Doe's anyone have experience with using frameworks/solvers for Constraint Programming in .Net Core?"

Also, I appreciate any suggestion to find links of more frameworks/solvers that are compatible with .Net Core.

$\endgroup$
  • 1
    $\begingroup$ We just use OR-Tools internally at Google. Does it qualifies as real world use ? This being said, it is true that .NET is only used externally. But we have dedicated users for this API. $\endgroup$ – Laurent Perron Sep 11 at 9:55
  • $\begingroup$ AFAIK, few solvers can use Cp to solve scheduling problems and some of them have capability to use .NET API (E.g. CPLEX). Would you like just using Cp or could you develop a MIP for your problem? $\endgroup$ – abbas omidi Sep 11 at 11:02
  • $\begingroup$ @abbasomidi I'm new to this field and have not many background. Maybe it's possible to devolope this as a MIP, but not sure. Have you a MIP Framework for .Net that you can recommend me? $\endgroup$ – Tobias M. Sep 11 at 11:13
  • $\begingroup$ @LaurentPerron thanks for your comment, I have misunderstand this. The question have been updated with the new informations. $\endgroup$ – Tobias M. Sep 11 at 11:21
2
$\begingroup$

Not sure about CP solvers, but for FICO Xpress the .NET .dll also works for .NET core. So I would suspect that similar transferability is also applicable for CP solvers.

The reason is in my opinion fairly clear: the API .dlls (the ones that contain the classes and methods accessible in .NET Core) are pretty simple, and the heavy lifting is done in the C part of the library.

To check whether a given .dll is compatible with .NET core, check out the .NET portability analyzer from Windows.

$\endgroup$
0
$\begingroup$

As you mentioned, you will need to develop a practical (non-academic) scheduling model, you have two different options.

  • First, if your problem scale is not too large, I recommend developing a MIP formulation for your problem. Indeed, you could achieve an optimal solution. Some useful examples have been found via this, this or this links.
  • Second, if your problem is the large scale that MIP solvers can not solve it in a reasonable time, you should use other techniques like CP.
    However, CP has a suboptimal solution but, in the large scale model, it can solve the problem in a reasonable time. Some useful example in the CP could be found via this or this links.

In both cases, you will need a solver such as CPLEX to solve MIP or CP, or you can use an open-source solver such as MIPCL. Might, you want to use some ASP software that I recommended ASPROVA or MRPEasy.

$\endgroup$
  • 2
    $\begingroup$ Please, this looks like CP-Bashing. I truly believe that CPO optimizer is the best scheduling solver around, and much better than MIP formulations on any MIP solver on average. I know Gurobi, CPLEX, XPress are fantastic tools, but for large scale scheduling, it is unbeatable. $\endgroup$ – Laurent Perron Sep 11 at 14:03
  • $\begingroup$ @LaurentPerron, I'm pretty sure, (according to my experience) some state-of-the-art solvers such as CPLEX or GUROBI can solve large scale MIPs in a reasonable time. I recommended using them but, if you like just using CP, this and this links might be useful. It should be noted that GAMS has a very good .NET API but, I don't know it supports CP solver or NOT. $\endgroup$ – abbas omidi Sep 11 at 18:46
  • $\begingroup$ First comment, the bragging part. Our solver won 4 gold medals at the last minizinc challenge. $\endgroup$ – Laurent Perron Sep 11 at 19:04
  • $\begingroup$ Second comment. I am sorry, I meant using Gurobi to solve large scheduling problems. The initial question is about solving scheduling problems. I believe CP has proven to be good at it, and CPO is very good at it, better than MIP solvers. Furthermore, I believe the API to solve scheduling problems using CPO or OR-Tools is much nicer than what you need to write to solve the same problems using a linear formulation. $\endgroup$ – Laurent Perron Sep 11 at 19:07
  • $\begingroup$ @LaurentPerron, very well. If you know what you want, you would go ahead. :) $\endgroup$ – abbas omidi Sep 11 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.