GithubHelp home page GithubHelp logo

Comments (5)

tomas-teijeiro avatar tomas-teijeiro commented on July 20, 2024

I am not sure what you mean, since the beginning of the method is intended to deal with the case when the two variables are the same.

if va is vb:
    if not const.zero_in:
        raise InconsistencyError('Constraints between the same '
                                          'variable must contain zero')

from construe.

lkjell avatar lkjell commented on July 20, 2024

Yes it only check. But it does not add a constraint to the network. Calling get_constraints() will not give anything new.
I thought that if va.start == 0, va.end == 10 then add_constraint(va,va, Interval(0,5)) would restrict va.end to 5?

from construe.

tomas-teijeiro avatar tomas-teijeiro commented on July 20, 2024

Ok, I understand now. Maybe it is a bit complicated to get it, but constraints only bound the difference between two variables. If the variable is the same, then there is no need to include any constraint, since the difference will always be 0. If you want to limit the value of a variable va to the interval (0, 5), then you should define a reference variable v0 with value (0, 0) and add_constraint(v0, va, Interval(0, 5)).

from construe.

lkjell avatar lkjell commented on July 20, 2024

so constraint Interval(a, b) means that |va.start - vb.start| in [a, b] and |va.end - vb.end| in [a, b] ?

from construe.

tomas-teijeiro avatar tomas-teijeiro commented on July 20, 2024

You have to think that a variable has a single value on a particular domain, and constraints are used to delimit the range of possible values based on values of other variables. In general, va ∊ (-∞, ∞), but by adding a constraint (va, vb, Interval(a, b)) you impose that a ≤ vb-va ≤ b. Then, after constraint propagation by network minimization, the possible limits for the variables may be reduced, and that is the meaning of v.start and v.end.

I recommend you to take a look at this paper to understand the theory in greater depth: Dechter, R., Meiri, I., & Pearl, J. (1991). Temporal constraint networks. Artificial intelligence, 49(1-3), 61-95.

from construe.

Related Issues (10)

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.