• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LoLab-VU / pysb / 323 / 2
79%
master: 79%

Build:
DEFAULT BRANCH: master
Ran 05 Oct 2016 10:10PM UTC
Files 74
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Oct 2016 08:49PM UTC coverage: 71.625% (+1.5%) from 70.125%
323.2

push

travis-ci

jmuhlich
Simulator Class (#212)

* Restore simulate.py in new branch (deleted in master in commit 1823a40)

simulate.py was removed by @jmuhlich in master for the v1.1 release, as the
Simulator class is not yet ready for primetime. This commit restores the last
version of simulate.py for continued development internally.

* Add classmethod simulate() to run a single simulation

* ComplexPattern.is_equivalent_to() now works on Python 3

The ComplexPattern.is_equivalent_to() method relied on sorting a tuple
containing (str, dict, int). dicts are no longer sortable in Python 3
without specifying a sort order. The problem is fixed using a lambda
function to specify the sort order, replicating the Python 2 behaviour.

* First draft of ScipyOdeSimulator() class

* Cache simulator trajectory array internally for concs_all() calls

* Simulator class now allows initial condition overrides as a dict

Previous behaviour was that the entire list of initial conditions had
to be specified as a list, matching the order of model.species. This
commit allows simulation-specific initial condition overrides to be
specified using a dict with a MonomerPattern or ComplexPattern for each
key.

Example:
```
ScipyOdeSolver.execute(model,
                       tspan=linspace(0, 100, 10),
                       initials={A(a=1) % B(b=1): 10})
```

* Fix Simulator class with initial conditions specified in a list

This was previously broken due to a bug. Thanks to @michael-irvin
for the catch. A unit test has also been implemented to catch the
error.

* Simulator class: setting initials or parameters using numpy arrays now works

Previously this would fail silently without updating the initials/parameters
(oops).

* Simulator class: add more unit tests and increase coverage

* Adding default options for lsoda

* Add setter for Solver._use_inline

* Use relative import for .scipyode

* Refactor Simulator class _clear_outputs to _init_outputs

* Allow tspan, initials and param_values to be set im Simulator constructor

* Tweaks to Simulator initials setter (thanks @jmuhlich)

* Simulator.run() now returns SimulationResult; execute() classmethod removed

The Simulator class `run()` method now returns a SimulationResult object
instead of no return type. This makes one-liners with `run()` possible, e.g.
`result = Simulator(model, tspan).run()`, making the `Simulator.execute()`
syntax redundant.

The SimulationResult class has property methods `.all`, `.species`,
`.observables` and `.expressions` for getting sets of trajectories.

Also fixed bug where running a Simulator without a tspan defined wouldn't
raise an SimulatorException as it should.

* Add support for SimulationResults to return a pandas DataFrame

Now results of a simulation, or multiple simulations, can be returned in a
single pandas DataFrame with a MultiIndex with simulation (currently just
a numeric ID) and time.

* Switch to miniconda3, python3.5 to fix travis builds (fixes pysb/pysb#229)

* Update & fix examples to use Simulator class

* Add experimental API warnings to Simulator and SimulationResult classes

* Refactor "squeeze" pattern into a helper method _squeeze_output

* Allow simulation results as 3D array or list of 2D arrays; update docs

* SimulationResult.dataframe should honour "squeeze" setting

* Update tutorial with new syntax

3592 of 5015 relevant lines covered (71.63%)

0.72 hits per line

Source Files on job 323.2
  • Tree
  • List 0
  • Changed 13
  • Source Changed 12
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 323
  • Travis Job 323.2
  • 77c81599 on github
  • Prev Job for on master (#259.2)
  • Next Job for on master (#324.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc