-
Notifications
You must be signed in to change notification settings - Fork 55
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
Regarding implementation of _prioritization_non_final function #6
Comments
Hello, Thank you, it's nice to hear it is useful :)
if len(non_final_job) > 0: Checks if there are non-final jobs to schedule, if there are, we need to make some final jobs illegal. Otherwise, we don't as there are no jobs that are non-final and prioritization of non-final jobs makes no sense.
Line 2, we loop through the final jobs, we check how long it takes to perform the current operation of the final job. self.legal_actions[job] = False
|
Thank you very much for your time to answer.
Is it a bug or there is something missing which I did not pay attention to? |
The observation provided by the environment contains both a boolean array indicating if the action is legal or not and the "real" observation self.observation_space = gym.spaces.Dict({
"action_mask": gym.spaces.Box(0, 1, shape=(self.jobs + 1,)),
"real_obs": gym.spaces.Box(low=0.0, high=1.0, shape=(self.jobs, 7), dtype=np.float),
}) A random agent would have to sample legal action from this For research purposes, I've made a random loop using RLLib: https://github.com/prosysscience/RL-Job-Shop-Scheduling/blob/0bbe0c0f2b8a742b75cbe67c5f6a825b8cfdf5eb/JSS/randomLoop/random_loop.py If you don't want to use RLLib, you can write a simple random loop using np.random.choice(len(legal_action), 1, p=(legal_action / legal_action.sum()))[0] Where |
I see what you are trying to say there. I did not pay attention to that in the beginning and implemented my own sort of untrained agent, that can pick any random actions without taking into account the legal actions so it started giving errors but now I get it. Thanks for your time and effort to reply. How would you incorporate the due date factor of JSS problem in the solution because I am sure this code would not work for JSS with due dates so do you have any idea what could be done to achieve the solution to that problem? Like if there is some sort of priorities assigned to the jobs, how can that be handled using this reinforcement learning agent? Would like to hear any suggestions. |
Hello there,
Thank you for the environment implementation, it has been a great help for me.
While going through your paper, it was written that you want to somehow prioritize the non-final operations but in your implementation I did not understand how you achieved that,
In the implementation of your function dedicated to achieving the non-final-operation-prioritization, there are a few things that I found quite confusing,
Any explanation will be highly appreciated.
Thanks in advance!
The text was updated successfully, but these errors were encountered: