Main Menu

FET WITH JAVA

Started by it.manveer.singh, September 05, 2009, 03:03:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

it.manveer.singh

hello,
Can you please tell me ConstraintActivitiesNotOverlapping::ConstraintActivitiesNotOverlapping(double wp, int nact, const int act[])
: TimeConstraint(wp)
{
       assert(nact>=2 && nact<=MAX_CONSTRAINT_ACTIVITIES_NOT_OVERLAPPING);
     this->n_activities=nact;
     for(int i=0; i<nact; i++)
           this->activitiesId=act;

     this->type=CONSTRAINT_ACTIVITIES_NOT_OVERLAPPING;
}
From where you are calling this above highlighted method. It is declare in timeconstraints.h class. you have use variables of this ConstraintActivitiesNotOverlapping class in generate_pre.cpp. so please help a bit more.
Thanks

Liviu Lalescu

Quotehello,
Can you please tell me ConstraintActivitiesNotOverlapping::ConstraintActivitiesNotOverlapping(double wp, int nact, const int act[])
: TimeConstraint(wp)
{
       assert(nact>=2 && nact<=MAX_CONSTRAINT_ACTIVITIES_NOT_OVERLAPPING);
     this->n_activities=nact;
     for(int i=0; i<nact; i++)
           this->activitiesId=act;

     this->type=CONSTRAINT_ACTIVITIES_NOT_OVERLAPPING;
}
From where you are calling this above highlighted method. It is declare in timeconstraints.h class. you have use variables of this ConstraintActivitiesNotOverlapping class in generate_pre.cpp. so please help a bit more.
Thanks

I call it in Rules::read and in the interface, probably in addconstraintactivitiesnotoverlappingform.cpp.

Volker Dirr

#77
QuoteHello Volker Dirr,
   I mean to say that can I change this code in java under gpl. Can you tell me "i checked your demo page". Can you explain it.

I answerd this mail:
QuoteHello,
  I thought about this project. It is desktop application. If this will be web based then you will earn more than here. You know every school and colleges are want there scheduling online. They can see it anywhere. May be this is the problem of your fet project. If you can spend more time for any other projects please give some time to it and make it web based project. I really thought your financial status will grow.
  This is the online time table-->www.school-timetable.eu.

In my opinion it sound like you are an author of that software and want to implement the FET algorithm into that tool.

it.manveer.singh

#78
No,
 No, It is totally different. I don't know who is the author of this web based project. I found it on surfing on web. It want to develop my own with your help with gpl. So please don't think about this.

it.manveer.singh

Hello,
 Can you please tell me what is going on timeConstraints.cpp and SpaceConstraints.cpp. I thought, in every constraint class you are getting data from xml file but which data. Is is raw material of timeTable or it is generated time table data. Please help a bit more.

Thanks a lot liviu for your precious time.

Liviu Lalescu

QuoteHello,
 Can you please tell me what is going on timeConstraints.cpp and SpaceConstraints.cpp. I thought, in every constraint class you are getting data from xml file but which data. Is is raw material of timeTable or it is generated time table data. Please help a bit more.

Thanks a lot liviu for your precious time.

The data is read from disk or inputted by the user. See Rules::read section for constraints or each AddConstraint....cpp in interface directory.


it.manveer.singh

Hello,
 Yes it is reading data from disk or user inputted file. But this is not for time table. We have to generate first time table, which shows the output from this raw data to well formed time table data. Am I right.?


Liviu Lalescu

QuoteHello,
 Yes it is reading data from disk or user inputted file. But this is not for time table. We have to generate first time table, which shows the output from this raw data to well formed time table data. Am I right.?


I don't understand.

it.manveer.singh

#83
ok,
 Let me know about timeConstraints.cpp. What is the main moto of this class.?(what is the use of timeconstraints.cpp & spaceConstraints.cpp).

Volker Dirr

QuoteHello,
 Yes it is reading data from disk or user inputted file. But this is not for time table. We have to generate first time table, which shows the output from this raw data to well formed time table data. Am I right.?

i think i understand:
yes, you are right; just try this sample:

open a sample file have a look at the FET->timetables. that will not work, because you didn't generate a timetable.

then generate a timetable. after that you can see it at FET-timetables.

the result is stored/saved in the results direcory.

close fet and open the generated timetable.

try to look in FET->timetables. that doesn't work because the timetable was not generated in memory (the timechromosome was not generated). so you need to generate the timetable first (that will be done this tme very fast, because the saved timetable constain many fixed time constraint for all activities), then you can have a look at the timetable.

so for example also the timetableexport.cpp work only if you done generate.cpp before!

please check this sample and maybe also "kdiff3" the original sample file with the saved generated fet file in the result directory to understand better.

it.manveer.singh

      for(int j=0; j<gt.rules.nInternalActivities; j++){
           minNDaysListOfActivities[j].clear();
           minNDaysListOfMinDays[j].clear();
           minNDaysListOfConsecutiveIfSameDay[j].clear();
           minNDaysListOfWeightPercentages[j].clear();
     }
Hello,
  Can you tell me this is List. And you are using this minNDaysListOfActivities list as array. How can i use it. I have simple List now list Array. Can I use it like  it:
minNDaysListOfActivities.get(j);
minNDaysListOfActivities.clear();

Volker Dirr

#86
if you have only a simple list and not a list array, then i think you can translate it into a 2 diminsional array.
so instead of
minNDaysListOfActivities[nInternalActivities]

you can do same with:
minNDaysActivities[nInternalActivities][nInternalActivities]

but of course that has disadvantages:
- you need more memory
- you need to add later a check if that value is needed -> so your algorithm (generating the timetable) will slow down very much.

so i don't recommend this even it is possible.

if java don't know array list, you should think about coding that yourself.

it.manveer.singh

#87
Hello,
 Please can you explain it->
for(int j=0; j<sst._n_activities; j++){
                       int ai1=sst._activities[j];
                       for(int k=0; k<sst._n_activities; k++){
                             int ai2=sst._activities[k];
                             if(ai1!=ai2){
                                   int t=activitiesSameStartingTimeActivities[ai1].indexOf(ai2);
                                   double perc=-1;
                                   if(t!=-1){
                                         perc=activitiesSameStartingTimePercentages[ai1].at(t);
                                         assert(perc>=0 && perc<=100);
                                   }

                                   if(t==-1 /*|| perc<sst.weightPercentage*/){
                                         activitiesSameStartingTimeActivities[ai1].append(ai2);
                                         activitiesSameStartingTimePercentages[ai1].append(sst.weightPercentage);

                                         assert(activitiesSameStartingTimeActivities[ai1].count()==activitiesSameStartingTimePercentages[ai1].count());
                                   }
                                   else if(t>=0 && perc<sst.weightPercentage){
                                         activitiesSameStartingTimePercentages[ai1][t]=sst.weightPercentage;
                                   }
                             }
                       }
                 }
Is it right, the above highlighted lines shows appending new object into this list at specified position or some thing else.
Please help.

Liviu Lalescu

Read Qt documentation, qt.nokia.com/doc/, class QList, functions append(...) and indexOf(...).

it.manveer.singh

hello,
  I have read QList but don't understand QList<int> activitiesSameStartingTimeActivities[MAX_ACTIVITIES];. Please tell about it. In java When we declare List, we use List<Integer> activitiesSameStartingTimeActivities = new List<Integer>(MAX_ACTIVITIES);. Can you explain it a little bit more. I really thankful to you.