The direct approach of general dynamic optimal control : application on general software