generate multi in fet-cl

Started by Peter Johnson, February 13, 2017, 02:40:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Peter Johnson

Hey guys

I want to run fet-cl and generate some outputs in single execution (like fet.exe); I checked all parameters but could not find any parameter to assign.

what is the solution?

thank you

Liviu Lalescu

fet-cl will generate a single timetable. You need to make a script, to run fet-cl more times, each time with a different output directory.

Zsolt Udvari

I think you can run it multiple times :)
If you use Linux(-like) operation system:
for f in `seq 1 10`; do fet-cl --outputdir=/home/fet/output/`date +%Y%m%d-%H%M`/${f} ... ; done

Liviu Lalescu

Quote from: Zsolt Udvari on February 13, 2017, 03:23:43 PM
I think you can run it multiple times :)
If you use Linux(-like) operation system:
for f in `seq 1 10`; do fet-cl --outputdir=/home/fet/output/`date +%Y%m%d-%H%M`/${f} ... ; done

Yes. Be careful: the beginning random seed is taken as the number of seconds since 1970. If your timetable takes less than 1 second, you might get the same timetable on adjacent generations. So you might need to also alter the starting random seed command-line parameter.

Peter Johnson

Quote from: Liviu Lalescu on February 13, 2017, 03:21:16 PM
fet-cl will generate a single timetable. You need to make a script, to run fet-cl more times, each time with a different output directory.

I need to do it in fet-cl and get the number of output as parameter (I need to run fet-cl at night and check outputs in the morning), do I have to change code a lot?

Peter Johnson

Quote from: Zsolt Udvari on February 13, 2017, 03:23:43 PM
I think you can run it multiple times :)
If you use Linux(-like) operation system:
for f in `seq 1 10`; do fet-cl --outputdir=/home/fet/output/`date +%Y%m%d-%H%M`/${f} ... ; done

nice, thanks, but I am a Windows user  :-\

Zsolt Udvari

#6
Quote from: Liviu Lalescu on February 13, 2017, 03:30:25 PM
the beginning random seed is taken as the number of seconds since 1970
Oh, indeed. You can use $RANDOM (if you use bash) or if you've jot utility: jot -r 1 1 100000000.

Liviu Lalescu

Quote from: Peter Johnson on February 13, 2017, 03:41:29 PM
I need to do it in fet-cl and get the number of output as parameter (I need to run fet-cl at night and check outputs in the morning), do I have to change code a lot?

fet.cpp in interface/ . Easy and little changes, I think.

Zsolt Udvari

Quote from: Peter Johnson on February 13, 2017, 03:42:28 PM
nice, thanks, but I am a Windows user  :-\
I assume the Powershell has for-loop feature: https://ss64.com/ps/for.html
The "old" command.com (cmd.exe) has for-loop too: https://ss64.com/nt/for2.html
I hope the following should work:
FOR %%V IN (1 2 3 4 5 6 7) DO fet-cl --datadir=%%V ...
I think it's simplier than modify the FET's code and rebuild.