donnell74 / CSC-450-Scheduler

MIT License
1 stars 1 forks source link

Clear Button fix #29

Closed dhebrink closed 10 years ago

dhebrink commented 10 years ago

This will fix the issue of generate_starting_population() being called multiple times in a single run.

Adding mandatory constraints has been moved from gui/guiClasses.py to globs.py.

CameronHKIng commented 10 years ago

I think you want to indent your mainScheduler.add_constraint's in globs.py into the except block. Otherwise, I think you're adding mandatory constraints every time that globs.init() is called, which is definitely more than once.

dhebrink commented 10 years ago

Indention fixed. I wasn't sure exactly how that try-except was supposed to work, but it should be good now.

hana9235 commented 10 years ago

I get an error when I run it, from the scheduler.py file. It's apparently referencing the scheduler in globs, but I don't think that's necessary (line 140). I think all it should have to do it check "self.constraints" since it's one of the scheduler class methods.

dhebrink commented 10 years ago

Is this something that should be fixed in this PR? I didn't write this, so I'm not 100% sure what it entails. I pulled that from develop. I think that was part of Preston's changes. I can change it if that is what you want it to be, but it wasn't my initial change.

hana9235 commented 10 years ago

The program wouldn't run without that being changed, at least not for me, so I figured it should be brought up. I hadn't noticed it in other pull requests that are open, so I didn't know when exactly it was added.

hana9235 commented 10 years ago

As for the clear button code, looks good and runs fine.

prichey commented 10 years ago

@dhebrink @hana9235 I'm not sure what change you're referencing but I haven't made any significant edits to scheduler.py.

dhebrink commented 10 years ago

@prichey , line 140 of scheduler.py had a check for globs.mainScheduler.constraints instead of self.constraints. Idk who did it, I just assumed it was your change because you had been working on the constraint checking things. Shouldn't matter now, it is fixed.