How to perform an optimisation without the Graphical User Interface is shown on the example of the Bookshelf. For the setup of this model have a look at the tutorial Generative Design - Bookshelf.
The prepared optimisation scenario can be exported from MSC Apex Generative Design via right click on the Scenario and choosing the Export option.
For the export a job name and the export folder have to be chosen and the export unit system has to be selected.
In this folder all necessary files for the optimisation are saved - the STL-files as geometry input and the configuration file (.json) with all the optimisation information. The configuration file contains all information necessary for the algorithm to run through the optimisation and can be edited to change the optimisation parameters. Further information on the structure of the Configuration file can be found here.
To start the optimisation via command line a Windows PowerShell is needed. This PowerShell has to be started inside the folder. Therefore, the keys shift+right mouse button have to be used inside the Windows explorer. Another option is to start the PowerShell and then navigate to the optimisation folder.
After opening the PowerShell, the GD Eninge.bat-file has to be executed. Therefore, the right path to this file has to be chosen. To execute the optimisation the configuration file has to be selected. Behind the path the command ā-cā and the configuration file (name.json) have to be entered.
& 'C:\Program Files\MSC.Software\MSC Apex Generative Design\2022-002990\runGD_Engine.bat -c Bookshelf.json
With Enter the start of the optimisation is initialised.
In the following, the status of the optimisation is displayed in the PowerShell and can be tracked this way. The PowerShell needs to stay open until the optimisation has run through. By closing the PowerShell the optimisation is terminated.
For a trouble free view of the command line output activate the colour coding in your Power Shell. For instructions have a look here.
In the folder a new subfolder with a timestamp as name is created in which all output files are saved in.
When the optimisation is finished, the result files can be reimported into MSC Apex Generative Design to visualize and evaluate the results in the Post Processing. Therefore, choose File->Import Generative Design Results and select the result folder. Under the studies tab a new scenario with the imported files will be created. The results can be imported to an already existing Apex project or to a new blank one.
After this the Post Processing can be used as usual.
Add Comment