rpgoldman / europa-pso

Automatically exported from code.google.com/p/europa-pso
0 stars 0 forks source link

if statement causes exception #112

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
To reproduce:

1. Unzip the attached example (I couldn't reproduce with a simple example).
2. Run 'make clean; make'
3. You should see this exception:

Solvers/base/Solver.cc:640: Error: 
m_db->getConstraintEngine()->constraintConsistent() is false
        Can only call this if variable changes have been propagated first.
PSEngine failed:Can only call this if variable changes have been propagated 
first.

The problem is caused (probably indirectly) by an if statement.  You can 
comment out either of these snippets in Car-model.nddl and the exception 
disappears:

a) if(this.init_speed > this.speed_setting) {
        newSpeedFlat == this.init_speed - 0.5;
 }

b)  if(track.slope == 1) {
        this.final_speed == newSpeedFlat - 0.5;
    }

Original issue reported on code.google.com by tristanb...@gmail.com on 5 Mar 2011 at 1:31

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by javier.barreiro@gmail.com on 17 Aug 2011 at 7:50

GoogleCodeExporter commented 8 years ago
this may be related to issue 113?

Original comment by javier.barreiro@gmail.com on 17 Aug 2011 at 7:56

GoogleCodeExporter commented 8 years ago

Original comment by tristanb...@gmail.com on 31 Aug 2011 at 6:20

GoogleCodeExporter commented 8 years ago

Original comment by javier.barreiro@gmail.com on 30 May 2012 at 5:26

GoogleCodeExporter commented 8 years ago
I've done some investigation and it's really involved in Tristan's example.  
What I /think/ is going on is that the contents of some guard B is causing 
another guard A to remain true even after the Solver has backed off the 
decision that made guard A true in the first place. 
I'm attaching a much smaller example of the body of a guard making itself 
functionally immortal, which might not be what's going on here (the constraints 
chain across a reduced set of seven tokens, so it's very difficult to pin 
down), but I'm pretty sure it is.  It's a problem, either way.
Basically, I think this is the final nail in the coffin of the newer 
RulesEngine semantic where a guarded rule fires as a result of something other 
than a variable specification (or possibly a case of a singleton base domain).  

Original comment by miata...@gmail.com on 11 Aug 2014 at 6:27

Attachments:

GoogleCodeExporter commented 8 years ago
Addressed in r6741

Original comment by miata...@gmail.com on 15 Aug 2014 at 6:29