Giter Club home page Giter Club logo

Comments (4)

vinci1it2000 avatar vinci1it2000 commented on July 18, 2024 1

I manage to solve the circular reference.

When you invoke the finish method of ExcelModel add circular=True. It invokes the method solve_circular, that solves the cycles breaking the loops when it is possible.

from formulas.

dtorres-sf avatar dtorres-sf commented on July 18, 2024 1

@vinci1it2000 This error is hit when trying to compile a function for solve. Using your approach does fix the issue. I can include it in a PR I want to open this week which includes numerous bug fixes and added excel functions.

from formulas.

dtorres-sf avatar dtorres-sf commented on July 18, 2024

@vinci1it2000 When calling compile in excel.py to create the function what should be done with the circular tokens?

        for k, v in sh.selector(dsp.data_nodes, res, allow_miss=True).items():
                dsp.set_default_value(k, v.value)

That is failing when a CIRCULAR token is hit because v == XlError which doesn't have value attribute. I tried just skipping CIRCULAR toknes completely (if(k != CIRCULAR)) but my outputs were incorrect in that case, but it did come up with a solution. Should I special case CIRCULAR nodes when setting defaults before compiling the function?

EDIT: Actually the calculation is correct if CIRCULAR is just ignored when setting default. I will go with this for now.

from formulas.

vinci1it2000 avatar vinci1it2000 commented on July 18, 2024

CIRCULAR is a special data node that has a special default value ERR_CIRCULAR. There are other nodes that can have this value. So I suggest a more pythonic way:

                 for k, v in sh.selector(dsp.data_nodes, res, allow_miss=True).items():
                          try:
                                dsp.set_default_value(k, v.value)
                          except AttributeError:
                                pass

One question: What is the scope of setting the defaults values of the dispatcher? Probably I can help with the usage of schedula.

from formulas.

Related Issues (20)

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.