ERROR WHEN CREATING XML FILE

Hello,
I am currently dealing with an error when creating xml files.
I have set an optimisation code in matlab which does many things in a single iteration. The code uses 6 parallel workers (system has 16 cores+16 logical). The optimisation code works fine but in some instances, xml file isnt created correctly and i get an error when solving my model.
ERROR: no element found at line 49154
ERROR: Error encountered in processing xml input file!
Taking a look in those instances I can see that the xml file looks like this:
instead of this which is okay
For some reason it doesnt create the full xml file.
I have set a code that waits till the size of xml file created doesnt change anymore but it seems that in these instances, the convertion to xml is stuck (more than 3 minutes).
I also tried to make a code that checks if xml is ready when the last line (49186) is created but still it didnt create the last line.
Anyone knows how ot deal with that ?
Answers
-
Hi @Pantelis_Myrio,
I'm sorry you are having trouble with the creation of these XML files.
How exactly are you creating these with MATLAB? Are you modifying the MDL then exporting the XML solver deck?
It looks like your MDL contains a full vehicle model with the Altair Driver model. Depending on how you are creating the solver deck, it may be erroring because you are trying to produce the deck for the Default Analysis instead of an event like a Double Lane Change. Can you confirm that the incomplete XMLs are from driven events?
Hope this helps!
Adam Reid
0 -
Hello Adam,
Yes I am modifying MDL's parts and then exporting it as xml. I change some basic values like camber angle.
The way i execute the command is like this:
conversionCommand = sprintf('%s %s %s MotionSolve', motionViewPath, mdlFile, xmlFile);
[statusConversion, cmdoutConversion] = system(conversionCommand);It works perfectly fine in most of the cases but in some of them (maybe after 3000 corectly executed) it breaks.
Yes, the incomplete xmls are supposed to include driven events including slalom course, which as i can see is defined in the incomplete xml.
I could provide you the xmls if you want me to.
0 -
Hi @Pantelis_Myrio,
When the xml error occurs, is it completely random or does it always occur during a specific event like the slalom?
How many different types of events are you running as part of this manual optimization?Have you tried manually making the xml file for the analysis that failed to write properly to see if it is possible? The set values may be causing an error that you can observe in the Message Window which is causing the printing issue.
It should be noted that the optimization of vehicle models can easily be completed using either in built in Optimizer or through the use of HyperStudy to maintain a consistent ecosystem for your analysis.
Hope this helps!Adam Reid
0