From 930831b7d33cfb876b90aa5bbeee1c73c588c8f8 Mon Sep 17 00:00:00 2001 From: Mohcine Chraibi Date: Wed, 22 Jan 2025 20:59:40 +0100 Subject: [PATCH] format notebook --- notebooks/model-comparison.ipynb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/notebooks/model-comparison.ipynb b/notebooks/model-comparison.ipynb index e7b6d9d10..8818c7c61 100644 --- a/notebooks/model-comparison.ipynb +++ b/notebooks/model-comparison.ipynb @@ -124,8 +124,13 @@ " journey = jps.JourneyDescription(exit_ids)\n", " journey_id = simulation.add_journey(journey)\n", " centroids = [polygon.centroid.coords[0] for polygon in goals]\n", - " orientations = [np.array(centroid) - np.array(position) for centroid, position in zip(centroids, positions)]\n", - " for pos, v0, exit_id, orientation in zip(positions, speeds, exit_ids, orientations):\n", + " orientations = [\n", + " np.array(centroid) - np.array(position)\n", + " for centroid, position in zip(centroids, positions)\n", + " ]\n", + " for pos, v0, exit_id, orientation in zip(\n", + " positions, speeds, exit_ids, orientations\n", + " ):\n", " if agent_parameters == jps.AnticipationVelocityModelAgentParameters:\n", " simulation.add_agent(\n", " agent_parameters(\n", @@ -144,19 +149,22 @@ " stage_id=exit_id,\n", " desiredSpeed=v0,\n", " position=pos,\n", - " orientation=orientation\n", + " orientation=orientation,\n", " )\n", " )\n", - " elif agent_parameters == jps.GeneralizedCentrifugalForceModelAgentParameters:\n", + " elif (\n", + " agent_parameters\n", + " == jps.GeneralizedCentrifugalForceModelAgentParameters\n", + " ):\n", " simulation.add_agent(\n", " agent_parameters(\n", " journey_id=journey_id,\n", " stage_id=exit_id,\n", " v0=v0,\n", " position=pos,\n", - " orientation=orientation\n", + " orientation=orientation,\n", " )\n", - " ) \n", + " )\n", " else:\n", " simulation.add_agent(\n", " agent_parameters(\n",