MKCHAIN Version 1.0
COPYRIGHT (C) 2017 Norbert H. Doerry
Syntax:
MKCHAIN.EXE xmfile.xml
xmfile.xml = input file - required
Description:
MKCHAIN creates a comma separated value (CSV) file where the
rows are nominally years (or time increments) and
the columns are each a markov chain of states (represented as integers)
The input xml file defines the probability for the initial state and the
state transition matrix. The state transition table represents the probability
of transitioning from one state to another
MKCHAIN also optionally calculates the steady-state probability for each state which is
calculated by repeatedly multiplying the state transition matrix by itself
until for each row the elements have the same value.
xmfile.xml format
// required
4 // must be an integer > 1
2030 // must be an integer
70 // must be an integer > 1 , default is 50
100 // must be a positive integer , default is 10
SER // choices are VAL , NAME and SER
// determines which is printed in the .csv file
YES // other choice is NO
// prints out the input parametes
YES // other choice is NO
20 // must be an integer > 1, default is 100
.00001 // determines if matrix multiplication has
// converged on steadystate solution
// default is 0.000001
1 // If not 0, then prints out Debug information
conflict.csv // output filename
1 // State ID number -- integer between 1 and nbr_states - required
peacetime // string name for the state - required
10 // alternate (can be a floating point number)
0.28 // must be between 0 and 1 inclusive
2
prep_for_war
0.30
20
3
regional_war
0.28
30
4
major_war
0.14
40
1 // if in state 1, the probabilty of transitioning to a state
// is given in the elements
1 // State ID number
0.88 // must be between 0 and 1 inclusive
2
0.09
3
0.00
4
0.03
2
1
0.00
2
0.82
3
0.12
4
0.06
3
1
0.09
2
0.09
3
0.79
4
0.03
4
1
0.06
2
0.06
3
0.13
4
0.75
--------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-----------------------------------------------------