Single Machine Sample#
We start by importing the corresponding jobshop problem module as following :
[6]:
%load_ext autoreload
%autoreload 2
import pyscheduling.SMSP.riwiCi as smsp_ri
We can either import the instance from a text file or randomly generate it.
[ ]:
instance = smsp_ri.riwiCi_Instance.generate_random(50,Wmax=10,Pmin=1, Pmax=50,Alpha=100)
instance.to_txt("deleteMe.txt")
Finally, we use one of the implemented methods which are found in either Heuristics or Metaheuristics classes as following :
[ ]:
solution = smsp_ri.Heuristics.WSECi(instance)
print(solution)