Search in sources :

Example 1 with AllocationGroupsContainer

use of org.iobserve.planning.data.AllocationGroupsContainer in project iobserve-analysis by research-iobserve.

the class ModelTransformer method initModelTransformation.

private void initModelTransformation() throws IOException, InitializationException {
    this.processedModelDir = this.planningData.getOriginalModelDir().appendSegment(ModelProcessing.PROCESSED_MODEL_FOLDER);
    SnapshotBuilder.setBaseSnapshotURI(this.planningData.getOriginalModelDir());
    final SnapshotBuilder snapshotBuilder = new SnapshotBuilder(ModelProcessing.PROCESSED_MODEL_FOLDER, this.originalModelHandler);
    snapshotBuilder.createSnapshot();
    this.planningData.setProcessedModelDir(this.processedModelDir);
    this.processedModelHandler = new PCMModelHandler(new File(this.processedModelDir.toFileString()));
    this.allocationModel = this.processedModelHandler.getAllocationModel();
    this.cloudProfileModel = this.processedModelHandler.getCloudProfileModel();
    this.costModel = this.processedModelHandler.getCostModel();
    this.resourceEnvironmentModel = this.processedModelHandler.getResourceEnvironmentModel();
    this.decisionModel = this.processedModelHandler.getDesignDecisionModel();
    this.decisionSpace = this.processedModelHandler.getDesignDecisionModel();
    if (this.decisionSpace == null) {
        this.decisionSpace = DesignDecisionModelFactory.createDecisionSpace("processedDecision");
    }
    final Allocation originalAllocation = this.originalModelHandler.getAllocationModel();
    this.originalAllocationGroups = new AllocationGroupsContainer(originalAllocation);
}
Also used : Allocation(org.palladiosimulator.pcm.allocation.Allocation) SnapshotBuilder(org.iobserve.model.snapshot.SnapshotBuilder) AllocationGroupsContainer(org.iobserve.planning.data.AllocationGroupsContainer) PCMModelHandler(org.iobserve.model.PCMModelHandler) File(java.io.File)

Aggregations

File (java.io.File)1 PCMModelHandler (org.iobserve.model.PCMModelHandler)1 SnapshotBuilder (org.iobserve.model.snapshot.SnapshotBuilder)1 AllocationGroupsContainer (org.iobserve.planning.data.AllocationGroupsContainer)1 Allocation (org.palladiosimulator.pcm.allocation.Allocation)1