rpgoldman / europa-pso

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

Transactions getting created without owners #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

From Paul:

In Resource/component/Reservoir.cc:

TransactionId? trans = (new Transaction(t->getTime(), t->getQuantity(),
t->isConsumer()))->getId();

Note the call does not pass the m_owner value to the new transaction. As a
consequence I am getting null for the getOwner() accessor.

Interestingly, adding the resource id to the transaction constructor call
causes transactions to live forever:

    [exec] ExecuteTarget?
RUN_runProblem_SOLVER_g_rt.backtr.xml.DefaultPlannerConfig?.xml.nddl-xml
[exec] FAILED = DID NOT CLEAN UP ALLOCATED IDs: [exec] 10
N6EUROPA11TransactionE [exec] Id Contents: (13998240, 2,N6EUROPA8DataTypeE)
(16914112, 3,N6EUROPA8DataTypeE) (16914144, 6,N6EUROPA8DataTypeE)
(16914176, 5,N6EUROPA8DataTypeE) (16914208, 4,N6EUROPA8DataTypeE)
(16914272, 7,N6EUROPA8DataTypeE) (16914304, 1,N6EUROPA8DataTypeE)
(18984112, 3411,N6EUROPA11TransactionE) (19027584,
2265,N6EUROPA11TransactionE) (19164672, 3876,N6EUROPA11TransactionE)
(19296592, 502,N6EUROPA11TransactionE) (19350560,
663,N6EUROPA11TransactionE) (19492864, 4009,N6EUROPA11TransactionE)
(19528720, 4128,N6EUROPA11TransactionE) (19606112,
5053,N6EUROPA11TransactionE) (19654480, 5299,N6EUROPA11TransactionE)
(19691232, 5422,N6EUROPA11TransactionE) [exec] Were 7 IDs before; 17 now

Original issue reported on code.google.com by miata...@gmail.com on 15 Sep 2009 at 3:22

GoogleCodeExporter commented 9 years ago

Original comment by javier.barreiro@gmail.com on 22 Nov 2010 at 10:29

GoogleCodeExporter commented 9 years ago

Original comment by javier.barreiro@gmail.com on 17 Aug 2011 at 8:27

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
It looks like the m_owner parameter of Transaction was added to support the 
constraint-based resources, and isn't used at all by regular resources except 
to /not/ delete them if the owner is set.  I'll change the constructor so the 
owner is a required parameter and change the Resource destructor to delete 
transactions that it owns directly.  

Original comment by miata...@gmail.com on 20 Sep 2014 at 9:13

GoogleCodeExporter commented 9 years ago
Addressed in r6750.  The only owner-less transactions are the dummies created 
for the source and sink in FlowProfiles.

Original comment by miata...@gmail.com on 22 Sep 2014 at 4:51