Page 1 of 1
How to write predefined x nodes in constraints.xml file
Posted: Tue Nov 15, 2011 3:03 pm
by rlw
Hi all,
I want to write pre-defined x nodes values in the CMC_constraint.xml file.
e.g.
<x_nodes>
<ControlLinearNode name="">
<t> 0.20999999999999999000 </t>
<value> 0.01000000000000000000 </value>
</ControlLinearNode>
Is there any easy way to write the values (stored in excel file) to xml file in the above format? Anyone has experiences?
Thank you in advance,
Ruoli
Re: How to write predefined x nodes in constraints.xml file
Posted: Tue Nov 15, 2011 3:32 pm
by aymanh
Hi Ruoli,
The excitation editor should be able to help you. It reads sto files and writes XML files. Please give that a try and let me know if you need further help.
Best regards,
-Ayman
Re: How to write predefined x nodes in constraints.xml file
Posted: Wed Nov 16, 2011 8:30 am
by rlw
Hi Ayman,
Thank you for your reply.
I have tried excitation editor, but I can not really save it, always got runtime error with java.exe. I saved the predefined controls (e.g. gasmed_r) in a .sto file , then loaded control of gasmed_r from a regular cmc_constraint.xml. When I right click the grid panel, there is an option 'import data from a file', which I can load the predefined .sto file. I have tried to 'save, save as or new', but error window pop up. Did I do something wrong?
I knew it is possible to manipulate excitation at particular selected point, but it takes time to edit each point.
Thank you,
Ruoli
Re: How to write predefined x nodes in constraints.xml file
Posted: Thu Nov 17, 2011 12:53 pm
by aymanh
Hi Ruoli,
Can you please post a short version of your .sto file to try it out in my environment? You could also use a pre-existing control constraints file and edit it in the excitation editor.
Best,
-Ayman
Re: How to write predefined x nodes in constraints.xml file
Posted: Thu Nov 17, 2011 2:06 pm
by rlw
Hi Ayman,
I have uploaded a short .sto file as an attachment (changed to .txt for uploading). I can not either save it in an existing control constraints file or the software just crashed.
I tried to edit in excitation editor, but it is kind of taking time to edit each point.
Re: How to write predefined x nodes in constraints.xml file
Posted: Thu Nov 17, 2011 3:03 pm
by aymanh
Hi,
The excitationEditor (from the Edit menu) doesn't directly edit .sto files, however the entry point from the forwardTool allows you to do that, so what I did was:
1. Load any model into the GUI.
2. Open Forward Tool and browse for your control.sto file (I removed excessive blank tabs beforehand) as a controls file.
3. Use pencil tool to edit the file.
4. Save the file as "control.xml".
Use the "Help" button for quick editing tips in the excitationEditor.
Hope this helps,
-Ayman
Re: How to write predefined x nodes in constraints.xml file
Posted: Fri Nov 18, 2011 6:40 am
by rlw
Hi Ayman,
What you suggested works!
Thank you,
Ruoli