prosysscience / JSSEnv

An OpenAi Gym environment for the Job Shop Scheduling problem.
MIT License
190 stars 55 forks source link

Modification in ENV to have priorization of Jobs and More Limitation on Jobs #21

Open mojeee opened 5 months ago

mojeee commented 5 months ago

Hi there,

You did a great job and thanks for sharing your work, I was wondering if any additional logic like a constraint on the job selection or its availability by changing the legal_job array makes sense or not. For me, it is important to prioritize the job and define more constraint on the one activity of a job? I know it is not based on this logics but can you give me a hint about how I can implement it? just by changing the legal job status?

ingambe commented 5 months ago

Hi,

It for sure can be implemented, as you said by controlling how the legal_job mask is computed you can control which job can be allocated at each decision step. But maybe you might be interested in one of our most recent publication that use Constraint Programming to model the Job Shop environment, if you are familiar with Constraint Programming it might be more flexible for what you want to do: https://github.com/ingambe/End2End-Job-Shop-Scheduling-CP

mojeee commented 5 months ago

Congrats on your great job and thanks for your reply. I like your suggestion and new paper but I think my study case is more similar to the approach to this paper. I wanted to have a prioritization in jobs and availability of machines based on more constraints. Also, I wonder why you always considered the same job length in your study. I have read the paper carefully but didn't understand why you didn't go this way. It would be great if you could help me understand the logic behind it and hint how I can implement these constraints.

mojeee commented 5 months ago

For the Prioritization, I was thinking of giving a reward for specific jobs that have priority but I was worried if it depends on the job number I define or if it doesn't matter and I can consider a reward for some jobs, and in this way I can simulate the prioritization. do you think this is the correct way?

ingambe commented 5 months ago

Also, I wonder why you always considered the same job length in your study.

We used a simple Feedforward network that limited the application of a pre-train model to only the same input representation. Replacing it with a transformer lift this limitation and improve the performance

For the Prioritization, I was thinking of giving a reward for specific jobs that have priority but I was worried if it depends on the job number I define or if it doesn't matter and I can consider a reward for some jobs, and in this way I can simulate the prioritization. do you think this is the correct way?

Yes you can do this, but be sure to also include this information in the representation of the observation. You might have some issue with the scale of the reward in this case (because you won't have a mean of 0 and std of 1), one this you can do to mitigate this issue is to compute a running average and running std of the reward to normalise it

mojeee commented 5 months ago

Thank you for your reply. In your paper, you mentioned that the model needs to be retrained if the number of jobs changes. Could you provide more details on this? Are there any other limitations I should consider, such as variations in the number of machines? Would I need to retrain the model in that case as well? I have modified the model to account for different job lengths, but I want to ensure I am covering all potential limitations. Additionally, I would appreciate any further insights you can provide. My work could lead to publishable results, and I'd be glad to collaborate on this.