# List of Contributions

## My Content

1 to 20 of 20 total

### RE: Transition matrix for State Function

Posted By Philippe Laborie Jan 18, 2021 3:14 AM
Found In Egroup: Decision Optimization
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 0 0 0 ...

### RE: CP flowshop

Posted By Philippe Laborie Jan 8, 2021 6:10 AM
Found In Egroup: Decision Optimization
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 have a look ...

### RE: CP flowshop

Posted By Philippe Laborie Jan 7, 2021 11:19 AM
Found In Egroup: Decision Optimization
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 ( ...

### RE: CP flowshop

Posted By Philippe Laborie Jan 6, 2021 8:53 AM
Found In Egroup: Decision Optimization
Hi, could you explain what you mean by " i get some results that seems to me incoherent" ? I noticed 3 strange things in the model: 1) The interval variables representing the operations are defined without specifying any length (duration) so the engine consider the length is unconstrained (domain is ...

### RE: Sequence of an interval?

Posted By Philippe Laborie Jan 5, 2021 3:27 AM
Found In Egroup: Decision Optimization
Ok, I see. I guess you also have some decrease of the cumul function so a mix of +stepAtStart and some -stepAtStart|End ? ------------------------------ Philippe Laborie ------------------------------

### RE: Sequence of an interval?

Posted By Philippe Laborie Jan 4, 2021 10:03 AM
Found In Egroup: Decision Optimization
There is something strange in this model. As you are using some sequences of interval variables, I guess at some point you will post a noOverlap constraint on these sequences otherwise you do not need to use the concept of sequence variable. But then, if the intervals on a sequence do not overlap, the ...

### RE: Sequence of an interval?

Posted By Philippe Laborie Jan 4, 2021 2:34 AM
Found In Egroup: Decision Optimization
Do you need to constrain the cumul function f during the complete horizon (for all t: f(t)&lt;=5) of only during some interval ? ------------------------------ Philippe Laborie ------------------------------

### RE: CP Optimality

Posted By Philippe Laborie Dec 11, 2020 4:52 AM
Found In Egroup: Decision Optimization
CP or CP Optimizer ? In general, CP proves optimality when the search space has been exhaustively explored so that it can show that there is no better solution than the incumbent one. CP Optimizer does this of course as part of the strategies used to solve the problem are complete explorations of ...

### Black-box expressions in CP Optimizer 20.1

Posted By Philippe Laborie 12/1/2020 4:28:49 AM
Found In Group: Decision Optimization Blogs
Black-box expressions Constraint Programming (CP) is known for its expressiveness for modeling and solving combinatorial optimization problems. In particular, CP uses predefined expressions, such as product or division between variables ( x*y*z , x/y ), logarithm ( log(x) ), power ( x^y ), etc. that ...

### RE: Mac OS and CPLEX interactive

Posted By Philippe Laborie Nov 10, 2020 4:54 AM
Found In Egroup: Decision Optimization
Hi David, You may be interested in this answer . You can easily install rlwrap on Mac OSX by doing 'brew install rlwrap'. Philippe ------------------------------ Philippe Laborie ------------------------------

### RE: Group Shop Scheduling Problem

Posted By Philippe Laborie Nov 4, 2020 8:15 AM
Found In Egroup: Decision Optimization
So if I understand well, a job is a fully ordered set of groups of operations and within a group, the operations will have to be sequenced but the order is not fixed. I'm I right? In this case, the simplest model is to re-use the open shop model (unfixed sequence on all the operations of a job), but ...

### RE: how to schedule even/odd time tasks

Posted By Philippe Laborie Oct 26, 2020 1:00 PM
Found In Egroup: Decision Optimization
I see. The problem occurs because you do not have any "no_overlap" constraint on the sequence variable 'start_sequence' and thus, the value of the sequence (the ordering of the interval variables in the sequence variable value) is not related with the start/end value of the interval variables. If you ...

### RE: how to schedule even/odd time tasks

Posted By Philippe Laborie Jul 28, 2020 2:16 AM
Found In Egroup: Decision Optimization
" I was doing something like (startof(t[i]) - startofPrev(s, t[i],0) ) %2 == 1. It was ordering it t1, t0, t3, t2 but the distance between t1 and t0 was even. " Really? Then it is a bug. The Prev/Next are the ones of the sequence in the solution, so if the solution is t[1], t[0], t[3], t[2], the the ...

### RE: how to schedule even/odd time tasks

Posted By Philippe Laborie Jul 27, 2020 11:05 AM
Found In Egroup: Decision Optimization
There is something I do not understand. The formulation with isomorphism also do not guarantee that t0 is before t1. It could be that, in the solution t1, is before t0, no ? If the sequence is known in advance (t0 before t1 before t2 ...), then you do not need sequence variables or isomorphism, you can ...

### RE: how to schedule even/odd time tasks

Posted By Philippe Laborie Jul 21, 2020 4:25 AM
Found In Egroup: Decision Optimization
If (as I understand) the sequence of tasks is not known a priori, I would consider a model like this one: using CP ; int n = 10 ; dvar interval x [ i in 0 . . n ] size 1 ; dvar sequence s in x ; subject to ( noOverlap ( s ) ; forall ( i in 0 . . n - 2 ) ( ( endOfPrev ( s , x [ i ] , 0 ...

### RE: Cpoptimizer java and OSX

Posted By Philippe Laborie Jul 16, 2020 10:10 AM
Found In Egroup: Decision Optimization
The only two libraries that are required are: ../../../bin/x86-64_osx/libcp_wrap_cpp_java12100.jnilib ../../../../cplex/bin/x86-64_osx/libcplex12100.jnilib It is not clear to me why they are not found when setting variable DYLD_LIBRARY_PATH. When I'm using : java -Djava.library.path=../../../ ...

### RE: Cpoptimizer java and OSX

Posted By Philippe Laborie Jul 15, 2020 6:23 AM
Found In Egroup: Decision Optimization
I tried on my Mac also running under Catalina (10.15.4) and did not notice any problem: [static_pic] ☞ make execute_java DYLD_LIBRARY_PATH=../../../bin/x86-64_osx:../../../../cplex/bin/x86-64_osx /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin/java -classpath ../../../lib/ILOG.CP.jar:. ...

### RE: Overlap constraint for interval variables

Posted By Philippe Laborie Jul 1, 2020 10:26 AM
Found In Egroup: Decision Optimization
So if you already know the clique decomposition, indeed it is a good new and you should use Petr's suggestion. I noticed something else looking at the model: - Maybe it could help the search to use additional intervals of length 1 at the end of the tasks and instead of the AllDifferent constraint, use ...

### RE: Overlap constraint for interval variables

Posted By Philippe Laborie Jul 1, 2020 9:26 AM
Found In Egroup: Decision Optimization