[PRL] How about Tues 200-300 for macro reading group?
Mitchell Wand
wand at ccs.neu.edu
Mon Sep 13 08:32:16 EDT 2004
I have not heard any more constraints since Friday.
Here's the deal: I will see Will today at noon, and we will pick a
schedule at that time.
If you want to have your constraints taken into account, please let us
know by then.
Jeff-- it would be handy if you could set up your program so that we
know whose constraints have been entered (probably some comments in
the constructor for the constraints array would do nicely).
--Mitch
>>>>> On Fri, 10 Sep 2004 09:17:43 -0400, Jeffrey D Palm <jpalm at ccs.neu.edu> said:
JDP> Mitchell Wand wrote:
>> OK, folks, time for some constraint solving. Can somebody try to
>> figure out the most feasible time.
>>
>> Here are my constraints:
>>
>> Mon: 12-130 no
>> Tue: 6-9pm no (so anything after 4 on Tuesdays is deprecated)
>> Wed: 1145-130 pl-seminar, anything after 4 is deprecated.
>> Thu: 9-11am no, 12-130 no.
>> Fri: deprecated (gotta get some work done sometime...)
>>
>> Would somebody like to collate these? I believe John Clements wrote a
>> program to do this a couple of years ago.
>>
>> --Mitch
>>
>>
JDP> The numbers are the number of conflicts:
JDP> Day 0800 0900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100
JDP> mon 1111 1111 111
JDP> tue 1111 1111 1111 1111 1111 1111 1111 1111 2222 2222 2222 2222 2222 2222
JDP> wed 2 2222 1111 111
JDP> thu 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111
JDP> fri 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 222
JDP> if you want to add more...
JDP> #!/usr/bin/perl
JDP> @days = (mon, tue, wed, thu, fri);
JDP> # day -> constraints
JDP> # a constraints is a list of (start,stop) times
JDP> %constraints =
JDP> (
JDP> mon => ['1200','1330' , '1330','1445' , ],
JDP> tue => ['1145','1705' , '1600','2345' , '0800','1145' , ],
JDP> wed => ['1145','1300' , '1145','1445' , ],
JDP> thu => ['0900','1100' , '1200','1330' , '1330','1445' , '1445','1800', '1800','2100' , ],
JDP> fri => ['0800','2145' , '0800','2145' , ],
JDP> );
JDP> $ok = 1;
JDP> $start_hour = 8;
JDP> $stop_hour = 21;
JDP> print "Day ";
JDP> for (my $h = $start_hour; $h <= $stop_hour; $h++) {
JDP> my $hour = $h < 10 ? 0 . $h : $h;
JDP> print "$hour" . "00 ";
JDP> }
JDP> print "\n";
JDP> for (my $i = 0; $i <= $#days; $i++) {
JDP> my $stack = 0;
JDP> my $day = $days[$i];
JDP> my @cst = @{ $constraints{$day} };
JDP> print $day;
JDP> for (my $h = $start_hour; $h <= $stop_hour; $h++) {
JDP> my $hour = $h < 10 ? 0 . $h : $h;
JDP> print " ";
JDP> for (my $m = 0; $m <= 45; $m += 15) {
JDP> for (my $j = 0; $j <= $#cst; $j += 2) {
JDP> my $start = $cst[$j+0];
JDP> my $stop = $cst[$j+1];
JDP> my $min = $m < 10 ? 0 . $m : $m;
JDP> my $time = $hour . $min;
JDP> if ($time eq $start) {$stack++}
JDP> if ($time eq $stop) {$stack--}
JDP> }
JDP> print $stack eq 0 ? ' ' : $stack;
JDP> }
JDP> }
JDP> print "\n";
JDP> }
JDP> --
JDP> Jeffrey Palm --> http://www.ccs.neu.edu/home/jpalm
More information about the PRL
mailing list