Beispiel #1
0
        /// <summary>
        /// Handles the AST node visit.
        /// </summary>
        /// <param name="astNode">AST node.</param>
        public override void Visit(DomainDurActionAstNode astNode)
        {
            DurativeAction newDurativeAction = new DurativeAction
            {
                Name       = astNode.Name,
                Parameters = MasterExporter.ToParameters(astNode.Parameters),
                Durations  = MasterExporter.ToDurativeConstraints(astNode.DurationConstraint),
                Conditions = MasterExporter.ToDurativeConditions(astNode.Condition),
                Effects    = MasterExporter.ToDurativeEffects(astNode.Effect)
            };

            DomainData.DurativeActions.Add(newDurativeAction);
        }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(ForallDaEffectAstNode astNode)
 {
     EffectsData.Add(new ForallDurativeEffect(MasterExporter.ToParameters(astNode.Parameters), MasterExporter.ToDurativeEffects(astNode.Effect)));
 }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(WhenDaEffectAstNode astNode)
 {
     EffectsData.Add(new WhenDurativeEffect(MasterExporter.ToDurativeExpression(astNode.Condition), (TimedEffect)MasterExporter.ToDurativeEffects(astNode.Effect)[0]));
 }
 /// <summary>
 /// Handles the AST node visit.
 /// </summary>
 /// <param name="astNode">AST node.</param>
 public override void Visit(AndDaEffectsAstNode astNode)
 {
     astNode.Arguments.ForEach(arg => EffectsData.AddRange(MasterExporter.ToDurativeEffects(arg)));
 }