Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions agentlib_flexquant/utils/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ def modify_setup_system_shadow(self, node: ast.FunctionDef):
ast.parse(
f"{control.name}_upper = ca.if_else(self.time < "
f"self.market_time.sym, "
f"self.{control.name}{full_trajectory_suffix}.sym, "
f"self.{control.name}{full_trajectory_suffix}.sym + "
f"1e-3*self.{control.name}{full_trajectory_suffix}.sym, "
f"self.{control.name}.ub)"
).body[0],
)
Expand All @@ -461,7 +462,8 @@ def modify_setup_system_shadow(self, node: ast.FunctionDef):
ast.parse(
f"{control.name}_lower = ca.if_else(self.time < "
f"self.market_time.sym, "
f"self.{control.name}{full_trajectory_suffix}.sym, "
f"self.{control.name}{full_trajectory_suffix}.sym - "
f"1e-3*self.{control.name}{full_trajectory_suffix}.sym, "
f"self.{control.name}.lb)"
).body[0],
)
Expand Down Expand Up @@ -589,4 +591,4 @@ def remove_all_imports_from_tree(tree: ast.Module) -> ast.Module:
]
# Update the body of the tree to the new list
tree.body = new_body
return tree
return tree
Loading
Loading