コード例 #1
0
ファイル: Constraints.cs プロジェクト: PlanningFramework/PAD
 /// <summary>
 /// Constructs the constraint.
 /// </summary>
 /// <param name="parameters">List of parameters.</param>
 /// <param name="constraints">List of constraints.</param>
 public ForallConstraint(Parameters parameters, Constraints constraints)
 {
     Parameters  = parameters;
     Constraints = constraints;
 }
コード例 #2
0
ファイル: Constraints.cs プロジェクト: PlanningFramework/PAD
 /// <summary>
 /// Constructs the constraint.
 /// </summary>
 /// <param name="name">Preference name.</param>
 /// <param name="constraints">Argument constraints.</param>
 public PreferenceConstraint(string name, Constraints constraints)
 {
     Name        = name;
     Constraints = constraints;
 }
コード例 #3
0
ファイル: Problem.cs プロジェクト: PlanningFramework/PAD
        /// <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)}",
                               ")"));
        }