that is a good question. There are many answer actually.
The mpl is ~ 1000 lines long (and it reads functions from a different files, another ~1300 lines), and it performs various task, beside computation (changing directory, making directories, saving files, etc). In its first version it simply contained a line
that was used in the body. Afterwards the need came to use different values for logDistance (as well as other parameters), and it was quite annoying having to open the mpl each time, look for the right line, and modify him.
What I did is that I created a new file with just 4 lines, assigning the values for those parameters there (much simpler modify a file with 4 lines than one with 1000), and reading him from the mpl.
The reason I didn't do what might seem more natural (a for over the possible valus of logDistance) is that I can run on a network of ~20 computers, each one with maple. With the for over the distances I should have run all the possible values in a single job, or instead run over a small set of logDistances, then change computer, and run on a different set, and so on.
But at this point it was much simpler and elegant (I think) to do as explained in this thread, with a bash file that runs over some distances. What I've to do, now, is
1) go on a pc of the network,
2) change the value in the for cicle: for dist in "100" "200" ; do etc
3) run the bash file
4) change pc and start from 2
and I won't touch any sensible maple files, just this bash file.
You also need to know that the mpl saves its stuff in a folder which contains the numerical value of some parameters (logDistance, between others) in its name, then it's easy to see which run produces which files.
That's all! If you have suggestions they are obviusly welcomed.
ps: for each distance the program may take up to 12hrs, from here the reason I want to share the jobs between different PCs