示例#1
0
 def walk_param_exp(self, expression: model.FNode,
                    args: List[proto.Expression]) -> proto.Expression:
     return proto.Expression(
         atom=proto.Atom(symbol=expression.parameter().name),
         list=[],
         kind=proto.ExpressionKind.Value("PARAMETER"),
         type=str(expression.parameter().type),
     )
示例#2
0
 def walk_param_exp(
     self, expression: FNode,
     args: List['unified_planning.model.types.Type']
 ) -> 'unified_planning.model.types.Type':
     assert expression is not None
     assert len(args) == 0
     return expression.parameter().type
示例#3
0
 def walk_param_exp(self, expression: FNode, args: List[FNode]) -> FNode:
     assert self._assignments is not None
     res = self._assignments.get(expression.parameter(), None)
     if res is not None:
         res, = self.manager.auto_promote(res)
         assert type(res) is FNode
         return res
     else:
         raise UPProblemDefinitionError(
             f"Value of Parameter {str(expression)} not found in {str(self._assignments)}"
         )