Automated process optimization
A free GitHub account is required to access the program code in this repository; send us your GitHub username.
You can use Scale-up Suite 2 to optimize process design parameters headless and on the fly.
You will need Python installed to run the scripts provided here. That’s because they’re Python scripts :) You will see that these could be written in many other languages and Python is just a good example.
A typical example
- Download the Dynochem model v3_simple_batch_tilde.xlsx and dc6_auto_opt.py and save them in the same folder.
- Run the python script and watch the yield optimize. On completion, an optimization report will appear in a CSV file in the same folder.
- These results can be sent to the lab as conditions for the next round of experiments.
- The model will also be updated with the optimized scenario and its datasheet added.
- You can watch a movie preview here.
Listen for a CSV file containing data, automatically fit UA, then run an automated process design (optimization)
- Make a folder for this activity on your desktop, called e.g. Opt Tj
- Tip: Depending on your browser, you may find that right-clicking on the links below is a faster way to save the files
- Save this template model fit-UA.xlsx there. Make sure it is called ‘fit-UA.xlsx’
- Save this script which will fit UA to a fresh solvent test / heat-up / cool-down / cleaning / mock batch run and then run an Optimization calculation to find the Jacket Temperature that heats the contents to 80 C in 30 minutes. UA_main_dc6_auto_fit_opt.py. Make sure the saved file extension is ‘.py’
- Save this script which will listen in the folder for when new data arrive in CSV format UA_observer.py. Make sure the saved file extension is ‘.py’
- Pip install these modules if you don’t have them already: watchdog
- Close any files that you have open in Excel
- Make a subfolder in your main folder (e.g. Opt Tj) called ‘data’
- Run UA_Observer.py by double-clicking the file; a terminal window will open and report that monitoring has started
- Download this example CSV file and after saving it locally, move it into the data folder scen3.csv.
- The data will be used automatically to create a new model and fit UA to the new data. Then the model will be used automatically to find the optimum jacket temperature for heating, as defined above. The model will be saved afterwards. Exciting, eh?
- That’s it. You’re done. Open the new model in Simulator if you’d like to check the results. The first scenario will show the model fits the new data you added and the third scenario will show the required jacket temperature for the heat-up process.
Listen for an xlsx file containing data, automatically fit filtration characteristics, then run an automated process scale-up (optimization)
- Make a folder for this activity, called e.g. Opt Filtration
- Tip: Depending on your browser, you may find that right-clicking on the links below is a faster way to save the files
- Save this template model Cake_Filtration_Toolbox.xlsm there. Make sure it is called ‘Cake_Filtration_Toolbox.xlsm’
- Save this script which will fit medium resistance, cake resistance and compressibility index to a fresh standard set of three pocket filter experiments and then run an Optimization calculation to find the Pressure Difference that leads to a cake formation time of 60 minutes in the kilo lab filter_main_dc6_filter_fit_opt.py. Make sure the saved file extension is ‘.py’
- Save this script which will listen in the folder for when new data arrive (in xlsx format) filter_observer.py. Make sure the saved file extension is ‘.py’
- Pip install these modules if you don’t have them already: watchdog
- Close any files that you have open in Excel
- Make a subfolder in your main folder (e.g. Opt Filtration) called ‘data’
- Run filter_Observer.py by double-clicking the file; a terminal window will open and report that monitoring has started
- Download this example xlsx file and after saving it locally, move it into the data folder Product2_Raw_data.xlsx.
- The data will be used to create a new model and fit filtration parameters to the new data. Then the model will be used automatically to find the optimum pressure difference for filtration, as defined above. The model will be saved afterwards.
- That’s it. You’re done. Open the new model in Simulator if you’d like to check the results. The first three scenarios will show the model fits the new data you added and the final scenario will show the required pressure difference for the scaled-up filtration process.
Listen for a CSV file containing data, automatically refit reaction kinetic parameters, then automatically find optimized reaction conditions
- Make a folder for this activity, called e.g. Opt Reactions
- Tip: Depending on your browser, you may find that right-clicking on the links below is a faster way to save the files
- Save this template model rxl_starting.rxm there. Make sure it is called ‘rxl_starting.rxm’
- Save this script which will refit kinetic parameters including a fresh data set just obtained from the lab and then find the best settings of three factors (temperature, equivalents and reaction time) to maximize reaction yield rxl_auto_fit_opt.py. Make sure the saved file extension is ‘.py’
- Save this script which will listen in the folder for when new data arrive (in csv format) rxl_observer.py. Make sure the saved file extension is ‘.py’
- Pip install these modules if you don’t have them already: watchdog, xlmtodict
- Close any files that you have open in Reaction Lab
- Make a subfolder in your main folder (e.g. Opt Reactions) called ‘data’
- Run rxl_observer.py by double-clicking the file; a terminal window will open and report that monitoring has started
- Download this example csv file rxldata.csv. Make sure the saved file extension is ‘.csv’
- To demo the autonomous workflow, move the csv file into the data folder. You will see that the data will be used automatically to create a new model and then refit kinetic parameters including the fresh data set. Then, those parameters will be used to find optimized reaction conditions, as defined above. The model will be saved afterwards.
- That’s it. You’re done. Open the new model in Reaction Lab and then Simulator if you’d like to check the results. The first four scenarios will show the model fits the (old and) new data you added and the final scenario will show the optimum conditions to maximize yield.