rem Acceptable problem parts:
rem D      incidence matrix
rem Dm     output matrix
rem Dp     input matrix
rem MX     Transformation matrix from independent to dependent marking
rem L0     Initial marking constraint matrix
rem L      Marking constraint matrix.
rem Mask   An integer array, one element for each place of the Petri net. Serves
rem        as a mask on which places will be processed.
rem ipl    An array of the indices of independent places.
rem dpl    An array of the indices of dependent places.
rem TD     An array of arrays, one subarray for each transition. Each subarray
rem        contains a list of the indices of transitions that cannot be made
rem 			 live if the corresponding transition is dead.
rem As always, matrices are defined by the keyword followed by the matrix
rem dimensions followed by the elements of the matrix. Arrays are defined by the
rem keyword followed by the length of the array followed by the array elements.
rem If D is given Dm and Dp are ignored.

rem ----------------------------------------------------------------------------
echo Problem 1
echo Example 5.2 from the thesis.
echo The first three test problems are the problems of the original matlab test
echo file pn2ecdem.m.
echo Initial TD should be:
echo 0, 1, 2
echo 0, 1, 2
echo 0, 1, 2
echo 0, 1, 2, 3, 4
echo 0, 1, 2, 3, 4
echo Solution incidence matrix should be:
echo 0	1	0	1	-1	-1
echo -1	0	1	-1	1	0
echo 1	-2	-2	0	0	0
echo -1	0	0	0	0	1

Dp 3 5
0	1	0	1	0
0	0	1	0	1
1	0	0	0	0

Dm 3 5
1	0	0	0	1
1	0	0	1	0
0	2	2	0	0

done

rem ----------------------------------------------------------------------------
echo Problem 2
echo Example 5.1 from the thesis.
echo The structure of this problem is such that, given the TD generated by the
echo current nltrans implementation there should be no modifications.
echo TD should be all transitions for all transitions but the last, which
echo should include only itself.
Dm 4 5
1	0	1	0	1
0	0	0	1	0
0	1	0	0	1
1	0	1	0	0

Dp 4 5
0	0	0	1	0
0	0	2	0	1
3	0	0	0	0
0	1	0	0	0

done

rem ----------------------------------------------------------------------------
echo Problem 3
echo No places are parents & grandparents of any transitions because there is no
echo input (transition-to-place) anywhere in this matrix. No processing.
D 5 6
-1	-1	0		0		0		0
0		-1	-1	0		0		0
0		0		-1	-1	0		0
0		0		0		-1	-1	0
0		0		0		-1	0		-1

done

rem ----------------------------------------------------------------------------
echo Problem 4.
echo This is the EAC-net example of the dissertation, therefore the EAC-net
echo transformation should have no effect.
Dm 4 5
1	0	0	1	1
1	1	0	0	0	
0	0	1	1	0
0	0	0	1	0

Dp 4 5
0	0	0	2	0
0	1	1	0	0
2	0	0	0	1
0	0	1	0	0

done

rem ----------------------------------------------------------------------------
echo Problem 5.
echo This problem introduces a pre-computed - in this case wrong - TD in order
echo to test other parts of the function.
echo Final incidence matrix should be:
echo -1	0	0	-1	0	1	0	0
echo 0	-1	1	0	1	0	-1	0
echo 0	1	-1	0	0	1	0	-1
echo -1	1	0	0	-1	1	0	0
echo -1	0	0	0	0	0	1	0
echo -1	0	0	0	0	0	0	1

D 4 6
-1	0		0		-1	0		1
-1	-1	1		0		1		0
-1	1		-1	0		0		1
-1	1		0		0		-1	1

TD 6
1 0
1 1
1 2
1 3
1 4
1 5

done

quit


