From a0aa4a5c0dffc47cf27ce630fbebd9932511ab40 Mon Sep 17 00:00:00 2001 From: sayanmitracode <sayan.mitra@gmail.com> Date: Sun, 19 Jun 2022 17:11:49 -0500 Subject: [PATCH] 1 ball semi working --- demo/ball_bounces.py | 1 + dryvr_plus_plus/example/example_agent/ball_agent.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/demo/ball_bounces.py b/demo/ball_bounces.py index 2d8df59c..0dcd8fa0 100644 --- a/demo/ball_bounces.py +++ b/demo/ball_bounces.py @@ -85,6 +85,7 @@ if __name__ == "__main__": # Longer term: We should initialize by writing expressions like "-2 \leq myball1.x \leq 5" # "-2 \leq myball1.x + myball2.x \leq 5" traces = bouncingBall.simulate(10) + # There should be a print({traces}) function fig = go.Figure() fig = plotly_simulation_anime(traces, tmp_map, fig) fig.show() diff --git a/dryvr_plus_plus/example/example_agent/ball_agent.py b/dryvr_plus_plus/example/example_agent/ball_agent.py index 31664199..9fd550e8 100644 --- a/dryvr_plus_plus/example/example_agent/ball_agent.py +++ b/dryvr_plus_plus/example/example_agent/ball_agent.py @@ -51,4 +51,6 @@ class BallAgent(BaseAgent): return np.array(trace) if __name__ == '__main__': - aball = BallAgent('red_ball',file_name="/Users/mitras/Dpp/GraphGeneration/demo/ball_bounces.py") \ No newline at end of file + aball = BallAgent('red_ball',file_name="/Users/mitras/Dpp/GraphGeneration/demo/ball_bounces.py") + trace = aball.TC_simulate({'none'},[5, 10, 2, 2],10) + print(trace) \ No newline at end of file -- GitLab