Page 1 of 1

### Parametric Max and Sum Multiple Values

Posted: Mon May 21, 2018 2:03 pm
Hello,

I am trying to setup a simple Parametric diagram that will take multiple inputs and find the max of the values. I want the input to be an array so that I can change the amount of inputs without having to add/subtract parameters on the Constraint Block.

My Constraint is {f = max(A)} where 'A' is an array [0..*] and 'f' is the maximum in the array. However, whenever I run the simulation all of my values get changed to the maximum, including all the inputs. For example, I have [3.3, 5, 9] as the input, and after running the simulation the instances are changed to [9, 9, 9] and f = 9. It finds the maximum but in the process changes all the inputs as well. Attached is an image of my model example.

How can I create a parametric diagram with a Constraint Block that can accept multiple inputs on one Parameter? I would like to create a similar example with the sum function.

Thank you,
Joseph

### Re: Parametric Max and Sum Multiple Values

Posted: Wed May 23, 2018 4:12 am
dear customer

We recommend you to use the subset for finding the max value.
However you need to modify the model.
- Create the super type of all SubSystem and value property for max calculation
- Create part property for collecting the all subSystem
- Set "Subsetted Property" of SubSystem part property to collecting part property (SubSystemA, SubSystemB, SubSystemC)
- Modified the parametric to find max from super type of SubSystem.
subset.png

We attached the sample model for using the subset to find the max value.
maxValue.mdzip