Giter Club home page Giter Club logo

pymaboss's Introduction

pymaboss's People

Contributors

aurelien-naldi avatar pauleve avatar thenlevy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

colomoto

pymaboss's Issues

mutations are lost after copying a model

I tried to create some mutations (using model.mutate or maboss.copy_and_mutate) and then wanted to copy the model to apply different changes: the mutations are missing from the copy.

Digging into the code, the network contains two copies of each node: one in network.nodeList and the other as dict value. The mutation is only changing the dict value, while the copy restarts from the nodeList.

I'm working on a patch to stop using a separate list of nodes and only rely on the inner dict (we can still use the list of names to get the order).

All models have the same parameters

The constructor for a Simulation uses a default list of parameters as starting point. As the same dict is copied in all objects, we always end up with the same parameter set.

It can be solved by adding a call to copy() to the line self.param = _default_parameter_list

Extending the parser to more handwritten files

The current parser works well with the bnd/cfg files generated by GINsim, but fails on many handwritten files. Supporting all of MaBoSS syntax is a complex task, beyond the scope of the current parser, but we can handle a few more cases with minimal work.

  • The "node" keyword should ignore case
  • node.istate should work with "true" and "false" keywords
  • variable assignments can be more complex than a simple value (1/5 instead of 0.2 is common)

The first two are easy to fix (pull request is following). For the variable assignment, it may be simpler to just store the value as string without trying to interpret it (it can depend on another variable): are there some parts of the code where we need to work with these values?

My last problem is that the current parser will ignore silently everything that appears after an unrecognized line: it should try to parse the remaining and show a warning message, maybe keep the failed lines as string to be able to write them in print_cfg() anyway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.