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 - moris

#1
Programming Help / Re: compilation error
August 06, 2008, 05:43:02 PM
i have used Qt Eclipse and i have succeed the compilation of FET (original source), but when i delete forms from project i have problems with reference:

C:/fet-5.6.0/src/interface/../engine/timetableexport.cpp:133: undefined reference to `students_schedule_ready'
./..\..\tmp\timetableexport.o(.text+0x76273):C:/fet-5.6.0/src/interface/../engine/timetableexport.cpp:133: undefined reference to `teachers_schedule_ready'
./..\..\tmp\timetableexport.o(.text+0x76280):C:/fet-5.6.0/src/interface/../engine/timetableexport.cpp:133: undefined reference to `rooms_schedule_ready'
./..\..\tmp\timetableexport.o(.text+0x76984):C:/fet-5.6.0/src/interface/../engine/timetableexport.cpp:169: undefined reference to `best_solution'
C:/fet-5.6.0/src/interface/../engine/import.cpp:575: undefined reference to `centerWidgetOnScreen(QWidget*)'
./..\..\tmp\import.o(.text+0x137f5): In function `ZN6Import21importCSVActivityTagsEv':
C:/fet-5.6.0/src/interface/../engine/import.cpp:1082: undefined reference to `centerWidgetOnScreen(QWidget*)'

the source list is:

SOURCES += fet.cpp \
   ../engine/activity.cpp \
   ../engine/solution.cpp \
   ../engine/timetable.cpp \
   ../engine/rules.cpp \
   ../engine/import.cpp \
   ../engine/export.cpp \
   ../engine/generate_pre.cpp \
   ../engine/timeconstraint.cpp \
   ../engine/spaceconstraint.cpp \
   ../engine/studentsset.cpp \
   ../engine/teacher.cpp \
   ../engine/subject.cpp \
   ../engine/activitytag.cpp \
   ../engine/room.cpp \
   ../engine/building.cpp \
   ../engine/timetable_defs.cpp \
   ../engine/generate.cpp \
   ../engine/timetableexport.cpp



how can i resolve this problem!
#2
Programming Help / Re: compilation error
August 05, 2008, 03:13:14 PM
I use Windows, MinGW GCC and Qt 4.4.1.

I have create new project c++ in eclipse, i have add engine source to project and i have add all include and librerie of QT to project.

when i build the project i have this result:


**** Build of configuration Debug for project CTT ****

**** Internal Builder is used for build               ****
g++ -IC:\Qt\4.4.1\include -IC:\Qt\4.4.1\include\QtCore -IC:\Qt\4.4.1\include\QtGui -IC:\Qt\4.4.1\include\Qt -O0 -g3 -Wall -c -fmessage-length=0 -oengine\subject.o ..\engine\subject.cpp
g++ -IC:\Qt\4.4.1\include -IC:\Qt\4.4.1\include\QtCore -IC:\Qt\4.4.1\include\QtGui -IC:\Qt\4.4.1\include\Qt -O0 -g3 -Wall -c -fmessage-length=0 -oengine\spaceconstraint.o ..\engine\spaceconstraint.cpp
g++ -IC:\Qt\4.4.1\include -IC:\Qt\4.4.1\include\QtCore -IC:\Qt\4.4.1\include\QtGui -IC:\Qt\4.4.1\include\Qt -O0 -g3 -Wall -c -fmessage-length=0 -oengine\room.o ..\engine\room.cpp
g++ -IC:\Qt\4.4.1\include -IC:\Qt\4.4.1\include\QtCore -IC:\Qt\4.4.1\include\QtGui -IC:\Qt\4.4.1\include\Qt -O0 -g3 -Wall -c -fmessage-length=0 -oengine\teacher.o ..\engine\teacher.cpp
g++ -IC:\Qt\4.4.1\include -IC:\Qt\4.4.1\include\QtCore -IC:\Qt\4.4.1\include\QtGui -IC:\Qt\4.4.1\include\Qt -O0 -g3 -Wall -c -fmessage-length=0 -oengine\timetable.o ..\engine\timetable.cpp
g++ -IC:\Qt\4.4.1\include -IC:\Qt\4.4.1\include\QtCore -IC:\Qt\4.4.1\include\QtGui -IC:\Qt\4.4.1\include\Qt -O0 -g3 -Wall -c -fmessage-length=0 -oengine\activity.o ..\engine\activity.cpp
..\engine\activity.cpp: In member function `bool Activity::searchStudents(const QString&)':
..\engine\activity.cpp:115: error: 'class QStringList' has no member named 'find'
..\engine\activity.cpp: In member function `void Activity::computeInternalStructure(Rules&)':
..\engine\activity.cpp:211: error: no matching function for call to `QObject::tr(QString)'
C:/Qt/4.4.1/include/QtCore/../../src/corelib/kernel/qobject.h:117: note: candidates are: static QString QObject::tr(const char*, const char*)
C:/Qt/4.4.1/include/QtCore/../../src/corelib/kernel/qobject.h:117: note:                 static QString QObject::tr(const char*, const char*, int)
..\engine\activity.cpp:240: error: no matching function for call to `QObject::tr(QString)'
C:/Qt/4.4.1/include/QtCore/../../src/corelib/kernel/qobject.h:117: note: candidates are: static QString QObject::tr(const char*, const char*)
C:/Qt/4.4.1/include/QtCore/../../src/corelib/kernel/qobject.h:117: note:                 static QString QObject::tr(const char*, const char*, int)
..\engine\activity.cpp:272: error: no matching function for call to `QObject::tr(QString)'
C:/Qt/4.4.1/include/QtCore/../../src/corelib/kernel/qobject.h:117: note: candidates are: static QString QObject::tr(const char*, const char*)
C:/Qt/4.4.1/include/QtCore/../../src/corelib/kernel/qobject.h:117: note:                 static QString QObject::tr(const char*, const char*, int)
Build error occurred, build is stopped
Time consumed: 12860  ms.  
#3
Programming Help / compilation error
August 05, 2008, 02:16:52 PM
i have error in compilation:
engine\activity.cpp:115: error: 'class QStringList' has no member named 'find'

i don't know how can i resolve this problem!
#4
Programming Help / Re: generation problem!
March 02, 2009, 11:13:55 AM
Please can you look at the sample,when i try to activate the last activity, i will have in result generation the "assertion window"!
#5
Programming Help / generation problem!
March 02, 2009, 09:46:11 AM
When i start the solver i have this assertion window.

Please,i want to know what this assertion mean!
#6
Programming Help / Re: initialize structure of engine!
November 24, 2008, 09:57:11 AM
this is the file of rules.cpp with modification.
#7
Programming Help / Re: initialize structure of engine!
November 22, 2008, 10:14:48 AM
this is the entire code of fet.cpp, i used solve function as entry point to run up the engine.
#8
Programming Help / Re: initialize structure of engine!
November 22, 2008, 09:35:49 AM
when i ignore a "assertion failed" i get this message in the console:

Duplicate room - 1
Cannot precompute - data is wrong - aborting


i tried to initialize the structure of engine with an init() function in fet.cpp that i invoke it after each execution of engine:

extern "C" void init(){
                 INPUT_FILENAME_XML="";

                 gt.rules.kill();
                 gt.rules.init();

                 
                 students_schedule_ready=false;
                 teachers_schedule_ready=false;
                 rooms_schedule_ready=false;
}


but without success!

please, what can i need to initialize the entire structure of engine!

#9
Programming Help / initialize structure of engine!
November 20, 2008, 10:52:33 PM
I try to integrate  FET with a java application as DLL, i have succeed to load library and turn up the engine but when i try to reuse engine for another instance i get message box alert.
please how can i initialize structure of engine for reuse it!
#10
i have add stop function as below:

extern "C" void stop (){

     if(!simulation_running){
                 /*QMessageBox::critical(this, TimetableGenerateForm::tr("FET information"),
                  TimetableGenerateForm::tr("Simulation stopped but the simulation is not running."
                  " This should not happen. Maybe you aborted simulation previously. Please report possible bug to author"));*/

                 return;
           }

           simulation_running=false;

           mutex.lock();
           gen.abortOptimization=true;
           mutex.unlock();

           
}


when i execute solver and i try to stop it i have this message:

ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread.


please, have you response about this!
#11
Programming Help / how to control generate function!
October 06, 2008, 06:14:41 PM
i have integrated FET with java application as DLL.

i have succeed to run Generate::generate function, but sometime i want to stop it.

please how can i control the execution of this function!
#12
Programming Help / DLL!
August 08, 2008, 02:53:20 PM
i am newbie in how to make a dll, i have make FEt as library in output template but when i have tried to invoke some function (throw java class) i have got problem:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'test'

the specifique function is not founded (test function is just a function that return the value 1, i have add it in fet.cpp).

please, have it a special thinks that i need to do to resolve the problem!

#13
Programming Help / Re: FET as API
July 25, 2008, 08:03:32 PM
Commande line version it's what I need, but about XML have you the shemat for input (*.fet) and output (subgroups_timetable.xml, teachers_timetable.xml) files.
#14
Programming Help / FET as API
July 25, 2008, 12:05:02 PM
I want use FET as an API, I want use FileDataInput as param method and have FileDataOutput as result. Is it possible to do?
#15
Get Help / Re: consecutive activity!
September 27, 2008, 10:02:38 PM
i think i have checked a solution for my problem:

i don't use break or "activity split + preferred time constraint", i think i need to use some think like a template of preferred time for each activity.

if i have activity with 2h00 i will add constrain of preferred time that check a plan of 2h00:

allowed(2h)|not allowed(10mn)|allowed(2h)|not allowed(10mn)...

if i have activity with 1h30 i will add constrain of preferred time that check a plan of 1h30:

allowed(1h30)|not allowed(10mn)|allowed(1h30)not allowed(10mn)...

now about activity of 3h that must be consecutive, i will add constraint of preferred time (is like that i have plan of 3h00):

allowed(3h)|not allowed(20mn)|allowed(3h)...

with this solution i think i can resolve problem of consecutive activity but i have many gap in timetable that i cannot optimize with min gap between activity constraint.

please how can i resolve this!