casymda
Advanced tools
+2
-2
| Metadata-Version: 2.1 | ||
| Name: casymda | ||
| Version: 0.2.26 | ||
| Version: 0.2.27 | ||
| Summary: Simple DES modeling and simulation based on SimPy, BPMN, and pixi.js | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/fladdimir/casymda | ||
| License: MIT | ||
| Description: # Camunda-Modeler-based creation of SimPy discrete event simulation models | ||
| Description: # BPMN-based creation of SimPy discrete event simulation models | ||
@@ -12,0 +12,0 @@ Wouldn't it be _cool_ to combine the block-based process modeling experience of commercial discrete event simulation packages with the amenities of proper IDE-based source-code editing? |
+1
-1
@@ -5,3 +5,3 @@ """setuptools setup""" | ||
| VERSION = "0.2.26" | ||
| VERSION = "0.2.27" | ||
@@ -8,0 +8,0 @@ try: |
| Metadata-Version: 2.1 | ||
| Name: casymda | ||
| Version: 0.2.26 | ||
| Version: 0.2.27 | ||
| Summary: Simple DES modeling and simulation based on SimPy, BPMN, and pixi.js | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/fladdimir/casymda | ||
| License: MIT | ||
| Description: # Camunda-Modeler-based creation of SimPy discrete event simulation models | ||
| Description: # BPMN-based creation of SimPy discrete event simulation models | ||
@@ -12,0 +12,0 @@ Wouldn't it be _cool_ to combine the block-based process modeling experience of commercial discrete event simulation packages with the amenities of proper IDE-based source-code editing? |
@@ -1,1 +0,1 @@ | ||
| __version__ = "0.2.26" | ||
| __version__ = "0.2.27" |
@@ -6,3 +6,3 @@ from enum import Enum | ||
| class States(Enum): | ||
| """ common block states """ | ||
| """common block states""" | ||
@@ -9,0 +9,0 @@ empty = "empty" # "default", if all other states' count is 0 |
@@ -9,3 +9,3 @@ from typing import Dict, List, Optional, Tuple | ||
| class VisualizableBlock(Block): | ||
| """ extends block by visualization-related behavior """ | ||
| """extends block by visualization-related behavior""" | ||
@@ -31,3 +31,3 @@ def __init__( | ||
| def on_block_change(self): | ||
| """ animate the block, including e.g. it's contents """ | ||
| """animate the block, including e.g. it's contents""" | ||
| super().on_block_change() | ||
@@ -34,0 +34,0 @@ if self.visualizer is not None: |
@@ -8,3 +8,3 @@ """ entity """ | ||
| class Entity: | ||
| """ flow object which is moved between components """ | ||
| """flow object which is moved between components""" | ||
@@ -11,0 +11,0 @@ def __init__(self, env: Environment, name: str): |
@@ -9,3 +9,3 @@ from ctypes import c_bool | ||
| class SyncedFloat: | ||
| """ holds a float value which can be shared between threads and used as a factor for a casymda ChangeableFactorRealtimeEnvironment """ | ||
| """holds a float value which can be shared between threads and used as a factor for a casymda ChangeableFactorRealtimeEnvironment""" | ||
@@ -56,3 +56,3 @@ def __init__(self, synced: Value): | ||
| def step(self): | ||
| """ modified step function without strict-mode but working with changing factors""" | ||
| """modified step function without strict-mode but working with changing factors""" | ||
@@ -77,3 +77,3 @@ if not self.should_run.value: | ||
| def create_factor_instance(cls, factor=1.0) -> SyncedFloat: | ||
| """ forwards to SyncedFloat factory method """ | ||
| """forwards to SyncedFloat factory method""" | ||
| return SyncedFloat._create_factor_instance(factor=factor) | ||
@@ -80,0 +80,0 @@ |
@@ -19,3 +19,3 @@ import datetime | ||
| class EntityVisualizer: | ||
| """ visualizes entities on a canvas when notified """ | ||
| """visualizes entities on a canvas when notified""" | ||
@@ -55,3 +55,3 @@ def __init__( | ||
| def animate(self, entity: Entity, x: float, y: float, current_time: float): | ||
| """ change entity position """ | ||
| """change entity position""" | ||
@@ -97,3 +97,3 @@ # find / create entity animation | ||
| def update_entity_icon(self, entity: Entity): | ||
| """ recreate entity icon at current position if existing """ | ||
| """recreate entity icon at current position if existing""" | ||
| anim = self._find_entity_animation(entity) | ||
@@ -100,0 +100,0 @@ if anim is not None: |
@@ -103,3 +103,3 @@ import datetime | ||
| def _animate_flow_x_y(self, from_x, from_y, to_x, to_y, entity, skip_flow): | ||
| """ change entity position via optional movement animation """ | ||
| """change entity position via optional movement animation""" | ||
@@ -119,3 +119,3 @@ # find / create entity animation | ||
| def _move_icon(self, from_x, from_y, to_x, to_y, icon, flow_speed, skip_flow): | ||
| """ only animate flow if not skipped """ | ||
| """only animate flow if not skipped""" | ||
| if skip_flow: | ||
@@ -122,0 +122,0 @@ self.canvas.set_coords(icon, (to_x, to_y)) |
@@ -5,3 +5,3 @@ from casymda.blocks.entity import Entity | ||
| class TilemapVisualizerInterface: | ||
| """ interface for tilemap visualizations """ | ||
| """interface for tilemap visualizations""" | ||
@@ -8,0 +8,0 @@ def animate(self, entity: Entity, x: float, y: float, current_time: float): |
@@ -12,2 +12,2 @@ """ | ||
| class TilemapVisualizer(EntityVisualizer, TilemapVisualizerInterface): | ||
| """ visualizes entity positions at a given canvas """ | ||
| """visualizes entity positions at a given canvas""" |
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class Anchor(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -18,6 +20,16 @@ # Anchor | ||
| # Anchor | ||
| def X(self): return self._tab.Get(flatbuffers.number_types.Float32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0)) | ||
| def X(self): | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Float32Flags, | ||
| self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0), | ||
| ) | ||
| # Anchor | ||
| def Y(self): return self._tab.Get(flatbuffers.number_types.Float32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4)) | ||
| def Y(self): | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Float32Flags, | ||
| self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4), | ||
| ) | ||
| def CreateAnchor(builder, x, y): | ||
@@ -24,0 +36,0 @@ builder.Prep(4, 8) |
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class Canvas(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -32,2 +34,3 @@ @classmethod | ||
| from casymda.visualization.web_server.flatbuffers.Element import Element | ||
| obj = Element() | ||
@@ -50,5 +53,18 @@ obj.Init(self._tab.Bytes, x) | ||
| def CanvasStart(builder): builder.StartObject(1) | ||
| def CanvasAddContent(builder, content): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(content), 0) | ||
| def CanvasStartContentVector(builder, numElems): return builder.StartVector(4, numElems, 4) | ||
| def CanvasEnd(builder): return builder.EndObject() | ||
| def CanvasStart(builder): | ||
| builder.StartObject(1) | ||
| def CanvasAddContent(builder, content): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 0, flatbuffers.number_types.UOffsetTFlags.py_type(content), 0 | ||
| ) | ||
| def CanvasStartContentVector(builder, numElems): | ||
| return builder.StartVector(4, numElems, 4) | ||
| def CanvasEnd(builder): | ||
| return builder.EndObject() |
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class CanvasPosition(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -18,6 +20,16 @@ # CanvasPosition | ||
| # CanvasPosition | ||
| def X(self): return self._tab.Get(flatbuffers.number_types.Uint16Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0)) | ||
| def X(self): | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Uint16Flags, | ||
| self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0), | ||
| ) | ||
| # CanvasPosition | ||
| def Y(self): return self._tab.Get(flatbuffers.number_types.Uint16Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(2)) | ||
| def Y(self): | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Uint16Flags, | ||
| self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(2), | ||
| ) | ||
| def CreateCanvasPosition(builder, x, y): | ||
@@ -24,0 +36,0 @@ builder.Prep(2, 4) |
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class Element(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -28,3 +30,5 @@ @classmethod | ||
| if o != 0: | ||
| return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos) | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Uint16Flags, o + self._tab.Pos | ||
| ) | ||
| return 0 | ||
@@ -44,2 +48,3 @@ | ||
| from flatbuffers.table import Table | ||
| obj = Table(bytearray(), 0) | ||
@@ -50,6 +55,22 @@ self._tab.Union(obj, o) | ||
| def ElementStart(builder): builder.StartObject(3) | ||
| def ElementAddId(builder, id): builder.PrependUint16Slot(0, id, 0) | ||
| def ElementAddElementType(builder, elementType): builder.PrependUint8Slot(1, elementType, 0) | ||
| def ElementAddElement(builder, element): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(element), 0) | ||
| def ElementEnd(builder): return builder.EndObject() | ||
| def ElementStart(builder): | ||
| builder.StartObject(3) | ||
| def ElementAddId(builder, id): | ||
| builder.PrependUint16Slot(0, id, 0) | ||
| def ElementAddElementType(builder, elementType): | ||
| builder.PrependUint8Slot(1, elementType, 0) | ||
| def ElementAddElement(builder, element): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 2, flatbuffers.number_types.UOffsetTFlags.py_type(element), 0 | ||
| ) | ||
| def ElementEnd(builder): | ||
| return builder.EndObject() |
@@ -5,2 +5,3 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| class ElementsUnion(object): | ||
@@ -11,2 +12,1 @@ NONE = 0 | ||
| Text = 3 | ||
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class Image(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -29,3 +31,6 @@ @classmethod | ||
| x = o + self._tab.Pos | ||
| from casymda.visualization.web_server.flatbuffers.CanvasPosition import CanvasPosition | ||
| from casymda.visualization.web_server.flatbuffers.CanvasPosition import ( | ||
| CanvasPosition, | ||
| ) | ||
| obj = CanvasPosition() | ||
@@ -42,2 +47,3 @@ obj.Init(self._tab.Bytes, x) | ||
| from casymda.visualization.web_server.flatbuffers.Anchor import Anchor | ||
| obj = Anchor() | ||
@@ -52,3 +58,5 @@ obj.Init(self._tab.Bytes, x) | ||
| if o != 0: | ||
| return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos) | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Uint16Flags, o + self._tab.Pos | ||
| ) | ||
| return 0 | ||
@@ -67,11 +75,39 @@ | ||
| if o != 0: | ||
| return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Float32Flags, o + self._tab.Pos | ||
| ) | ||
| return 1.0 | ||
| def ImageStart(builder): builder.StartObject(5) | ||
| def ImageAddPosition(builder, position): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(position), 0) | ||
| def ImageAddAnchor(builder, anchor): builder.PrependStructSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(anchor), 0) | ||
| def ImageAddPhotoId(builder, photoId): builder.PrependUint16Slot(2, photoId, 0) | ||
| def ImageAddPath(builder, path): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(path), 0) | ||
| def ImageAddFactor(builder, factor): builder.PrependFloat32Slot(4, factor, 1.0) | ||
| def ImageEnd(builder): return builder.EndObject() | ||
| def ImageStart(builder): | ||
| builder.StartObject(5) | ||
| def ImageAddPosition(builder, position): | ||
| builder.PrependStructSlot( | ||
| 0, flatbuffers.number_types.UOffsetTFlags.py_type(position), 0 | ||
| ) | ||
| def ImageAddAnchor(builder, anchor): | ||
| builder.PrependStructSlot( | ||
| 1, flatbuffers.number_types.UOffsetTFlags.py_type(anchor), 0 | ||
| ) | ||
| def ImageAddPhotoId(builder, photoId): | ||
| builder.PrependUint16Slot(2, photoId, 0) | ||
| def ImageAddPath(builder, path): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 3, flatbuffers.number_types.UOffsetTFlags.py_type(path), 0 | ||
| ) | ||
| def ImageAddFactor(builder, factor): | ||
| builder.PrependFloat32Slot(4, factor, 1.0) | ||
| def ImageEnd(builder): | ||
| return builder.EndObject() |
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class Photo(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -28,3 +30,5 @@ @classmethod | ||
| if o != 0: | ||
| return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) | ||
| return self._tab.Get( | ||
| flatbuffers.number_types.Float32Flags, o + self._tab.Pos | ||
| ) | ||
| return 1.0 | ||
@@ -39,5 +43,18 @@ | ||
| def PhotoStart(builder): builder.StartObject(2) | ||
| def PhotoAddFactor(builder, factor): builder.PrependFloat32Slot(0, factor, 1.0) | ||
| def PhotoAddPath(builder, path): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(path), 0) | ||
| def PhotoEnd(builder): return builder.EndObject() | ||
| def PhotoStart(builder): | ||
| builder.StartObject(2) | ||
| def PhotoAddFactor(builder, factor): | ||
| builder.PrependFloat32Slot(0, factor, 1.0) | ||
| def PhotoAddPath(builder, path): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 1, flatbuffers.number_types.UOffsetTFlags.py_type(path), 0 | ||
| ) | ||
| def PhotoEnd(builder): | ||
| return builder.EndObject() |
@@ -7,6 +7,8 @@ # automatically generated by the FlatBuffers compiler, do not modify | ||
| from flatbuffers.compat import import_numpy | ||
| np = import_numpy() | ||
| class Text(object): | ||
| __slots__ = ['_tab'] | ||
| __slots__ = ["_tab"] | ||
@@ -29,3 +31,6 @@ @classmethod | ||
| x = o + self._tab.Pos | ||
| from casymda.visualization.web_server.flatbuffers.CanvasPosition import CanvasPosition | ||
| from casymda.visualization.web_server.flatbuffers.CanvasPosition import ( | ||
| CanvasPosition, | ||
| ) | ||
| obj = CanvasPosition() | ||
@@ -42,2 +47,3 @@ obj.Init(self._tab.Bytes, x) | ||
| from casymda.visualization.web_server.flatbuffers.Anchor import Anchor | ||
| obj = Anchor() | ||
@@ -76,9 +82,42 @@ obj.Init(self._tab.Bytes, x) | ||
| def TextStart(builder): builder.StartObject(6) | ||
| def TextAddPosition(builder, position): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(position), 0) | ||
| def TextAddAnchor(builder, anchor): builder.PrependStructSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(anchor), 0) | ||
| def TextAddText(builder, text): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(text), 0) | ||
| def TextAddFill(builder, fill): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(fill), 0) | ||
| def TextAddFontFamily(builder, fontFamily): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(fontFamily), 0) | ||
| def TextAddFontSize(builder, fontSize): builder.PrependUint8Slot(5, fontSize, 10) | ||
| def TextEnd(builder): return builder.EndObject() | ||
| def TextStart(builder): | ||
| builder.StartObject(6) | ||
| def TextAddPosition(builder, position): | ||
| builder.PrependStructSlot( | ||
| 0, flatbuffers.number_types.UOffsetTFlags.py_type(position), 0 | ||
| ) | ||
| def TextAddAnchor(builder, anchor): | ||
| builder.PrependStructSlot( | ||
| 1, flatbuffers.number_types.UOffsetTFlags.py_type(anchor), 0 | ||
| ) | ||
| def TextAddText(builder, text): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 2, flatbuffers.number_types.UOffsetTFlags.py_type(text), 0 | ||
| ) | ||
| def TextAddFill(builder, fill): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 3, flatbuffers.number_types.UOffsetTFlags.py_type(fill), 0 | ||
| ) | ||
| def TextAddFontFamily(builder, fontFamily): | ||
| builder.PrependUOffsetTRelativeSlot( | ||
| 4, flatbuffers.number_types.UOffsetTFlags.py_type(fontFamily), 0 | ||
| ) | ||
| def TextAddFontSize(builder, fontSize): | ||
| builder.PrependUint8Slot(5, fontSize, 10) | ||
| def TextEnd(builder): | ||
| return builder.EndObject() |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
158207
0.41%3685
2.16%