/// <summary> /// String representation. /// </summary> /// <returns>String representation.</returns> public override string ToString() { List <string> sections = new List <string> { Requirements.ToString(), Types.ToString(), Constants.ToString(), Predicates.ToString(), Functions.ToString(), Constraints.ToString(), Actions.ToString(), DurativeActions.ToString(), DerivedPredicates.ToString() }; sections.RemoveAll(string.IsNullOrEmpty); return(string.Join(Environment.NewLine, $"(define(domain {Name})", $" {string.Join($"{Environment.NewLine} ", sections)}", ")")); }
/// <summary> /// String representation. /// </summary> /// <returns>String representation.</returns> public override string ToString() { List <string> sections = new List <string> { Requirements.ToString(), Objects.ToString(), Init.ToString(), Goal.ToString(), Constraints.ToString(), Metric.ToString(), Length.ToString() }; sections.RemoveAll(string.IsNullOrEmpty); return(string.Join(Environment.NewLine, $"(define(problem {Name})", $" (:domain {DomainName})", $" {string.Join($"{Environment.NewLine} ", sections)}", ")")); }