Task Scheduler with Resource Pools and Capacity

1,156 views
Skip to first unread message

Ricardo Mendes

unread,
Jun 27, 2018, 10:54:20 AM6/27/18
to or-tools-discuss

Hello,

 

I'm new to Or-Tools but I'm consider using it as a constraint solver framework to develop a Task Scheduler Engine.

I need to orchestrate a pool of multi-resources and be able assign one or more of them to each task, allow some variable degree of overlap for each task, include resource calendar…

 

Is Or-Tools a feasible approach? There are any C# scheduling examples besides JobShop?

 

Best Regards

Laurent Perron

unread,
Jun 27, 2018, 12:34:56 PM6/27/18
to or-tools-discuss
Hi, 

The gate scheduling is also a scheduling problem.
Otherwise, you can look at the python examples, in particular examples/python/rcpsp_sat.py which cover a lot of scheduling constraints.
Modeling wise, examples/cpp/jobshop_sat.cc also shows complex features, in particular transition times between tasks.

It is mostly not written, but I can add relevant code snippets if needed.

Thanks
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Jing Liu

unread,
Jul 16, 2018, 6:01:04 PM7/16/18
to or-tools-discuss
Thank you Laurent.

It is really helpful. But I was wondering if there is a way to get the name assigned to a IntervalVar. 

For instance, I declared a IntervalVar: IntervalVar interval =  model.NewIntervalVar(start_var, duration, end_var, "task 1"); How can I get the name (i.e., task 1) of interval later?

I am using C#.

Thank you.

Laurent Perron

unread,
Jul 16, 2018, 6:13:00 PM7/16/18
to or-tools-discuss
Hi, 

I have added a name method in C#/Python for IntVar and IntervalVar.

This is live on github.

I should be available in the 6.8 release (soon).

Thanks
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Jing Liu

unread,
Jul 16, 2018, 6:21:48 PM7/16/18
to or-tools-discuss
Awesome. It would be great if you can add one more function in getting the duration for IntervalVar.

Thank you,

Laurent Perron

unread,
Jul 16, 2018, 6:24:37 PM7/16/18
to or-tools-discuss
This one may not be fixed.

So it is better if you do the book keeping on your side.

--Laurent

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Jing Liu

unread,
Jul 16, 2018, 6:38:01 PM7/16/18
to or-tools-discuss

Thank you for your quick reply. OK, I will record the duration when declaring a new IntervalVar.

Thank you,
Jing

Jing Liu

unread,
Jul 16, 2018, 10:53:30 PM7/16/18
to or-tools-discuss
Could you please post some code snippets on modeling precedence relationships between intervals? I am trying to model a rcpsp problem using C#

Thank you,


On Wednesday, June 27, 2018 at 10:34:56 AM UTC-6, Laurent Perron wrote:

Laurent Perron

unread,
Jul 16, 2018, 11:18:43 PM7/16/18
to or-tools...@googlegroups.com
See jobshop_ft06_sat.cs, the section on precedence.

Get back the start and end variables of the intervals, and add

model.Add(start_of_second_interval >= end_of_first_interval);

Jing Liu

unread,
Jul 16, 2018, 11:50:24 PM7/16/18
to or-tools-discuss
What if I need to add some lag time between two tasks? Now I am using the following code and not sure if it is correct. Because I found that I cannot add one IntVar and one int.

model.Add(start_of_second_interval >= end_of_first_interval + model.NewConstant(lagTime));

Thanks,
Jing

Laurent Perron

unread,
Jul 17, 2018, 10:40:23 AM7/17/18
to or-tools-discuss
In C# ad python, you can easily add integer to variables.

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Ricardo Mendes

unread,
Jan 30, 2019, 5:23:17 PM1/30/19
to or-tools-discuss
Hi, 

Where can I find a sample in C# addressing resource pools. I'm not familiar with python, so rcpsp_sat.py is not usefull to me.

Regards

Ricardo Mendes

unread,
Mar 17, 2019, 1:44:09 PM3/17/19
to or-tools-discuss
Hi,

I created this thread, but I was allocated to other projects, and I didn't had further improvments in this area.
Do you succeded modeling a rcpsp problem using C#? I hope back to schedulling engine soon.

Regards

Laurent Perron

unread,
Mar 18, 2019, 5:57:17 AM3/18/19
to or-tools-discuss
We have added more examples, and an doc section on it:


Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Reply all
Reply to author
Forward
0 new messages