Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow relative file paths in ddcks #199

Open
ahobeost opened this issue Jul 24, 2024 · 1 comment
Open

Allow relative file paths in ddcks #199

ahobeost opened this issue Jul 24, 2024 · 1 comment

Comments

@ahobeost
Copy link
Contributor

As a user, I would like to use the provided profiles (weather, demand, etc.) close to the ddcks that read them. At the moment, the path in the ddck can only be absolute or relative to the final .dck location.

It would be great, if pytrnsys could take the path relative to the ddck and adjust it to be relative to the final .dck location.

Example:

  • structure
    ddck/weather/weather_reader.ddck
    ddck/weather/weather_profile.csv
    results/simulation.dck
  • relative path in weather_reader.ddck
    assign weather_profile.csv :Unit
  • output in simulation.dck
    assign ../ddck/weather/weather_profile.csv weather_readerUnit
@ahobeost
Copy link
Contributor Author

After some further investigation, this issue is less severe as first thought.
In the .ddck one can use PATH$ to make pytrnsys use the absolute path of the ddck.

assign PATH$/weather_profile.csv :Unit

will become:
assign c:\path-to-ddck\weather_profile.csv weather_readerUnit

However, the original idea of getting paths relative to the .dck is currently not implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant