<jupyter_start><jupyter_text>Imports<jupyter_code>from cms_visualizer.simulation import Simulation, Pedestrian, Position
from cms_visualizer.topography import Topography, RectangularSource, RectangularTarget,RectangularObstacle

from ipycanvas import Canvas, hold_canvas

import ipywidgets as widgets
from ipywidgets import interact, Play, interactive
from IPython.display import display

from cms_visualizer.visualization import Visualizer

import numpy as np<jupyter_output><empty_output><jupyter_text>Test data<jupyter_code>tmp = RectangularSource(0,1,1,1,1)
tmp.x = 1
tmp.y = 1
tmp.width = 2
tmp.height = 1
sources = [tmp]

tmp = RectangularTarget(1,6,6,1,1)
tmp.x = 6
tmp.y = 6
tmp.width = 3
tmp.height = 3
targets = [tmp]

tmp = RectangularObstacle(2,3,3,1,1)
tmp.x = 3
tmp.y = 3
tmp.width = 2
tmp.height = 2
obstacles = [tmp]

topography = Topography(10,10)

topography.with_sources(sources)
topography.with_targets(targets)
topography.with_obstacles(obstacles)

pedestrians = [Pedestrian(11,1, None),Pedestrian(12,1, None)]

simulation = Simulation(topography, pedestrians, 3, [{11:Position(1,3),12:Position(1,2)},{11:Position(2,3),12:Position(2,2)},{11:Position(2,2),12:Position(3,2)}])<jupyter_output><empty_output><jupyter_text>Visualization<jupyter_code>visualizer = Visualizer(simulation,20, 20,500,500)
v = visualizer.build_gui()
v<jupyter_output><empty_output><jupyter_text>TestData with floats<jupyter_code>tmp = RectangularSource(0,1,1,1,1)
sources = [tmp]

tmp = RectangularTarget(1,6,6,2.5,1.5)
targets = [tmp]

tmp = RectangularObstacle(2,3.5,3,1.5,1)
obstacles = [tmp]

topography = Topography(10,10)

topography.with_sources(sources)
topography.with_targets(targets)
topography.with_obstacles(obstacles)

pedestrians = [Pedestrian(11,0.5, None),Pedestrian(12,0.5, None)]

simulation = Simulation(topography, pedestrians, 3, [{11:Position(1,3.5),12:Position(1,2)},{11:Position(2,3.5),12:Position(2,2)},{11:Position(2,2),12:Position(3,2)}])
visualizer = Visualizer(simulation,10,10,500,500)
v = visualizer.build_gui()
v<jupyter_output>[0, 1]
{'fraction_non_alphanumeric': 0.14410480349344978, 'fraction_numerical': 0.06889859291606017, 'mean_word_length': 8.866028708133971, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '524297', 'license': 'MIT', 'n_tokens_mistral': 882, 'n_tokens_neox': 810, 'n_words': 127, 'path': 'examples/basic.ipynb', 'repo_name': 'gjke/cms-visualizer', 'size': '2061'}