TAGGED: ansys-simulink, design-optimization, matlab, optislang, senstivity
-
-
May 15, 2023 at 11:05 pm
viv_vid
SubscriberI am trying to connect OptiSLang to my Simulink model. I have successfully established the connection. I now want to perform sensitivity analysis on this model and I have three parameters on which I want to run parameter sweeps for 300 samples in OptiSLang. I took help from one of the examples used and made the matlab script as seen:
Here F_o_fy, F_o_fx and F_o_fz are the parameters. Now when I click Run for the sensitivity analysis I am getting this following error message :
So OptiSLang does changes the value of each parameters according to the range set but then goes back to the default initial value. Why is this happening? Is there something that needs to be changed in the MATLAB script?
Any help would be appreciated.
Thankyou.
Vivek
-
May 16, 2023 at 8:17 am
Veit Bayer
SubscriberHi viv_vid,
The concept of these lines is as follows: if the script is called by MATLAB outside optiSLang, the variable OSL_REGULAR_EXECUTION does not exist. If you do a Test Run when editing the Matlab node, it is set to false, in a regular run of the workflow it is set to true by optiSLang. This way, you have on the one hand default values to run the script outside optiSLang context, on the other hand you avoid that design values generated by optiSLang are overwritten. Your code looks good so far.
Still, the values of F_o_f* are overwritten. I suspect it happens elsewhere in the code. Outside the code snippet we see above, you shouldn't touch these variables. Please check your code for this.
/Veit
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Errors about integrate executable into ANSYS Workbench using ACT
- Local Sensitivity and Sensitivities: what difference?
- How many designs are generated while performing optimization using Optislang with NLPQL?
- Optislang workbench add-in
- Parameter relationships for Optimization
- Design of Experiment points: Design Exploration
- ANSYS Optislang
- DOE all design points give the same results as the first calculation
- DesignXplorer vs optiSLang for Workbench CFD Optimization
- Parametric study: Batch mode
-
5204
-
3281
-
2459
-
1308
-
970
© 2023 Copyright ANSYS, Inc. All rights reserved.