return new SimulationSet(); SimulationSet sset = new SimulationSet(); sset.getMean().setValue(ndt.getMean()); sset.getStandardDeviation().setValue(ndt.getStandardDeviation()); sset.getDistributionType().setValue("normal"); return sset; }) .when(UniformDistributionType.class, udt -> { SimulationSet sset = new SimulationSet(); sset.getMin().setValue(udt.getMin()); sset.getMax().setValue(udt.getMax()); sset.getDistributionType().setValue("uniform"); return sset; }) .when(PoissonDistributionType.class, pdt -> { SimulationSet sset = new SimulationSet(); sset.getMean().setValue(pdt.getMean()); sset.getDistributionType().setValue("poisson"); return sset; }).apply(paramValue).asSuccess().value(); simulationSet.getUnitCost().setValue(extractDouble(costParams.getUnitCost())); simulationSet.getQuantity().setValue(quantity); simulationSet.getWorkingHours().setValue(availability);
@Test @SuppressWarnings("unchecked") public void testUnmarshallSimulationProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(BPMN_SIMULATIONPROPERTIES); assertDiagram(diagram, 4); assertEquals("SimulationProperties", diagram.getMetadata().getTitle()); UserTask userTask = findContent(diagram, UserTask.class); SimulationSet simulationSet = userTask.getSimulationSet(); assertEquals(Double.valueOf(111), simulationSet.getQuantity().getValue()); assertEquals("poisson", simulationSet.getDistributionType().getValue()); assertEquals(Double.valueOf(123), simulationSet.getUnitCost().getValue()); assertEquals(Double.valueOf(999), simulationSet.getWorkingHours().getValue()); assertEquals(Double.valueOf(321), simulationSet.getMean().getValue()); }
public SimulationSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(task.getId()) .map(SimulationSets::of) .orElse(new SimulationSet()); }
simulationSet.getQuantity().getValue()); assertEquals("poisson", simulationSet.getDistributionType().getValue()); assertEquals(Double.valueOf(123), simulationSet.getUnitCost().getValue()); assertEquals(Double.valueOf(999), simulationSet.getWorkingHours().getValue()); assertEquals(Double.valueOf(321), simulationSet.getMean().getValue());
public SimulationSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(element.getId()) .map(SimulationSets::of) .orElse(new SimulationSet()); }
public static SimulationSet simulationSet(ElementParameters eleType) { SimulationSet simulationSet = new SimulationSet(); simulationSet.getMean().setValue(ndt.getMean()); simulationSet.getStandardDeviation().setValue(ndt.getStandardDeviation()); simulationSet.getDistributionType().setValue("normal"); }) .when(UniformDistributionType.class, udt -> { simulationSet.getMin().setValue(udt.getMin()); simulationSet.getMax().setValue(udt.getMax()); simulationSet.getDistributionType().setValue("uniform"); }) .when(PoissonDistributionType.class, pdt -> { simulationSet.getMean().setValue(pdt.getMean()); simulationSet.getDistributionType().setValue("poisson"); }).apply(paramValue).asSuccess().value(); simulationSet.getUnitCost().setValue(extractDouble(costParams.getUnitCost())); simulationSet.getQuantity().setValue(quantity); simulationSet.getWorkingHours().setValue(availability);
public SimulationSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(element.getId()) .map(SimulationSets::of) .orElse(new SimulationSet()); } }
timeParameters.setProcessingTime(processingTime); switch (simulationSet.getDistributionType().getValue()) { case "normal": NormalDistributionType ndt = bpsim.createNormalDistributionType(); ndt.setMean(simulationSet.getMean().getValue()); ndt.setStandardDeviation(simulationSet.getStandardDeviation().getValue()); processingTime.getParameterValue().add(ndt); case "uniform": UniformDistributionType udt = bpsim.createUniformDistributionType(); udt.setMin(simulationSet.getMin().getValue()); udt.setMax(simulationSet.getMax().getValue()); processingTime.getParameterValue().add(udt); case "poisson": PoissonDistributionType pdt = bpsim.createPoissonDistributionType(); pdt.setMean(simulationSet.getMean().getValue()); processingTime.getParameterValue().add(pdt); Double unitCost = simulationSet.getUnitCost().getValue(); Double quantity = simulationSet.getQuantity().getValue(); Double workingHours = simulationSet.getWorkingHours().getValue();
public SimulationSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(task.getId()) .map(SimulationSets::of) .orElse(new SimulationSet()); } }
public ReusableSubprocess() { this(new BPMNGeneralSet("Sub-process"), new ReusableSubprocessTaskExecutionSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet()); }
public AdHocSubprocess(String label) { this(new BPMNGeneralSet(label), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new AdHocSubprocessTaskExecutionSet(), new ProcessData()); }
public MultipleInstanceSubprocess() { this(new BPMNGeneralSet("Multiple Instance Sub-process"), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new MultipleInstanceSubprocessTaskExecutionSet(), new ProcessData()); }
public EventSubprocess() { this(new BPMNGeneralSet("Event Sub-process"), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new EventSubprocessExecutionSet(), new ProcessData()); }
public AdHocSubprocess(String label) { this(new BPMNGeneralSet(label), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new AdHocSubprocessTaskExecutionSet(), new ProcessData()); }
public EmbeddedSubprocess() { this( new BPMNGeneralSet("Sub-process"), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new EmbeddedSubprocessExecutionSet(), new ProcessData()); }
public ProcessReusableSubprocess() { this(new BPMNGeneralSet("Subprocess"), new ProcessReusableSubprocessTaskExecutionSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet()); }
public CaseReusableSubprocess() { this(new BPMNGeneralSet("Subcase"), new CaseReusableSubprocessTaskExecutionSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet()); }
public NoneTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new EmptyTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.NONE)); }
public UserTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new UserTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.USER)); }
public ScriptTask() { this(new TaskGeneralSet(new Name("Task"), new Documentation("")), new ScriptTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.SCRIPT)); }