Welcome to the TRNSYS Users Forum.
The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.
Some tips for success on using the forum:
- Follow the Forum Rules posted in Forum Administration.
- There are categories for different types of topics and questions. Post your topic or question into the proper category.
- Before posting a topic or question search the existing topics (and the TRNSYS Users listserv archive or Post archive) to see if a similar topic or question has already been answered.
- Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
- State the version of TRNSYS and which add-ons your are using.
- Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
- Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
- Moderators may edit your post for clarity or move your topic to a more appropriate category.
Dear David:
When GenOpt runs your input file it makes a copy, modifies the copy with the new values of the optimization variables for the current run and then runs the modified input file but from a different location. If there are paths to external files in the input and they are specified relative to the location of the input file then you can get this kind of error.
What I would recommend you do is to go through your project and make sure that you have specified the path to each external file (weather data, building, performance data, etc.) starting with the drive letter. In other words, use:
c:\Trnsys18\MyProjects\ProjectX\weather\myWeatherFile.tm2
instead of
.\weather\myWeatherFile.tm2
There are a few other things that can cause this error so if the above does not solve the problem, please add a comment to this thread.
kind regards,
David
@davidbradley
Dear David:
I have tried as you said, but the problem is still unsolved.
The dialog of the external file is shown in the PNG attached.
I have also deleted all the output files (I don't know if it's necessary because they were named like '***.out2' for parametric study).
Do you know why? Is that because my project is too large?
@zhangxiaohan
Xiaohan,
The TRNSYS files associated with each run that GenOpt initiates are located in folders that you'll find at:
.\Trnsys18\Optimization\GenOpt\Simulation\tmp-genopt-run-X
If you look at the *.log (or the *.lst if you want a little more information and are brave!) then you will find a bit more information about the error. If that doesn't lead you to a solution, please direct message me and I'll have you email me some files so that I can take a closer look.
kind regards,
David
@zhangxiaohan
Xiaohan,
Another possibility occurred to me. The issue might be in the TRNOpt settings. I attached a screenshot of my settings for reference. Here are a few things to verify.
1. I have found that neither TRNSYS nor GenOpt like to be installed in the \Program Files\ directory.
2. The version of GenOpt matters. Please refer to the TRNOpt documentation in .\TrnsysXX\Tess Models\Documentation\11-OptimizationLibrary-TRNOPTv18.pdf if you haven't already.
Also if you haven't already done so, try running the example project. If settings are indeed the problem then the example shouldn't work either. This is just a way to try and narrow down the cause of the issue.
kind regards,
David