Test Conservative Properties of Petri net
k = isconservation(node_tree,idbounded)
This function is used to test conservative properties of Petri net. Conservative properties related with total number of token in Petri net. If Petri net is conservative then number of token in Petri net is constant with some weight in all bounded places. If Petri net is not conservative then no weight can make total number of token constant.
f = [1 0 0;0 0 1;0 1 0]; // forward incidence b = [0 1 0;0 1 0;0 0 1]; // backward incidence x0 = [0;1;0]; // initial state nt = []; // node_tree idpt = []; // id_parent_tran [nt,idpt] = buildtree(f,b,x0,0,0,nt,idpt); // build coverability tree idb = boundedplace(nt) // indices of bounded places isconservation(nt,idb) // Petri net is conservative f = [0 1;0 1;1 0]; // forward incidence b = [1 0;1 0;0 1]; // backward incidence x0 = [1;1;0]; // initial state nt = []; // node_tree idpt = []; // id_parent_tran [nt,idpt] = buildtree(f,b,x0,0,0,nt,idpt); // build coverability tree idb = boundedplace(nt) // indices of bounded places isconservation(nt,idb) // Petri net is conservative | ![]() | ![]() |