rem Valid problem parts (types/keywords): 
rem matrix D, matrix Dm, matrix Dp - The problem incidence or i/o matrices
rem matrix Dc, matrix Dcm, matrix Dcp - The active subnet incidence or i/o matrices.
rem arrayi X - the unraisable transitions.
rem int update - a flag indicating whether or not to update.

echo Problem 1
echo Using just an incidence matrix.
echo The active subnet should include transitions 4, 5, and 6.
echo Unique should be 0.

D 6 8
-1	-2	0		0		0		0		0		0
0		-1	-2	0		0		0		0		0
0		0		-1	-2	0		0		0		0
1		1		0		0		6		-2	0		-1
0		0		1		1		0		-3	6		0
0		0		0		0		-2	2		-2	0

done

echo Problem 2
echo Using the same Petri net as before but forcing transition 5 to be
echo unraisable. The active subnet should now be empty.
echo Unique should be 1.

D 6 8
-1	-2	0		0		0		0		0		0
0		-1	-2	0		0		0		0		0
0		0		-1	-2	0		0		0		0
1		1		0		0		6		-2	0		-1
0		0		1		1		0		-3	6		0
0		0		0		0		-2	2		-2	0

X 1
5

done

echo Problem 3
echo This problem uses the PT-ordinary version of the petri net from problems
echo 1 and 2 with an extra row added. That is, a row has been added, the net has 
echo been fed to msplit, and the result used here. It also uses as the 
echo precalculated active subnet matrix returned in Problem 1.

D 14 15
-1	-1	0		0		0		0		0		0		-1	0		0		0		0		0		0	
0		-1	-1	0		0		0		0		0		0		-1	0		0		0		0		0	
0		0		-1	-1	0		0		0		0		0		0		-1	0		0		0		0	
1		1		0		0		6		-1	0		-1	0		0		0		0		-1	0		0	
0		0		1		1		0		-1	6		0		0		0		0		0		-1	-1	0	
0		0		0		0		-1	2		-1	0		0		0		0		-1	0		0		-1	
0		0		0		0		1		-1	1		0		0		0		0		0		-1	0		0	
0		-1	0		0		0		0		0		0		1		0		0		0		0		0		0	
0		0		-1	0		0		0		0		0		0		1		0		0		0		0		0	
0		0		0		-1	0		0		0		0		0		0		1		0		0		0		0	
0		0		0		0		-1	0		0		0		0		0		0		1		0		0		0	
0		0		0		0		0		-1	0		0		0		0		0		0		1		0		0	
0		0		0		0		0		0		0		0		0		0		0		0		-1	1		0	
0		0		0		0		0		0		-1	0		0		0		0		0		0		0		1	

Dc 6 8
0		0		0		0		0		0		0		0
0		0		0		0		0		0		0		0
0		0		0		0		0		0		0		0
0		0		0		0		6		-2	0		-1
0		0		0		0		0		-3	6		0
0		0		0		0		-2	2		-2	0

update 1

done

echo The solution should have nonzero arcs in rows: 4, 5, 6, 7, 11, 12, 13, 14
echo The solution should have nonzero arcs in cols: 5, 6, 7, 8, 12, 13, 14, 15

quit