How to add Immovable feature in Project Job Scheduling solution?

荒凉一梦 提交于 2019-12-11 13:39:48

问题


I need to add immovable feature to my project job scheduling solution, I have add locked property at Allocation class like this :

private boolean locked = false;

update the NotSourceOrSinkAllocationFilter class to include locked checking like this :

JobType jobType = allocation.getJob().getJobType();
return !allocation.isLocked() && jobType != JobType.SOURCE && jobType != JobType.SINK;

I tried to run it first, when the result appears, I immediately terminate the solving earlier. Then move one single allocation and set it to locked. When I run it again, it will gave me a infeasible solution. Here is my screenshot:

initializes schedule:

adhoc decision:

try to moved it, lock it, and solve it again

unexpected result come out (it just come back to the previous allocation)

Please help me to add this immovable feature. Thanks.

来源:https://stackoverflow.com/questions/27601045/how-to-add-immovable-feature-in-project-job-scheduling-solution

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!