Changes to the python interface and the ability to set the seed of the RNG#17
Open
davidcsterratt wants to merge 83 commits into
Open
Changes to the python interface and the ability to set the seed of the RNG#17davidcsterratt wants to merge 83 commits into
davidcsterratt wants to merge 83 commits into
Conversation
This is because with my hack to py4j the die_on_exit method doesn't work because of the redirection of the stdout. In any case, this is probably a neater method.
* addVariableMap renamed to addVariable * setTransitionRate renamed to setTransitionRateOrVariable * setVariable removed, since setTransitionRateOrVariable does the job * addVariable(String label, float input) created * addVariable(Agent agent, String siteName, String linkName) removed
…atic model creation The model and simulation are separate concepts in SpatialKappa, but previously had reinitialised the simulation after changing a model. In this refactoring the model is only initialised using initialiseSim() and runForTime() or runUntilTime(). The interface is also made more similar to the IKappaModel.
… times Fix the issue by representing time as double rather than float. In addition, if the time between events dt is more than 12 orders of magnitude (i.e. 10^12) times smaller than the time t, throw an exception. This ensures that there are at least 13 bits available to represent dt, since the mantissa in a double has 53 bits, and log2(10^12) (the maxiumum ratio between t and dt) is approximately 40 bits. https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.3
The conversion of times to doubles didn't work for some situations, so this change creates a local time within a time step in runByTime2(), used in KappaNEURON. This reduces the likelihood of a precision error.
Conflicts: README.md
add jar file to fix python compilation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is quite a lot here, but the main change to the core is the Utils.setSeed() method. It would be great if this could be merged into your SpatialKappa fork