You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to scale an adapted version of our TaskExample, i.e. a model with a single passive resource.
Problematic Behaviour
The model scales just fine, let's assume the newly added assembly is called A2. However, as soon as ResourceSimulation receives an ResourceDemandRequest from A2, the request does not match the key of the passiveResource.
Problem is in this piece of code in Operation initiatePassiveResource :
final Optional<SimplePassiveResource> passiveResourceInstance = this.passiveResourceTable
.getPassiveResource(PassiveResourceCompoundKey.of(passiveResource, assemblyContext));
We build the key as passiveResource ID : assembly ID, but there are now, after scaling, new assemblies, with new IDs that need to access the same old passive resource.
But the key was build from the old assmbly only, thus we cannot get the passive resource in the table anymore.
Suggestions for fixes
1. change the implementation of the PassiveResourceCompoundKey. Passice resource have their own unique ID, why do we need a compound key at all?
2. upon receiving a ModelAdjusted event, also update the passive resource table with new entries for all new assemblies.
EDIT : I missunderstood how to passive resources are supposed to be interpreted!!
So i guess, the fix is to create a new passive resource for the new assembly and put it into the table :D
The text was updated successfully, but these errors were encountered:
Scenario
I tried to scale an adapted version of our TaskExample, i.e. a model with a single passive resource.
Problematic Behaviour
The model scales just fine, let's assume the newly added assembly is called
A2
. However, as soon asResourceSimulation
receives anResourceDemandRequest
fromA2
, the request does not match the key of the passiveResource.Problem is in this piece of code in Operation
initiatePassiveResource
:We build the key as passiveResource ID : assembly ID, but there are now, after scaling, new assemblies, with new IDs that need to access the same old passive resource.
But the key was build from the old assmbly only, thus we cannot get the passive resource in the table anymore.
Suggestions for fixes
1. change the implementation of thePassiveResourceCompoundKey
. Passice resource have their own unique ID, why do we need a compound key at all?2. upon receiving a
ModelAdjusted
event, also update the passive resource table with new entries for all new assemblies.EDIT : I missunderstood how to passive resources are supposed to be interpreted!!
So i guess, the fix is to create a new passive resource for the new assembly and put it into the table :D
The text was updated successfully, but these errors were encountered: