Modeling and optimal control of discrete-event chemical processes using petri nets | Synapse