Petri net principle and application