P-graph for Process Optimization