Commit c5bdda40 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Rewrite __backward_init_dynamic() in better pythonic code

parent a4bfd17a
......@@ -451,14 +451,16 @@ class CLUnfolder(object):
set dynamic constraints for a forward one step: X0 = f(X1)
"""
self.__dynamic_constraints = []
num_clause_list = []
for clause in self.__dyn_sys.list_clauses:
ncl = self.__backward_code(clause)
num_clause_list.append(ncl)
num_clause_list = \
[self.__backward_code(clause)
for clause in self.__dyn_sys.list_clauses]
if self.__include_aux_clauses:
for clause in self.__dyn_sys.aux_list_clauses:
ncl = self.__backward_code(clause)
num_clause_list.append(ncl)
num_clause_list += \
[self.__backward_code(clause)
for clause in self.__dyn_sys.aux_list_clauses]
self.__dynamic_constraints.append(num_clause_list)
# shifting: implementation of the shift operator
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment