Time and number of periods different

Started by Rk, May 03, 2011, 07:04:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rk

Hi

In my school on wed.day the  duration of the period and number is periods different from other days.  How to add this constrains?

Thanks in advance

Regards,
Rk

Liviu Lalescu

If on Wed you have n hours per day and on the other days m hours per day, make n hours per day in FET = max (m, n) and the invalid slots not available (with constraint break is easiest).

Rk

Thanks but there is one more issue

On wed.day the duration of the periods also different.

Eg: Other days 1 hour is 9:30 - 10:15
on wed.days 1 hour will be 10:- 11:30, like there are some differences

Rk

Liviu Lalescu

#3
There is some help about this situation, but I don't know the exact location (forum, FAQ, I am not sure). Anyway, I'll write it again:

You should consider the lowest common divisor. If durations are, say, 30 minutes and 45 minutes, then lcd=15. This is one FET hour. Activity with real duration 30 minutes will have FET duration = 2, and real duration 45 minutes will have FET duration 3, real 60 minutes = FET 4 "hours".

There is one problem: you cannot instruct FET that if activity A is on Mon, duration is 3, and if it is on Wed, duration is 2.

We can talk about this, let me know more details if my answer is not complete.

Rk

Thanks for the help

Lest common devisor will be 5 minutes according to our time and we have 8 hours every day so it will be more than 60 hours per day ! which i dont think can be accommodated,rt?

Rk

Liviu Lalescu

Yes, unfortunately, you are right.

Solutions:

1) Maybe you can approximate by lcd=10 minutes;

2) You can increase from max 60 slots per day to 8*(60/5)=96. I can give advice how to do that.

Rk

Pls i need advice to increase it to 96
Thanks for your help

Rk

Liviu Lalescu

#7
Please see:

http://lalescu.ro/liviu/fet/forum/index.php?topic=134.0

And do similar, but considering MAX_HOURS_PER_DAY and hours instead of days.

Please tell me if you succeed or if you need more help.

Rk

Thanks for the help.  I will change the code and compile it.  It takes around 2 hours in my laptop to compile.  I will let you know result by tomorrow

Rk

Liviu Lalescu

#9
What system do you have? (hardware, software). If private, send as a private message or email to me, or just tell me how old is the system.

On my computer, it takes about 30 minutes to compile (single core), and my computer is about 4 years old (AMD 64 bit dual core 4000+, 2.11 GHz). (more precisely, GNU/Linux: 26 minutes single core, 16 minutes double core with -j 2 switch; Windows: 37 minutes, single core).

Are you using the latest FET version? (this is highly recommended). Also, latest Qt, gcc, g++?

I am just curious, because 2 hours is a lot of time.

Rk

It take only 45 minutes to compile.  I am using a Macbook pro 13inch note book. 
I changed this line
const int MAX_HOURS_PER_DAY=96;
and compiled it.  I am not able to understand the procedure to creat .fet file.  Can you pls provide some more detials

Regards,
Rk

Liviu Lalescu

Save an empty file, say it is named data.fet. Then open it with a text editor, or with an XML editor. See near the beginning, section "Hours_List". You need to change this section, add more hours (change Number value and add more Name sections). If you want, you can save a file with 5 hours and a file with 7 hours, compare them by contents (I use kdiff3 utility for that), and see how FET added these 2 hours, and do similarly.

Rk

Thanks for the quick reply but I am still confused. Here are my questions:

1. As you mentioned, I created an empty file data.fet but not sure about its structure. I need 96 hours per day, so do I need a file just like this?

<Hours_List>
        <Number>96</Number>
        <Name>08:00</Name>
        <Name>08:05</Name>
        -----
        -----
        <Name>16:00</Name>
</Hours_List>

Is that correct?

2. Where do I place this data.fet file? In the same location where the fet executable located?

Also I think the change I made in  src/engine/timetable_defs.h (   const int MAX_HOURS_PER_DAY=96) before compiling is correct.

Thanks,
Rk

Liviu Lalescu

#13
QuoteThanks for the quick reply but I am still confused. Here are my questions:

1. As you mentioned, I created an empty file data.fet but not sure about its structure. I need 96 hours per day, so do I need a file just like this?

<Hours_List>
        <Number>96</Number>
        <Name>08:00</Name>
        <Name>08:05</Name>
        -----
        -----
        <Name>16:00</Name>
</Hours_List>

Is that correct?

2. Where do I place this data.fet file? In the same location where the fet executable located?

Sorry: open FET, click Save as, save empty data as data.fet. This is a file of approximately 1187 bytes. This is what I mean empty file. It is in fact empty data. Modify it with a text/XML editor, save it, then open it with FET File->Open menu.

Quote
Also I think the change I made in  src/engine/timetable_defs.h (   const int MAX_HOURS_PER_DAY=96) before compiling is correct.

I do not understand.

I think your change is good.

Quote
Thanks,
Rk

Rk

Thanks :-)

I have created the data.fet file and changed the Hours_List as follows:

<Hours_List>
        <Number>96</Number>
        <Name>08:00</Name>
        <Name>08:05</Name>
        ------
        ------
</Hours_List>

Then opened it with FET but still the max hours per day (FET -> Data -> Basic -> Days and Hours) is 60 and cannot be increased. Not sure what I am missing. I am attaching the data.fet file and hoping that you can point me to the right direction.

Thanks a bunch for your help.

Rk.