Here is an example:
vmetropolis -in spec.txt -ntypes 3 -seed 17 -report liste.txt
The input file contains a specification of the desired design.
The first few lines list the number of trials per event type.
E.g. if the experiment contains 3 experimental events, then
the first 3 lines must contain the number of trials per event.
Example:
7
9
8
In this case, the first event has 7 trials, the second has 9 trials,
and so forth.
The number of event types must be specified with the parameter
"-ntypes".
The following lines of the input file specify the
transition probabilities. Example:
0.143 0.571 0.286
0.333 0.444 0.222
0.286 0.143 0.571
The first row of the matrix specifies the transition probabilities
of type 0 trials, the second row specifies the transition probabilities
if type 1 trials and so forth.
Here, it is specified that
trials of event type 0 preceed trials of the same type with probability 0.143.
Type 0 trials preceed trials of type 1 with probability 0.571,
and they preceed type 2 trials in 0.286 percent of the cases.
The second row says that type 1 trials preceed trial 0 trials with
probability 0.333, and so forth.
More formally, the transition matrix gives the transition probabilities for
the following pairs of event types:
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
The transition probabilities may also be negative numbers.
In this case, the transition is considered irrelevant
and will be ignored by the algorithm.
Commentary lines in the input file must begin with the symbol '#'.
The program 'vmetropolis' tries to obey these requirements as
best as possible, even in cases where the specification is
inconsistent.
The program uses the Metropolis-algorithm and simulated annealing.
The program first outputs a randomized initial permutation sequence
which contains the correct number of trials per event type but does
not reflect the transition probabilities. In the above example, the first
output might be:
initial random permutation:
2 1 1 2 2 0 0 1 2 1 0 2 1 1 1 2 0 0 1 0 2 1 0 2
After some computation, the algorithm will then output the resulting
trial sequence that obeys the transition probabilities as best as possible.
In this case:
resulting sequence:
0 1 2 2 0 2 1 1 0 1 0 0 1 1 0 2 2 2 0 1 1 1 2 2
Sometimes, it may be useful to produce another sequence with the same specification. In this case, the program should be started again with a different seed for the random number generator, e.g. '-seed 890'.