Inverse planning and optimization in treatment planning for hadrontherapy with ANCOD++