Main Menu

FET only Command-Line

Started by macthegreat, December 03, 2008, 09:40:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

macthegreat

Hello, I'm an italian student and i have to build a project:
- i'm developing a system for generate school timetable. it has to be used from a browser, has to save data in a database and use a logic unit to generate the timetable... in my idea the logic unit will be rappresented by FET... i've a question...

1- CAN I PASS A FILE WITH DATA IN XML FORMAT TO THE COMMAND-LINE TO FET AND GENERATE A FILE WITH THE TIMETABLE WITHOUT USING THE QT???

2- IS THERE A VERSION OF FET WITHOUT QT, SO IT WILL BE MORE LIGHTER???

Thanks guys!!! GREAT JOB!

Liviu Lalescu

Unfortunately, FET is Qt based even internally (the algorithhm uses mainly QList-s, then QHash and QSet).

You can use the command line version, but it also contains Qt.

It is not very difficult to obtain a command line version without Qt, only a long and tedious job, prone to human error. You need mainly the src/engine/generate.cpp & h, generate_pre, rules, timeconstraint and spaceconstraint. I could help you with advice here, if you have problems. I think you could derive your own QList, even copy the routines from Qt or replace them with C++ list.

Or you could try to compile statically, so you don't need to include all the Qt dll-s, just that the executable will be a little larger.

slingerjansen

Liviu,

I need some instructions on how to use FET command line. I want to automatically generate a schedule in XML based on the .fet files I've created. Can you help me with that? Can I do something along the lines of fet --help to get more info? I am missing this info in the manual.

I'll go look in the old manuals now...

Slinger

slingerjansen

You made me go into the source code, but fet --inputfile=myfet.fet appears to do what I want. Thanks, I hope my answer helps others.

Liviu Lalescu

From the README:

COMMAND LINE: no GUI, just run "fet --inputfile=x [--timelimitseconds=y] [--htmllevel=z] [--language=t] [--printnotavailable=u]",
     where      x is the input file, for instance "inputfile.fet"
                 y is integer (seconds) (default 2000000000, which is practically infinite)
                 z is integer from 0 to 5 and represents the detail level for the generated html timetables
                       (default 2, larger values have more details/facilities and larger file sizes)
                 t is one of en_GB, ar, ca, de, el, es, fr, hu, id, it, lt, mk, ms, nl, pl, ro, tr (default en_GB)
                 u is either "true" or "false" and represents if you want -x- (for true) or --- (for false) in the generated timetables for the
                       not available slots (default true)
     For the command line version, probably the most useful output to use internally in an application might be the activities_timetable.xml.
     You have of course also the xml timetables for students and teachers and the nicely formatted html timetables to present directly.
                 
     On GNU/Linux and Mac OS X, you'll get a console output to help you with data.
     
     On Windows, only the file result.txt will guide you,
     I cannot make a console output on Windows (I could, but it would complicate the interface).