Original Message:

Sent: Mon February 26, 2024 05:24 PM

From: Francisco Yuraszeck

Subject: How to suggest to CP Optimizer a starting value for an interval variable in OPL

Thank you Alex for your answer.

I was wondering if there exists an easy way to do the same. I would like to provide the starting solution to CP Optimizer in the following manner:

`itvs = [<1 0 0 0>`

` <1 0 186 186> <1 251 425 174> <1 594 732 138> `

`<1 846 968 122> `

`<1 4910 4910 0>];`

Where these values were obtained in a previous execution of the solver.

------------------------------

Francisco Yuraszeck

Yuraszeck

Original Message:

Sent: Mon February 26, 2024 01:48 AM

From: ALEX FLEISCHER

Subject: How to suggest to CP Optimizer a starting value for an interval variable in OPL

Hi,

I shared an example at https://stackoverflow.com/questions/63911236/how-to-give-to-cp-optimizer-an-initial-feasible-solution

`using CP;range r = 1..10;dvar interval x[r] size 1;dvar interval y[r] size 1;// The following array of values (defined as data) will be used as // a starting solution to warm-start the CP Optimizer search.int values[i in r] = (i==5)? 10 : 0; minimize sum( i in r ) startOf(x[i]) + sum( j in r ) startOf(y[j]);subject to{ctSum: sum( i in r ) startOf(x[i]) >= 10;forall( j in r ) ctEqual: startOf(y[j]) == j;} execute{for(i in r) write(Opl.startOf(x[i])," ");writeln();}main{thisOplModel.generate();var sol=new IloOplCPSolution();for(var i=1;i<=10;i++) sol.setStart(thisOplModel.x[i],thisOplModel.values[i]);cp.solve();thisOplModel.postProcess();cp.setStartingPoint(sol);cp.solve();thisOplModel.postProcess();}`

------------------------------

[Alex] [Fleischer]

[Data and AI Technical Sales]

[IBM]

Original Message:

Sent: Fri February 23, 2024 05:20 PM

From: Francisco Yuraszeck

Subject: How to suggest to CP Optimizer a starting value for an interval variable in OPL

Hello moderators & IBM community:

I am working on a scheduling formulation in **OPL** and using **CP Optimizer** as a solver engine.

In this context, I have the following interval variable:

`dvar interval itvs[t in Tasks] size t.pt;`

I want to suggest a starting solution for the interval variable `itvs`

to CP Optimizer.

For instance, I would like to set a "starting point" for each **start time** of itvs[t] that generates a feasible solution for the problem being solved.

Could you please provide a small example of how can this be achieved?

------------------------------

Francisco Yuraszeck

Yuraszeck

------------------------------