Page 1 of 1

About ControlLinearNode

Posted: Sat Jul 23, 2011 3:11 am
by hans14
Hi all

What are the differences of these two constructor under ControlLinearNode class?

1.ControlLinearNode (double aT=0.0, double aValue=0.0)
2.ControlLinearNode (const ControlLinearNode &aNode)

I've tried both of them. For the first one, I splitted the whole simulation elapse time by 0.01 second and declared them as the time array.

But for the second one, I wonder when the nodes occurs.
I declared nodes first, and add them with ControlLinear::insertNewValueNode. I didn't declare the occuring time of each node.
Do they occur randomly by default?

Either way could alter the shape of control curve, but I'm not sure that I implemented correct codes.

One more quesiton: if the name of control object was set as the exact muscle name in OpenSim model,
does the control curve follow the excitation-activation relation?

Thank you.

RE: About ControlLinearNode

Posted: Tue Jul 26, 2011 11:14 am
by aymanh
Hi Shiuan-Lin,

What you have here are two different constructors to the ControlLinearNode class. The first creates a node with value of 0. at time 0.0 unless you pass in a time and/or a value while the other is a copy constructor that will populate the ControlLinearNode based on the passed in aNode.

As with C++ default arguments, if you specify only one argument, it would be taken as "time", with a "value" of 0.0 (why would you do that?)

If you create your ControlSet and save it to a file you can use the Excitation Editor in the GUI to see how it looks, or you can create the ControlSet entirely in the GUI. You could also create a storage file and pass it in and we'll convert it internally to a ControlSet in the ForwardTool.

Hope this helps and please let me know if you have any questions.
-Ayman



RE: About ControlLinearNode

Posted: Wed Jul 27, 2011 8:05 am
by hans14
Thank you, Ayman.
I misunderstood the usage of this class.

My purpose is to create a series of control nodes, and let the algorithm to search for a new sets of nodes which could minimize the value of objective function.

I have to look for other ways to implement codes which serve that purpose.

I really appreciate your help. Thank you, Ayman.

Shiuan-Lin