Author Topic: Timetable  (Read 1475 times)

0 Members and 1 Guest are viewing this topic.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Timetable
« on: December 09, 2014, 10:18:51 PM »
Hi All:

I am in the process of trying to generate a timetable.  The timetable generation keeps stopping at 130 out of 493 activities.  I can't tell if FET is stuck or if there is really an issue with the data.  I have checked and re-checked the data and can't see any double bookings of classrooms, students, etc.  Maybe I haven't let it run long enough yet?  If I don't have an error message, does that mean FET is still running?  I am willing to share my file, but it looks like the limit for attaching files to the forum is 512 km.  My file is 1.8 MB.

Thank you,

B.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Timetable
« Reply #1 on: December 10, 2014, 12:22:18 AM »
You can archive the file with zip, gzip, bzip2, tar.gz or tar.bz2.

Hopefully there is not a FET bug. You could try removing your constraints/data to obtain a smaller impossible file and see the problem with it. Or you could try to other approach, adding data to your file while it is still solvable.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #2 on: December 10, 2014, 02:14:01 AM »
I should have thought to zip up the file earlier.  That worked, thanks Liviu.  The timetable will run if I drop my space constraints.  It is really odd because I am confident there are no double bookings.  I just can't seem to identify what the issue is.  Would you mind taking a look?  Sometime a fresh pair of eyes helps.  Thank you.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #3 on: December 10, 2014, 02:57:40 AM »
This is what my log file says:

Log generated by FET 5.22.0 on 12/9/14 6:19 PM

Reading file Fall15_AA3.fet
Complete file name, including path: C:\Users\u0420142\FETSW\Fall\Fall15_AA3.fet

Read institution name=Default institution
Read comments=Default comments
Added 60 hours per day
Added 6 days per week
Added 1 students years
Added 191 students groups
Added 7251 students subgroups
Added 0 teachers
Added 314 subjects
Added 0 activity tags
Added 493 activities
Added 18 buildings
Added 1070 rooms
Added 479 time constraints
Added 315 space constraints

I am also attaching the spreadsheet that I have been using to check for duplicates.  Hopefully this comes in handy for someone else.  Here are the steps that I went through to get my data into the spreadsheet:

1. Copy fet file and rename copy as .xml
2. Open MS Excel
3. Open .xml file in Excel (Choose to open file as an XML table when prompted)
4. Extract the rows for the classes and times and rooms and paste into the days and rooms tabs as shown on my spreadsheet
5.  Copy the rooms tab and past/copy special onto the PSV tab to get rid of formulas
6. Sort by room, day, time
7. Use the following formula logic to check for duplicates =if(and(room k1 = room k2, day d1= day d2, time e1 = time e2), put 1, otherwise put blank).  See my spreadsheet for the exact formula.


utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #4 on: December 10, 2014, 03:12:21 AM »
I also discovered two different ways of checking for duplicate student subgroups this week.  I am also posting those methods here in case they will help anyone else.  I have to say that the fact that FET generates XML has been really helpful.  The first step (and easiest) is to open the XML file using the steps outline in the previous step.  Extract the columns titled "subject" and "students" which are columns Q and R to a new spreadsheet.  The use Excel's data/remove duplicates option or sort by students to identify possible duplicates.  The other option, is to use the export feature in FET and open the activities csv file.  Once the CSV file is open in excel, delete everything except for the first column.  Then, use Excel's text to columns feature to split all of the student subgroups out to separate columns using "+" as a delimiter.  Finally, you'll want to stack all of the columns on top of each other.  This can be done using VB.  The developer tab needs to be enabled in Excel.  Hit Alt-F11 to open the visual basic menu.  Then insert module.  Paste the following VB code into the module:

Sub CombineColumns()
Dim rng As Range
Dim iCol As Integer
Dim lastCell As Integer

Set rng = ActiveCell.CurrentRegion
lastCell = rng.Columns(1).Rows.Count + 1

For iCol = 2 To rng.Columns.Count
    Range(Cells(1, iCol), Cells(rng.Columns(iCol).Rows.Count, iCol)).Cut
    ActiveSheet.Paste Destination:=Cells(lastCell, 1)
    lastCell = lastCell + rng.Columns(iCol).Rows.Count
Next iCol
End Sub

After pasting, choose close and Return to Microsoft Excel.  The go to Macros, choose the Combine Columns Macro and run it.  This will give you one column with all of your student subgroups.  Again, not as easy as just getting the data from the XML.  I worked through this method before realizing that the data was available in the XML file.  Combining columns may come in handy later so I am posting the code here for reference.  I hope it helps someone.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Timetable
« Reply #5 on: December 10, 2014, 03:15:44 AM »
I will read more thoroughly in the next interval. Until then, did you try this:

Stop the generation when it is stuck (at 130 placed activities) and see the difficult activity and view the partial timetable and consider why the activity cannot be placed. You can view the timetable from FET or on the hard disk.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #6 on: December 10, 2014, 03:19:20 AM »
Yes, I did try that.  Since the timetable generation is stopping at 130 placed, I looked at the activity with id-130 and 131 to see if they might be having issues.  I couldn't see any reason why they wouldn't be allowed to be placed.  Is that the right way to identify the activity that FET is stopping on?  Thank you.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #7 on: December 10, 2014, 03:29:12 AM »
I should have mentioned earlier.  As far as I know, there are only three constraints in my file; two time constrains, and one space constraint:

1. A set of activities has a set of preferred time slots (time)
2. A subject has a preferred room (space)
3. Min days between a set of activities (time)

Thank you.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Timetable
« Reply #8 on: December 10, 2014, 04:42:08 AM »
Yes, I did try that.  Since the timetable generation is stopping at 130 placed, I looked at the activity with id-130 and 131 to see if they might be having issues.  I couldn't see any reason why they wouldn't be allowed to be placed.  Is that the right way to identify the activity that FET is stopping on?  Thank you.

No!  :) Quote from FET output when stopping generation:

Please check constraints related to following possibly problematic activity (or teacher(s), or students set(s)):
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Id: 445 (T:, S:ACCTG 6610 003, St:T RIGBY; B4)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Also, in the initial order, number 131 is id 445.
« Last Edit: December 10, 2014, 06:07:43 AM by Liviu Lalescu »

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Timetable
« Reply #9 on: December 10, 2014, 06:23:08 AM »
Activities with id's 438 and 445 are conflicting (allowed only starting on Monday 18:00, same room)  :)
« Last Edit: December 10, 2014, 06:25:07 AM by Liviu Lalescu »

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #10 on: December 10, 2014, 09:09:24 AM »
You're right.  That is a duplicate activity.  Once that is removed, my timetable runs.  I can also see that in the XML and activities CSV file now.  I'm not sure how I missed that.  I wasn't looking at that column in the CSV.  I'm not sure how I missed that in the XML.  Thank you.

I think part of my problem was that I wasn't getting the message you listed below when stopping the generation (about ID 445).  Because I wasn't seeing that, I assumed the 130 was the message I was supposed to be looking at.  All I was getting was the 130 out of 493 activities placed message.  When I hit stop generation, my computer would act like it was crunching, then my timetable window would blink and act like it was no longer the primary, but I wouldn't see anything else on screen.  I couldn't click on the help button or exit the program after that point and was having to do a hard kill.  I didn't mention earlier because I assumed this was just an issue with my local machine.  You have helped me to determine what was going on.  Your message told me to look for something else.  I just reran the timetable until getting to the same spot (130).  When it got stuck, I hit windows + left arrow.  The message you described appeared.  Somehow my display settings were making that last window show up off screen.  I wasn't able to click on any other buttons because that hidden window was the active window.  I do have double monitors at work, but I was even getting that issue at work.  I'm not sure why it was doing that.  Thanks so much for your help.  I have been looking at this for several days now.  I am very appreciative.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #11 on: December 10, 2014, 09:23:27 AM »
It is interesting that the duplicate activity is not visible in the Subject_Name and Preferred_Hour columns of my XML table.  I'm not sure why that is.  It could be an MS Excel issue.  I haven't looked in the XML file pre-Excel import yet to determine if Excel is removing the duplicate automatically.  Where I do see the duplicate in the XML table is in the subject and ID columns.  The name9 column which appears to contain my list of subjects, does not have a duplicate.  That makes sense to me since the it wasn't a duplicate course, but a duplicate activity for the same course that was the issue.  Fortunately, there was only once issue this time that was keeping me from completing the generation.  This will be very helpful in the future if there are multiple issues that I am trying to sort out.  That said,hopefully I won't need to use the XML now that you have shown me how to access the help messages in FET :)

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Timetable
« Reply #12 on: December 10, 2014, 01:04:33 PM »
You're right.  That is a duplicate activity.  Once that is removed, my timetable runs.  I can also see that in the XML and activities CSV file now.  I'm not sure how I missed that.  I wasn't looking at that column in the CSV.  I'm not sure how I missed that in the XML.  Thank you.

I think part of my problem was that I wasn't getting the message you listed below when stopping the generation (about ID 445).  Because I wasn't seeing that, I assumed the 130 was the message I was supposed to be looking at.  All I was getting was the 130 out of 493 activities placed message.  When I hit stop generation, my computer would act like it was crunching, then my timetable window would blink and act like it was no longer the primary, but I wouldn't see anything else on screen.  I couldn't click on the help button or exit the program after that point and was having to do a hard kill.  I didn't mention earlier because I assumed this was just an issue with my local machine.  You have helped me to determine what was going on.  Your message told me to look for something else.  I just reran the timetable until getting to the same spot (130).  When it got stuck, I hit windows + left arrow.  The message you described appeared.  Somehow my display settings were making that last window show up off screen.  I wasn't able to click on any other buttons because that hidden window was the active window.  I do have double monitors at work, but I was even getting that issue at work.  I'm not sure why it was doing that.  Thanks so much for your help.  I have been looking at this for several days now.  I am very appreciative.

You need to wait longer to get the message I showed you. FET does not crash - it just takes longer, because you have so many students sets. Just wait.

About the window showing on another screen - FET saves the window position. If you want, you can reset settings to default from the Settings menu.

utefan

  • Level 1
  • *
  • Posts: 9
    • View Profile
Re: Timetable
« Reply #13 on: December 10, 2014, 01:36:12 PM »
It never did crash.  It just wasn't letting me navigate any of the other windows since there was an active window off screen.  I waited 30 minutes to see if it was still thinking and nothing happened.  It had finished crunching long before, I just didn't realize.  Thanks for the tip on window position.  I was not aware of that setting.  Thanks again for your help!

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5190
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Timetable
« Reply #14 on: December 10, 2014, 01:49:04 PM »
You are welcome  :)