Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
simpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
6
Merge Requests
6
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
team-simpy
simpy
Commits
d4ce2c19
Commit
d4ce2c19
authored
Jan 13, 2017
by
Peter Grayson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various small spelling and grammar repairs
All occurrences of "Simpy" are changed to "SimPy".
parent
ab38a332
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
15 deletions
+16
-15
docs/about/acknowledgements.rst
docs/about/acknowledgements.rst
+1
-1
docs/about/defense_of_design.rst
docs/about/defense_of_design.rst
+3
-3
docs/about/index.rst
docs/about/index.rst
+1
-1
docs/api_reference/index.rst
docs/api_reference/index.rst
+1
-1
docs/examples/gas_station_refuel.rst
docs/examples/gas_station_refuel.rst
+1
-1
docs/index.rst
docs/index.rst
+1
-1
docs/simpy_intro/basic_concepts.rst
docs/simpy_intro/basic_concepts.rst
+1
-1
docs/simpy_intro/process_interaction.rst
docs/simpy_intro/process_interaction.rst
+1
-1
docs/topical_guides/time_and_scheduling.rst
docs/topical_guides/time_and_scheduling.rst
+3
-2
src/simpy/core.py
src/simpy/core.py
+1
-1
src/simpy/resources/base.py
src/simpy/resources/base.py
+1
-1
tests/test_rt.py
tests/test_rt.py
+1
-1
No files found.
docs/about/acknowledgements.rst
View file @
d4ce2c19
...
...
@@ -11,7 +11,7 @@ existing SimPy code and documentation environment.
Thanks, guys, for this great job! **SimPy 2.0 is dedicated to you!**
SimPy was originally created by Klaus Müller and Tony Vignaux. They pushed its
development for several years and built the Sim
p
y community. Without them,
development for several years and built the Sim
P
y community. Without them,
there would be no SimPy 3.
Thanks, guys, for this great job! **SimPy 3.0 is dedicated to you!**
...
...
docs/about/defense_of_design.rst
View file @
d4ce2c19
...
...
@@ -59,7 +59,7 @@ in SimPy 1:
Changes in SimPy 2
==================
Sim
py 2 mostly sticked with Simp
y 1's design, but added an object orient API
Sim
Py 2 mostly sticked with SimP
y 1's design, but added an object orient API
for the execution of simulations, allowing them to be executed in parallel.
Since processes and the simulation state were so closely coupled, you now
needed to pass the ``Simulation`` instance into your process to "bind" them to
...
...
@@ -130,7 +130,7 @@ The following sections describe these changes in detail:
No More Sub-classing of ``Process``
-----------------------------------
In Sim
p
y 3, every Python generator can be used as a PEM, no matter if it is
In Sim
P
y 3, every Python generator can be used as a PEM, no matter if it is
a module level function or a method of an object. This reduces the amount of
code required for simple processes. The ``Process`` class still exists, but you
don't need to instantiate it by yourself, though. More on that later.
...
...
@@ -157,7 +157,7 @@ separately and were bound to some internal functions that were tightly
integrated with the ``Simulation`` and ``Process`` making it very hard to
extend SimPy with new functionality.
In Sim
p
y 3, PEMs just need to yield events. There are various built-in event
In Sim
P
y 3, PEMs just need to yield events. There are various built-in event
types, but you can also create custom ones by making a subclass of
a ``BaseEvent``. Most events are generated by factory methods of
``Environment``. For example, ``Environment.timeout()`` creates a ``Timeout``
...
...
docs/about/index.rst
View file @
d4ce2c19
...
...
@@ -5,7 +5,7 @@ About SimPy
===========
This sections is all about the non-technical stuff. How did SimPy evolve? Who
was responsible for it? And what the heck were they tinking when they made it?
was responsible for it? And what the heck were they t
h
inking when they made it?
.. toctree::
...
...
docs/api_reference/index.rst
View file @
d4ce2c19
...
...
@@ -5,7 +5,7 @@ API Reference
=============
The API reference provides detailed descriptions of SimPy's classes and
functions. It should be helpful if you plan to extend Sim
p
y with custom
functions. It should be helpful if you plan to extend Sim
P
y with custom
components.
...
...
docs/examples/gas_station_refuel.rst
View file @
d4ce2c19
...
...
@@ -21,7 +21,7 @@ Vehicles arriving at the gas station first request a fuel pump from the
station. Once they acquire one, they try to take the desired amount of fuel
from the fuel pump. They leave when they are done.
The gas stations fuel level is re
q
ularly monitored by *gas station control*.
The gas stations fuel level is re
g
ularly monitored by *gas station control*.
When the level drops below a certain threshold, a *tank truck* is called to
refuel the gas station itself.
...
...
docs/index.rst
View file @
d4ce2c19
...
...
@@ -3,7 +3,7 @@
..
figure
::
_static
/
simpy
-
logo
-
small
.
png
:
align
:
center
Event
discrete
simulation
for
Python
Discrete
event
simulation
for
Python
`
News
<
https
://
plus
.
google
.
com
/
101634625602509193865
>`
_
|
`
PyPI
<
https
://
pypi
.
python
.
org
/
pypi
/
simpy
>`
_
|
...
...
docs/simpy_intro/basic_concepts.rst
View file @
d4ce2c19
...
...
@@ -97,5 +97,5 @@ passing an end time to it.
What's Next?
============
You should now be familiar with Sim
p
y's terminology and basic concepts. In the
You should now be familiar with Sim
P
y's terminology and basic concepts. In the
:doc:`next section <process_interaction>`, we will cover process interaction.
docs/simpy_intro/process_interaction.rst
View file @
d4ce2c19
...
...
@@ -57,7 +57,7 @@ it to finish::
... def charge(self, duration):
... yield self.env.timeout(duration)
Starting the simulation is straight
forward again: We create an environment,
Starting the simulation is straightforward again: We create an environment,
one (or more) cars and finally call :meth:`~simpy.core.Environment.run()`.
::
...
...
docs/topical_guides/time_and_scheduling.rst
View file @
d4ce2c19
...
...
@@ -59,7 +59,8 @@ So keep this in mind:
- Discretization of the time scale can make events appear to be *at the same
time*.
- SimPy processes events *on after another*, even if they have the *samt time*.
- SimPy processes events *one after another*, even if they have the *same
time*.
SimPy Events and time
...
...
@@ -79,7 +80,7 @@ So if we insert events as tuples *(t, event)* (with *t* being the scheduled
time) into it, the first element in the queue will by definition always be the
one with the smallest *t* and the next one to be processed.
However, storing *(t, event)* tuples will not work if two event
'
s are scheduled
However, storing *(t, event)* tuples will not work if two events are scheduled
at the same time because events are not comparable. To fix this, we also store
a strictly increasing event ID with them: *(t, eid, event)*. That way, if two
events get scheduled for the same time, the one scheduled first will always be
...
...
src/simpy/core.py
View file @
d4ce2c19
...
...
@@ -120,7 +120,7 @@ class BaseEnvironment(object):
raise
ValueError
(
'until(=%s) should be > the current '
'simulation time.'
%
at
)
# Schedule the event
with
before all regular timeouts.
# Schedule the event before all regular timeouts.
until
=
Event
(
self
)
until
.
_ok
=
True
until
.
_value
=
None
...
...
src/simpy/resources/base.py
View file @
d4ce2c19
"""
Base classes of for Sim
p
y's shared resource types.
Base classes of for Sim
P
y's shared resource types.
:class:`BaseResource` defines the abstract base resource. It supports *get* and
*put* requests, which return :class:`Put` and :class:`Get` events respectively.
...
...
tests/test_rt.py
View file @
d4ce2c19
"""
Tests for Sim
p
y's real-time behavior.
Tests for Sim
P
y's real-time behavior.
"""
import
time
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment