Optimization, Operations Research, Python, Programming, Data Science.
self.cstr_unique_machine = pyo.Constraint(self.M, self.T, rule=cstr_unique_machine) self.cstr_precede = pyo.Constraint(self.M, self.J, rule=cstr_precede) self.cstr_total_time = pyo.Constraint(self.J, rule=cstr_total_time) def _get_elements(self, j): machines = [x.index()[0] for x in self.x[:, j, :]