List of Contributions

Philippe Laborie

Contact Details

My Content

1 to 20 of 38 total
Posted By Philippe Laborie Tue May 18, 2021 02:34 AM
Found In Egroup: Decision Optimization
\ view thread
Duplicate of : this question ------------------------------ Philippe Laborie ------------------------------
Posted By Philippe Laborie Tue May 18, 2021 02:29 AM
Found In Egroup: Decision Optimization
\ view thread
Hello, First, if your problem is a "permutation" flow-shop" as the title suggests, then you are missing some constraints enforcing that the order of the operations is the same on each machines. This is a "sameSequence" constraint. The modified model is the one below. int nJobs=...; int nMachines=...; ...
Posted By Philippe Laborie Fri May 14, 2021 05:20 AM
Found In Egroup: Decision Optimization
\ view thread
You are doing nothing wrong. You found a bug in CP Optimizer ! We will fix it. An easy work-around is to use search parameter SearchType=Restart as the bug occurs in a strategy used by the automatic search but not in the 'Restart' context. I also realize that using only the 'element' constraint ...
Posted By Philippe Laborie Fri May 14, 2021 02:34 AM
Found In Egroup: Decision Optimization
\ view thread
I think that you should try using 'element' expressions for sorting the array of values. The formulation will be in O(n) instead of O(n^2). Here is an example: model = CpoModel() n=10 # MODEL c = [integer_var(min=10,max=10+n) for i in range(n)] model.add(all_diff(c)) model.add(c[0]>c[1]) ...
Posted By Philippe Laborie Mon May 03, 2021 01:05 PM
Found In Egroup: Decision Optimization
\ view thread
Very interesting ... There is indeed probably not much to exploit about the elements of the sets (the pixels) and the interval variables (the fields or the observations). You could of course group together the pixels belonging to exactly the same sets (but maybe this does not occur very often). ...
Posted By Philippe Laborie Mon May 03, 2021 08:37 AM
Found In Egroup: Decision Optimization
\ view thread
As a complement to Renaud's answer, it could be interesting to know if there is some sort of correlation between the interval variables and their corresponding set. I suppose that in the real problem, the sets are not random sets but are somehow related with the interval variables or other aspects of ...
Posted By Philippe Laborie Fri April 23, 2021 02:08 AM
Found In Egroup: Decision Optimization
\ view thread
The signature of the alternative constraint is: alternative(x, Y, c) Where x is an interval variable, Y an array of interval variables and c an integer cardinality (constant or variable). The constraints states that whenever x is present, exactly c intervals in Y must be present (all the other ...
Posted By Philippe Laborie Tue April 20, 2021 06:40 AM
Found In Egroup: Decision Optimization
\ view thread
Hi Louis, This cannot be done in Python. Callbacks in CP Optimizer do not permit to change the state of the engine (like reducing the domain of some variables). You need to write a custom constraint. Custom constraints are available in C++ only. ------------------------------ Philippe Laborie ...
Posted By Philippe Laborie Mon April 19, 2021 12:38 PM
Found In Egroup: Decision Optimization
\ view thread
Unfortunately, blackbox expressions are still not available in the Python API. You could do it in C++ of course. In the absence of blackbox expression, the only thing you can do is a much weaker integration with the search if you can formulate in the model an approximation of the actual cost function, ...
Posted By Philippe Laborie Mon April 19, 2021 04:38 AM
Found In Egroup: Decision Optimization
\ view thread
Hi Mohamed, What do you ant to do with the computed cost ? To reinfect it in the model so that the objective really is to minimize the cost that depends on the end times ? Why don't you do it directly in the model ? Is it because you cannot express the computation of the cost using an analytical expression ...
Posted By Philippe Laborie Tue March 16, 2021 10:33 AM
Found In Egroup: Decision Optimization
\ view thread
You can refill with a variable value. Here is a variant of the example: // RANDOM DATA int n = 10; execute ( Opl.srand(0); ) int C = 100; int DC = 10; // Duration of cleaning activities int U[i in 1..n] = 1+rand(C div 2); int D[i in 1..n] = 1+rand(100); // MODEL using CP; // Activities ...
Posted By Philippe Laborie Tue March 16, 2021 04:38 AM
Found In Egroup: Decision Optimization
\ view thread
As a complement to Alex's formulation, it can be good to break symmetries on the 'refill' interval variables. This would increase the propagation in the engine too. You can easily do that by adding the following constraints: forall (j in 1..4) ( presenceOf(refill[j+1])=>presenceOf(refill[j]); ...
Posted By Philippe Laborie Mon March 08, 2021 10:52 AM
Found In Egroup: Decision Optimization
\ view thread
The only difference between the classical HFS and the classical Flow-shop scheduling problem is that there are several parallel machines (say C[s]) for each stage s instead of a single one. So with CP Optimizer, you only need to use a cumul function instead of a no-overlap constraints. In OPL, it looks ...
Posted By Philippe Laborie Mon March 08, 2021 02:39 AM
Found In Egroup: Decision Optimization
\ view thread
Hello Muhammad, I think you should give more context with your questions: - Are you planning to use CP Optimizer or CPLEX Optimizer to formulate and solve your problem? - What do you mean by the distance between the objective and the best integer solution ? The current optimality gap ? - In general, ...
Posted By Philippe Laborie Tue March 02, 2021 03:02 AM
Found In Egroup: Decision Optimization
\ view thread
Not sure that will be useful but if two sequences use the same subset of intervals, you can also have a look at constraints "sameCommonSubsequence", which says that the sequences are the same on the intervals they have in common (the A in your case). This being said, in the case of this constraint, I ...
Posted By Philippe Laborie Mon March 01, 2021 03:53 AM
Found In Egroup: Decision Optimization
\ view thread
I think there are two way to model your problem: 1- Either by using two sequences with the same interval variables and the two transition matrices (as you did). Note that you could additionally tell the engine that the two sequences are the same by adding a 'sameSequence' constraint. This can potentially ...
Posted By Philippe Laborie Mon March 01, 2021 03:26 AM
Found In Egroup: Decision Optimization
\ view thread
If the infeasibility is due to the interactions between jobs and not to the constraints inside the jobs themselves, then I think the conflict refiner will be of little help here, except for identifying some reason why the problem is globally infeasible. Indeed, if the infeasibility is global (for instance ...
Posted By Philippe Laborie Mon January 18, 2021 03:15 AM
Found In Egroup: Decision Optimization
\ view thread
Hi Andy, In OPL all transition distance matrices are indexed from 0 to the largest number used in the triples. So here, the matrix is indexed on [0,4]. By default, any value of the matrix that is unspecified is 0, so your matrix looks like: 0 1 2 3 4 0 0 0 0 0 0 1 0 2 0 0 0 2 0 2 0 0 0 3 0 2 ...
Posted By Philippe Laborie Fri January 08, 2021 06:10 AM
Found In Egroup: Decision Optimization
\ view thread
1. Yes, nothing changes in the model except that Machines will be declared as string: tuple Operation ( key int opid; key string jobid; string mch; // Machine, operation id int pt; // Processing time int st; // Setup time ); ... (string) Mchs = ( o.mch | o in Operations ); 2. You should ...
Posted By Philippe Laborie Thu January 07, 2021 11:19 AM
Found In Egroup: Decision Optimization
\ view thread
You have to be more precise. What do you mean by "it doesn't give me any result even after almost 2 hours!". What happens? Do you have a log of the search or some error messages to share with us? There is clearly a problem with this line of your code: dvar interval itvs[j in Jobs][o in Mchs] size ...