0
Reply

Creating Time Table dynamically

techamitdev

techamitdev

Apr 1 2006 10:02 AM
2.2k

Hello Guys,

I'm working to automate Time Table generation process for the school orgainsation, and I

stuck up here that:

I've list of records called subject, and each subject can have different sections. These

sections define the timing and day when classes can be taken.

As per the requirement when student select subjectS, we need to generate all possible time

tables where sections are non conflicted (time and day).

I managed to get a list of sections for EACH subject that are non conflicted with subject's

section but I'm unable to get the final one.

 

E.g. I selected three subjects and I got these three tables.

CCSB164 subject 1

<subjectcode:section>  -> <subjectcode:section>

CCSB164:01A  -> CCSB223:02
CCSB164:01A  -> CCSB223:03
CCSB164:01A  ->CMPB234:01
CCSB164:01B ->CCSB223:02

Each record says that Section of Subject CCSB164 not conflicting with section of another

subject like CCSB223.

CCSB223  subject 2

CCSB223:01 ->CMPB234:01
CCSB223:02 ->CCSB164:01A 
CCSB223:02 ->CCSB164:01B 
CCSB223:02 ->CMPB234:01 
CCSB223:03 ->CCSB164:01A 
CCSB223:03 ->CMPB234:01 

CMPB234  subject 3

CMPB234:01 ->CCSB164:01A
CMPB234:01 ->CCSB223:01 
CMPB234:01 ->CCSB223:02 
CMPB234:01 ->CCSB223:03 


If I take first row of first table it says: CCSB164:01A  -> CCSB223:02 that means section 02

of CCSB223:02 does not conflict with Section CCSB164:01A but how I will check if CCSB223:02

does not conflict with other subjects too.

I tried to do Join based on Table1.Column2 = Table2.Column1 and Table2.Column2 =

Table3.Column1 and Table3.Column2 = Table1.column1 but it give cross product and it does not

work for me.

THESE tables are dynamically generated, and number of tables depends on number of subject

selected.

Hope my question is clear to answer for others :( Please help

 

FYI: I am using .Net technology. I don't know what logic I should apply and hence it does

not matter what technology I am using here.