Parametric Max and Sum Multiple Values

Discussions about systems engineering product SysML functionalities

Moderator: Moderators

Parametric Max and Sum Multiple Values

Postby jlaub@draper.com » 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
You do not have the required permissions to view the files attached to this post.
jlaub@draper.com
Forum Newbie
Forum Newbie
 
Posts: 17
Posts Rating:1
Joined: Mon May 21, 2018 10:16 am

Re: Parametric Max and Sum Multiple Values

Postby jirawat.l@nomagic.com » 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


For more information about the subset. Please see https://docs.nomagic.com/display/CST190/Subset+property
You do not have the required permissions to view the files attached to this post.
jirawat.l@nomagic.com
Customer Support
Customer Support
 
Posts: 58
Posts Rating:5
Joined: Mon Nov 16, 2015 1:57 am

Re: Parametric Max and Sum Multiple Values

Postby jlaub@draper.com » Wed May 23, 2018 7:23 am

Great, thank you!
jlaub@draper.com
Forum Newbie
Forum Newbie
 
Posts: 17
Posts Rating:1
Joined: Mon May 21, 2018 10:16 am


Return to SysML

Who is online

Users browsing this forum: No registered users and 0 guests

cron