Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - prakhar

#1
Programming Help / Re: Port FET to Java or C#
April 22, 2013, 12:21:57 PM
Hey @Liviu, Thanks for the reply.

If by random seeds, you mean the values of MM, AA, QQ, RR, MMM, AAA, QQQ, RRR then here are those values which I have copied from FET source only.

        public static int MM=2147483647;
        public static int AA=48271;
        public static int QQ=44488;
        public static int RR=3399;

        public static int MMM=2147483399;
        public static int AAA=40692;
        public static int QQQ=52774;
        public static int RRR=3791;

If you mean XX and YY, they are Time dependent, i.e. their values will change every second (if I am not wrong).

           //unsigned tt=unsigned(time(NULL));
            double tt = (DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds;

            //XX is the current time
            //XX = 1 + ( (unsigned(tt)) % (unsigned(MM-1)) );
            XX = 1 + (int)tt % (MM - 1);

            //YY is the next random, after initializing YY with the current time
            //YY = 1 + ( (unsigned(tt)) % (unsigned(MMM-1)) );
            YY = 1 + (int)tt % (MMM - 1);


Or if random seed is a whole another thing then could you please quote it for me?

Thanks.

Regards,
Prakhar Mishra
#2
Programming Help / Re: Port FET to Java or C#
April 20, 2013, 01:54:05 PM
@Liviu, I don't have a .fet file because it is not supposed to generate it.

But I do have a log file (similar to FET I guess).
I am providing it here.

Any help will be appreciated.
Thanks.

Regards,
Prakhar Mishra
#3
Programming Help / Re: Port FET to Java or C#
April 20, 2013, 08:13:57 AM
Hello everybody,

Hey @Liviu, since I have ported it to C#.NET, I am having some problems. When I try to add some conflicting constraints, one with weight 100% and the other with weight less than 100%, then it is not generating the time table. Its getting stuck at n no. of activities. Could you please suggest, where the problem may be?

I used same structure of classes in .net as you did in FET.
Thanks.

Regards,
Prakhar Mishra
#4
Thanks for your reply Volker,

I just started to think I have done less homework on FET.

Regards,
Prakhar Mishra
#5
Hello everyone,

I am using FET to generate time table with these inputs given to a new file:

No. of Days per week: 5
No. of Hours per day: 3
Subject: C++
Teacher: T1
Year: I
Activities: 1 activity splitted into 3, of teacher 'T1', subject 'C++' and students 'I'
Time constraint - Teacher's not available times:-
X X X X
X X X    X
X X X X


I have also attached a file of this kind of input.
The thing is, we have 3 available hours for a teacher and 3 activities related to that teacher in a single class. It should not stuck here.

Please notify me if my inputs are incorrect.

Thanks and regards,
Prakhar Mishra
#6
Programming Help / Re: Port FET to Java or C#
November 05, 2012, 05:04:57 AM
Thank you for your reply @Liviu.
It saved my time.

I guess I have to do similar thing in case of TimeConstraint.

Thanks
#7
Programming Help / Re: Port FET to Java or C#
November 03, 2012, 01:43:55 PM
Hey @Liviu, thanks for the reply.

There is one more thing I am not getting.
There are 27 classes inheriting SpaceConstraint.
But while reading through Rules::read(), you are checking for 42 kind of space constraints.

Why that difference?
Let me put here those 42 space constraints for you:-


a. Constraint Basic Compulsory Space
b. Constraint Room Not Available
c. Constraint Room Not Available Times
d. Constraint Room Type Not Allowed Subjects
e. Constraint Subject Requires Equipments
f. Constraint Subject Subject Tag Require Equipments
g. Constraint Teacher Requires Room
h. Constraint Teacher Subject Require Room
i. Constraint Minimize Number Of Rooms For Students
j. Constraint Minimize Number Of Rooms For Teachers
k. Constraint Activity Preferred Room
l. Constraint Activity Preferred Rooms
m. Constraint Activities Same Room
n. Constraint Subject Preferred Room
o. Constraint Subject Preferred Rooms
p. Constraint Subject Subject Tag Preferred Room
q. Constraint Subject Subject Tag Preferred Rooms
r. Constraint Subject Activity Tag Preferred Room
s. Constraint Subject Activity Tag Preferred Rooms
t. Constraint Activity Tag Preferred Room
u. Constraint Activity Tag Preferred Rooms
v. Constraint Students Set Home Room
w. Constraint Students Set Home Rooms
x. Constraint Teacher Home Room
y. Constraint Teacher Home Rooms
z. Constraint Max Building Changes Per Day For Teachers
aa. Constraint Max Building Changes Per Day For Students
bb. Constraint Max Room Changes Per Day For Teachers
cc. Constraint Max Room Changes Per Day For Students
dd. Constraint Teacher Max Building Changes Per Day
ee. Constraint Teachers Max Building Changes Per Day
ff. Constraint Teacher Max Building Changes Per Week
gg. Constraint Teachers Max Building Changes Per Week
hh. Constraint Teacher Min Gaps Between Building Changes
ii. Constraint Teachers Min Gaps Between Building Changes
jj. Constraint Students Set Max Building Changes Per Day
kk. Constraint Students Max Building Changes Per Day
ll. Constraint Students Set Max Building Changes Per Week
mm. Constraint Students Max Building Changes Per Week
nn. Constraint Students Set Min Gaps Between Building Changes
oo. Constraint Students Min Gaps Between Building Changes
pp. Constraint Activities Occupy Max Different Rooms
#8
Programming Help / Re: Port FET to Java or C#
October 31, 2012, 06:33:44 AM
Hello CPP folks,

I am having a problem in using TimeTable class.
The only instantiation of TimeTable class (named as gt) is in fet.cpp and thats what written in comments:

/**
The one and only instantiation of the main class.
*/
Timetable gt;

I am re-developing it keeping in mind that it should be accessible simultaneously by any no. of users. Now I am afraid after reading that comment. Is the TimeTable class is designed to be used as a singleton class??

Regards,
Prakhar Mishra
#9
Programming Help / Re: Port FET to Java or C#
October 25, 2012, 10:55:52 AM
Hello everyone,

I am getting problems while porting LongTextMessageBox (I think it (and a lot of things besides that like MessageBoxes) should not be used in engine because it is making engine GUI dependent). Why it contains three buttons and as this code suggests

        if(button0Text==QString() || button1Text==QString() || button2Text!=QString()){
QMessageBox::critical(parent, tr("FET critical"), tr("You have met a FET bug. The problem is in file"
" %1 line %2, the reason is that a confirmation dialog box does not get exactly 2 arguments. Please report bug. FET will now continue."
" You probably don't have any problems with your data file - you can save it.").arg(__FILE__).arg(__LINE__));
}

that button2Text is expected to be kept null (or empty string). I am not getting why? And just what is the need of third button in confirmation? (If I am asking something pretty naive then please forgive me).

Regards,
Prakhar Mishra
#10
Programming Help / Re: Port FET to Java or C#
September 20, 2012, 11:32:52 AM
@Soyeb, If I take your advice, then there will be some problems:-

Although we are using Liviu's creation, we may extend it on our own. If it is written in C++, company won't be able to hire people (developers) to works on it, as Wt seems pretty new to me.

There are not that good C++ developers here. So, even if I arrange proper training of C++ as well as Wt for them, they won't be able to cope up with it. Besides, the developers here use ASP.NET and Java EE for web development, they are more comfortable with it.

So, I don't think its going to work, in my case.
Anyways, thank you for suggesting me, @Soyeb

Regards,
Prakhar Mishra
#11
Programming Help / Re: Port FET to Java or C#
September 18, 2012, 01:41:28 PM
First of all thank you for replying me that early, @Liviu Lalescu.

I may convert engine of FET into Java Class Library by using the Qt Jambi Generator. But QString, QList and QSet won't be mapped into any Java (or C#) classes. I was planning on using java.lang.String for QString, java.util.List for QList and  java.util.HashSet for QSet (or respective C# libraries)
@Liviu Lalescu, you are suggesting that I should stick with classes QString, QList and QSet of Qt Framework.

Since you are the author, you know FET much better. Will the earlier one will appear to be costly (performance wise)?

Thanks,
Prakhar Mishra
#12
Programming Help / Port FET to Java or C#
September 18, 2012, 10:28:22 AM
Hello folks,

As I think for now FET is the best time-tabling open-source software out there. So I want to implement it in Java EE or ASP.NET.

Since the project is in Qt, the only option I am having is either using QtJambi or Qt4DotNet. But this approach will still demand converting C++ syntax code into Java (or C#) syntax code.
Since I am developing it for web, I won't be using its user interface anyway.

Is there any better way to do that?