Comments (6)
Test report
Running 39 test cases...
/Users/hfossli/Projects/Rhea/unit_tests/unit_tests.cpp:758: error in "required_strength_stay": check v.value() == 2 failed [0 != 2]
/Users/hfossli/Projects/Rhea/unit_tests/unit_tests.cpp:769: error in "required_strength_stay_and_constraint": check y.value() == 2 failed [0 != 2]
/Users/hfossli/Projects/Rhea/unit_tests/unit_tests.cpp:778: error in "required_strength_stay_and_constraint": check v.value() == 2 failed [0 != 2]
/Users/hfossli/Projects/Rhea/unit_tests/unit_tests.cpp:779: error in "required_strength_stay_and_constraint": check y.value() == 4 failed [2 != 4]
*** 4 failures detected in test suite "rhea"
from rhea.
'required' is a special value, the weight factor isn't meaningful here. (Now we know what happens when the immovable object meets the unstoppable force, it appears the stay constraint wins. ;) )
from rhea.
If I got you right you are saying that the weight factor is the problem. Removing that from the unit test still yields the same output/error.
BOOST_AUTO_TEST_CASE(required_strength_stay)
{
variable v(0);
simplex_solver solver;
solver.add_stay(v, strength::required());
BOOST_CHECK_EQUAL(v.value(), 0);
solver.add_edit_var(v);
solver.begin_edit();
solver.suggest_value(v, 2);
solver.end_edit();
BOOST_CHECK_EQUAL(v.value(), 2);
}
Result
error in "required_strength_stay": check v.value() == 2 failed [0 != 2]
from rhea.
The value remains 0 because the edit constraint is weaker than the stay constraint in this case. (Stays are weak and edits are strong by default.)
from rhea.
Aha. It's details like this that would be awesome to have documented.
This is quite good, but it too short IMO http://cassowary.readthedocs.org/en/latest/
from rhea.
For some reason, people started starring this project left and right in the past couple of days. Maybe this is a good time to get some documentation going. ;)
That Python implementation you linked to explains the concepts of Cassowary very well, that's definitely a good basis.
from rhea.
Related Issues (20)
- Crash when adding required edit variable HOT 4
- Is there any way to create read-only external variables? HOT 2
- License HOT 2
- Tag HOT 3
- Question: Hashmap string => variable HOT 2
- Nonlinear expressions HOT 2
- Documentation HOT 4
- Is the warning on the README accurate? HOT 10
- Named variables HOT 2
- `simplex_solver::change_weight()` and `simplex_solver::change_strength()` don't work HOT 16
- Understanding the edit protocol HOT 2
- Subclassing variables HOT 2
- Stays do not always stay HOT 4
- Solving constraints does not work in a dynamic application HOT 9
- Breaking changes between 0.2.x and 0.3 HOT 3
- Building branch 0.3 HOT 2
- Maybe glitch in simplex solver when choosing subject? HOT 9
- Getting rhea::internal_error("objective function is unbounded.") on removing constraint. HOT 7
- Nothing happens on setting constant through set_constant method HOT 1
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 rhea.