Using Vector in Constructor Graph Function
|
|
Do you anticipate any upload difficulty with the following?
VarA=VECTOR(0,0.01,0.01,0.02,0.03,0.05,0.08,0.10,0.12,0.14,0.15) with dimension v=1..11 VarB=SomeXInputNumber VarC=GRAPH(VarB,1,0.3,VarA) Bill |
|
|
Hi Bill,
You can do something like that but the way you describe your model doesn't use valid syntax. All variables must start with a V, dimensions must be declared after the variable name, you need to use the ARRAYGRAPH function, not GRAPH to use an array, and there is no VECTOR function in Simulate. Below is the equivalent with valid syntax: V VarA[1..11] = {0,0.01,0.01,0.02,0.03,0.05,0.08,0.10,0.12,0.14,0.15} V VarB = 1.7 V VarC = ARRAYGRAPH(VarB,1,0.3,VarA) Michael |
|
|
Hi Michael,
Thank you. I did not describe this clearly. I am referring to the equation upload applet, where I paste Constructor equations, then click the upload button to convert Constructor equations into FML equations. Typically in Constructor the GRAPH function looks like this: GRAPH(VarB,1,0.3,[0,0.01,0.01,0.02,0.03,0.05,0.08,0.10,0.12,0.14,0.15"Min:0;Max:2"]) I was only asking about implication for translating from Constructor to FML as a matter of having declared a VECTOR in a separate variable and using the vector where the Y values usually appear. Bill |
|
|
Hi Bill,
Compatibility between Forio and Powersim constructor is excellent, particularly around array syntax. You should have no trouble doing what you are trying to do. WILL |
Please log in to reply to topics.