fixed: MPC from TIE to PIN when simply supported conditions are used
improved code