Comments (5)
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.
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.
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.
so constraint Interval(a, b) means that |va.start - vb.start| in [a, b] and |va.end - vb.end| in [a, b] ?
from construe.
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)
- Documentation images
- FileNotFoundError: [Errno 2] No such file or directory: 'signame' HOT 2
- ModuleNotFoundError: No module named 'sklearn.svm.classes' HOT 4
- the result of run_example.sh fig4 is strange HOT 2
- Python3 HOT 18
- example missing some records. HOT 1
- StopIteration in generator python 3.7
- Incompatibility with scikit-learn v. 0.22 HOT 1
- Incompatibility with scikit-learn > 0.22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from construe.