ahorsky 0 Report post Posted June 30 I’m new to CAESES and currently working on a fully parametric ship hull model. I’ve set up the model and now I want to run a Latin Hypercube Sampling (LHS) to generate a set of design variants and then run a Surrogate-Based Global Optimization (SBGO) using resistance (as a feature), seakeeping (evaluated externally in Maxsurf Motion), and stability. For each design, I need to export the geometry as an IGES file so I can use it in Maxsurf Motion. As far as I understand, there is no direct software connection between CAESES and Maxsurf Motion. My question is: how do I export the designs automatically? Should I create an export feature, or write a script? Or is there another recommended approach for this? I’ve tried to run a simple LHS DoE using an export script, but it didn’t work. I don’t fully understand how the export process should be linked to the DoE run. Any guidance on the correct way to set this up would be greatly appreciated hull2.fsc Share this post Link to post Share on other sites
Simon Hauschulz 0 Report post Posted June 30 Hi! There is a setting called "Design Pre/Postprocessing" for every design engine, e.g. LHS, SBGO, where you can define the export with <objectName>.exportIges(<filename>) for every design in your DoE. Cheers, Simon Share this post Link to post Share on other sites
ahorsky 0 Report post Posted July 11 Hi Simon, Thanks again for your earlier advice about using Design Pre/Postprocessing for geometry export — that worked well and I’ve now successfully exported the hull variants from CAESES and performed motion analysis in Maxsurf Motion. Here’s where I am now: ✅ I ran an LHS DoE in CAESES to generate an initial set of designs. ✅ I analyzed each design externally in Maxsurf to calculate motions and then computed a Seakeeping Index (SKI) in Python. ✅ I would now like to: Import these SKI results back into CAESES. Run an SBGO, where at each generation the optimization pauses: Exports the new hull geometry. Computes motions in Maxsurf externally. Calculates SKI in Python. Brings the SKI back into CAESES as an objective to minimize. I’m trying to set this up via the Software Connection feature, but I’m unsure of the recommended workflow for this external coupling: Can CAESES directly use a Python script to pull SKI values as a response during SBGO? Is there a way to make the optimization pause for external motion analysis and resume automatically? Should I use Postprocessing Commands in the design engine or a Custom Software Connector? I’d appreciate your guidance or any example workflows that show how to integrate external evaluations like this into the SBGO loop. Best regards, Avishai Horsky LHS, where every generation is stops i do the motion analysis and then it continues aftre the input of the SKI Share this post Link to post Share on other sites
Mr. Claus Abt 14 Report post Posted July 14 Hi Avishai, Simon is travelling this week. You could set up a feature that uses a COM interface to run Maxsurf. Then you could use the software connector to start your Python analysis. If you define an output of Maxsurf as an input to the software connector and take the output of the analysis as an objective, all objects should know of their respective suppliers and wait until they are available. Then you can simply run an optimization. Hope that helps Claus Share this post Link to post Share on other sites
ahorsky 0 Report post Posted July 14 Hi Claus, Thank you for your response. I tried creating a COM interface with Maxsurf Motion similar to what’s available for Maxsurf Resistance. However, from what I understand, Maxsurf Motion does not currently support a COM interface. Could you confirm if that’s correct, or am I mistaken? At the moment, I’ve set up a software connection in CAESES with Python. This workflow exports the hull geometry as an IGES file, which I then use in Maxsurf Motion to run the seakeeping analysis (this step typically takes 5–10 minutes per design). Maxsurf Motion outputs the results to an Excel file, which Python uses to calculate the Seakeeping Index (SKI). Python then creates a CSV file containing the single SKI value, and CAESES reads this value back from the CSV. The issue I’m facing is that CAESES does not “wait” for Python to finish processing the Maxsurf results and calculating the SKI. As a result, it fills in the SKI objective with a NaN value. If I manually pause the run after each design is created, add the Maxsurf output to the design folder, and then resume, Python has enough time to compute the SKI and CAESES successfully reads the results. I also tried adding a time delay in Python to hold the calculation until the Maxsurf output is available, but CAESES seems to ignore this and continues running without waiting for the results. I hope my explanation so far is clear. I’m now looking for a way to: Delay CAESES from calling Python until I’ve added the Maxsurf output file. Or allow CAESES to generate x number of designs without calculating the SKI, and then calculate SKI for all of them in a batch process. Do you have any suggestions on how this could be implemented? As a workaround for LHS sampling, I can let the run complete and then add the Maxsurf outputs afterward. When I re-evaluate the designs in CAESES, it recognizes and incorporates the SKI correctly. However, I’m unsure if this approach would also work during SBGO, where iterative evaluations are required. I’ve attached my setup files for your reference. Best regards, simple_test.cdbc Single_SKI.py Single_SKI_timeout.py Share this post Link to post Share on other sites
Mr. Claus Abt 14 Report post Posted July 15 If you set up the script to run your analysis such that it will not return before the result file is written, everything should be fine. You could stay in the script within a loop, checking for the creation of the output file. Best Regards, Claus Share this post Link to post Share on other sites