问题
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