optapy / optapy-quickstarts

OptaPy quick starts for AI optimization: showcases many different use cases.
Apache License 2.0
20 stars 14 forks source link

Are these 3 lines needed? #30

Closed ramdasrrao closed 1 year ago

ramdasrrao commented 1 year ago

https://github.com/optapy/optapy-quickstarts/blame/0ef8cf5790d13f167dead5ce036e134832b62d32/school-timetabling/domain.py#L193

Not sure the variable "lesson" is used anywhere. Is there a reason for these 3 lines? Just wondering as a newbie on quickstarts. Apologies if I couldn't figure it out.

Christopher-Chianelli commented 1 year ago

No, the lines are not needed. In this case, the lines are used to demonstrate you can pass an partially initialized problem to optapy (i.e. that lesson will have its timeslot and room set before being solved).

ramdasrrao commented 1 year ago

Thanks for the clarification. Really appreciate it. Perhaps, a comment will help.