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

作者你好,可否咨询一个代码中我认为的一处小bug #4

Open
calmQ opened this issue Mar 22, 2024 · 4 comments
Open

作者你好,可否咨询一个代码中我认为的一处小bug #4

calmQ opened this issue Mar 22, 2024 · 4 comments

Comments

@calmQ
Copy link

calmQ commented Mar 22, 2024

在fjsp_env_same_op_nums.py文件中

178 self.mch_min_pt = np.max(self.op_pt, axis=1).data
179 self.mch_max_pt = np.max(self.op_pt, axis=1)

这两句代码是否出错了呢,若没有问题,请问178行中为什么不是np.min(self.op_pt, axis=1).data,179行中为什么没有.data呢

@wrqccc
Copy link
Owner

wrqccc commented Mar 25, 2024

你好,很高兴回答你的问题。我在后期整理代码时疏忽了这个小问题,如你所说,178行应该改为np.min(self.op_pt, axis=1).data。另外,我个人认为此处有没有“.data”,效果是差不多的。

@calmQ
Copy link
Author

calmQ commented Mar 26, 2024

感谢作者的及时回复!

@calmQ
Copy link
Author

calmQ commented Apr 18, 2024

    if (self.reverse_process_relation[self.env_idxs, chosen_op, chosen_mch]).any(): 
        print(
            f'FJSP_Env.py Error from choosing action: Op {chosen_op} can\'t be processed by Mch {chosen_mch}')
        sys.exit() 

作者你好,我看到代码中更新环境时有这样一组代码,用来打印选择的操作与机器不匹配的报错,目前从代码当中看,似乎不会出现这种不匹配的情况,不知是我哪里疏忽了,请教一下作者什么情况会导致这种报错呢?

@wrqccc
Copy link
Owner

wrqccc commented Apr 19, 2024

这个是前期遗留的代码(辅助排查环境有没有写错),可以无视。

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