Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different arrival times [feature request] #89

Open
Maros112358 opened this issue Nov 21, 2023 · 7 comments
Open

Different arrival times [feature request] #89

Maros112358 opened this issue Nov 21, 2023 · 7 comments

Comments

@Maros112358
Copy link

Hello, I would like to solve a JSSP problem with different arrival times. Some of the jobs should be available at start t = 0, and others should arrive at time t > 0. I tried to use Wheatley for this purpose, but as far as I know, it does not support this feature right now. Would it be possible to add this feature to Wheatley?

@fantes
Copy link
Collaborator

fantes commented Nov 21, 2023

Hi @Maros112358
we do not have such thing natively, for now our plan to deal with such case is to add "virtual" tasks that do not use any resource but have to be done before the job (or the first task of job) starting at time t > 0.

@Maros112358
Copy link
Author

Maros112358 commented Nov 21, 2023

Hello @fantes, thank you for the quick reply. Your idea sounds like what I want. Are you planning to implement this in the near future? Or can this be done with Wheatley right now?

@fantes
Copy link
Collaborator

fantes commented Nov 21, 2023

Using the rcpsp code, this should work directly by adding such jobs in the problem description file.
In jssp this is a bit more complicated, as tasks have to use a resource so this implies also adding extra "virtual" resources, one per such virtual task in order to be sure that they do not interfere. (a -1 in the description file means that the tasks should not be scheduled at all, not that it does not use any resource). Hope this helps

@Maros112358
Copy link
Author

Hello @fantes, I tried implementing the proposed solution, and I would like to just make a quick check with an example if I understood you correctly.

This is 6x6 JSSP instance in Taillard specification

6	6
1	3	6	7	3	6
8	5	10	10	10	4
5	4	8	9	1	7
5	5	5	3	8	9
9	3	5	4	3	1
3	3	9	10	4	1
3	1	2	4	6	5
2	3	5	6	1	4
3	4	6	1	2	5
2	1	3	4	5	6
3	2	5	6	1	4
2	4	6	1	5	3

For each job, I generated arrival times [7, 0, 0, 5, 8, 0] (first job starts at time 7, second at 0, ...). The JSSP instance in Taillard specification with virtual tasks should then look like this:

6	6
7      1	3	6	7	3	6
8	5	10	10	10	4
5	4	8	9	1	7
5	5	5	5	3	8	9
8	9	3	5	4	3	1
3	3	9	10	4	1
7	3	1	2	4	6	5
2	3	5	6	1	4
3	4	6	1	2	5
8	2	1	3	4	5	6
9	3	2	5	6	1	4
2	4	6	1	5	3

If it's correct, I can prepare a pull request with the code snippet I used.

@fantes
Copy link
Collaborator

fantes commented Nov 28, 2023

Hello @Maros112358
I think the reader/parser will not be able to read files with holes. I would try to also add tasks with a duration of zero (at beginning of jobs 2,3 and 6) and specify that the jssp problem is of size 7 x 6 (or 6x7, I cannot remember which one is number of tasks/number of jobs). Wheatley should be able to deal with null durations directly. I am less sure for ortools/cp-sat, you will have to test. Hope this helps.

@Maros112358
Copy link
Author

Hello @fantes,
it worked correctly even with holes. Wheatley filled the rest automatically.

@fantes
Copy link
Collaborator

fantes commented Nov 28, 2023

ok, that is pretty cool. Just keep in mind that we did not test this case, so do not hesitate to double/triple check the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants