FET Command line return value

Started by thanhnambkhn, November 08, 2016, 02:23:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thanhnambkhn

Dear Liviu,
When investigating Fet command line source code, I see there are 2 types of return value: return 0 or 1 (fet.cpp), therein:
- Value "1" means error (can not generate time table) always.
- But value "0" somewhere mean success, but somewhere mean error (when time exceed or abort). (fet.cpp - line 1380)

I think, "0" should mean "success" only. In order to do that, we should add "return 2;" when time exceed or abort. (fet.cpp - if/else - line 1239)

Liviu Lalescu

I added this in the TODO, but I consider that my way of treating this is better.

thanhnambkhn

Yep, it depends on context.
In my case, I use FET-cl as a service which runs on the server. So when FET-cl is executed, the return value is used to determine whether the Time Table is generated successfully or not.

Liviu Lalescu

You can:

1) Modify the FET sources;

or

2) Check whether the .fet file or random_seed_after.txt are generated. This indicates a completed timetable.