Projects / StepSim

StepSim

StepSim is a lightweight step-based simulation module written in Python. It can do simple real-time simulations of discrete systems. StepSim supports step-by-step simulation or can run until a break condition occurs. Simulations are made up of containers and converters. A container stores a discrete amount of units of a certain type. A converter draws units from one or more containers and delivers the result to another container. StepSim does not even attempt to do any parallel processing. It processes converters round-robin in a fixed order.

Tags
Licenses
Operating Systems
Implementation

Recent releases

  •  15 Jun 2013 12:22

    Release Notes: This release fixes several bugs in milestones(), and makes logging more verbose. Converters can be compared for equality now. Converter.revert() no longer uses the Container.deliver() method to return items in order for them not being counted as delivered. Converter.draw() no longer checks how many units have been delivered, but how many would be delivered in the next step, and will refuse to draw when this would exceed Converter.max_units. Simulation.save_dot() now groups equivalent converters to a single graph node.

    •  25 Feb 2013 12:32

      Release Notes: This release adds STDERR_FORMATTER for STDERR_HANDLER for more distinguishable output to STDERR. It has more verbose logging. Converter.set_temporary_steps() now applies the change at once, changing Converter.countdown. Converter.set_temporary_steps() will no longer change any values if a temporary change is already active, and returns False instead. Converter.process() now restores Converter.countdown when the temporary countdown has passed. Simulation.__repr__() also includes all containers and their states. There is an updated doctest example in the README.

      •  05 Jul 2012 20:31

        Release Notes: This release adds Milestone.converters, uses current_milestone.converters in milestones(), adds Converter.set_temporary_steps(), makes converter.process() and Converter.deliver() temporarily change Converter.steps, adds a doctest for temporarily changing the step value of a Converter to README, and makes minor changes.

        •  24 Feb 2012 15:41

          Release Notes: This release adds Container.units_delivered, which counts the total number of units delivered to a Container. It changed Milestone.percent() to use Container.units_delivered instead of Container.stock. It adds Converter.max_units and Converter.units_delivered. Converter.draw() will now check if Converter.units_delivered has reached Converter.max_units before drawing resources. This release adds Converter.set_max_units(). It changes doctests in the README accordingly. Minor changes and additions.

          •  18 Sep 2011 12:05

            Release Notes: This release removes step() from Converter and replaces it with draw(), process(), and deliver() ,which are called by Simulation.step(). The new methods return True if the Converter's countdown permitted the action, False otherwise.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.