jariba / europa-pso

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

Resource Profile is out of date after quantity is set to singleton #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run strips version of the Rover example
2. type showResourceProfiles() in the BeanShell console
3. the lower bound for battery is below 0 even though no flaws are detected

Mike and I tracked down the cause of this bug to the way profile deals with 
changes in the quantity variable (see 
FlowProfile::handleTransactionQuantityChanged): it computes an interval to 
update that only includes the temporal scope of the transactions involved. This 
works ok for reusables, since the net change outside of the transaction 
involved is 0. However, for reservoirs there may be a net change at the end of 
the transaction which will need to be applied from the end of the transaction 
to infinity. 
An easy way to see this: if the lower level for a Reservoir drops by 10 units 
at time 10, then the lower level for all the instants > 10 needs to drop by 10 
units as well.

Original issue reported on code.google.com by javier.barreiro@gmail.com on 9 Dec 2011 at 1:17

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 tried creating a test case for this 
(ResourceTest::testFlowReservoirWithConsumptionParameterSpecifiction) but have 
been unable to reproduce it simply.  The strips version of the Rover example 
doesn't appear to be checked in anywhere or attached to the ticket, so I'm 
declaring this un-reproduceable, with an option to re-open should it come back 
up.  

Original comment by miata...@gmail.com on 25 Aug 2014 at 4:53