tulipaenergy / tulipaenergymodel.jl Goto Github PK
View Code? Open in Web Editor NEWAn energy system optimization model that is flexible, computationally efficient, and academically robust.
License: Apache License 2.0
An energy system optimization model that is flexible, computationally efficient, and academically robust.
License: Apache License 2.0
This file should have the pull request template.
Check https://github.com/abelsiqueira/PlaygroundWithGit.jl for example.
Lazy Loading is loading only the data needed for the current run, not ALL data.
This method is for saving RAM.
Compare output to expected output, i.e., test that the output of the solver is correct.
This file should describe how to setup the environment to develop the package. For instance, installing pre-commit.
Check https://github.com/abelsiqueira/PlaygroundWithGit.jl for example.
On August 16 we came up with different options to think about:
README should have important at-a-glance information for potential users, and some information for people that know what they want. A possible structure is as follows:
What are the rules for when to assign yourself an issue, when is something labeled as "in progress?"
Write a draft of this to see if others agree.
For instance, only run tests if .jl
files have changed.
For internal use, the issue templates are too constraining.
Epic is an example of issue that doesn't match what we want.
We don't want other people to be able to create epic issues (maybe that can be enforced?)
No response
Possibly add to a scripts
folder.
Check https://github.com/abelsiqueira/PlaygroundWithGit.jl, for instance.
For instance, check https://github.com/stevemao/github-issue-templates/tree/master/.github/ISSUE_TEMPLATE but much shorter.
Probably something for
It runs daily and it is failing. I did something similar here: abelsiqueira/ProbabilityThing.jl#1 and possibly something has to be enabled in the settings. Haven't checked yet.
Such as new issues being labeled "Todo" and issues moving to "In Progress" if someone is assigned or there is a Pull Request referencing it. And labeled "Done" when closed with a Pull request.
For instance, using https://bit.ly/cffinit.
EditorConfig is configured to use 4 spaces, but YAML and JSON files were created with 2 spaces.
Since the formatting of these files is not checked - only correctness (hopefully) - these are not enforced.
However, when using an editor, especially when "format on save" is enabled, the editor tries to force 4 spaces.
We should try to find a formatter/linter for yaml and json. Either way, we should fix the behaviour with one of two options:
Option 1:
.editorconfig
to use 2 spaces for yaml and jsonOption 2
The Badge on README is pointing to CI.yml, which does not exist anymore on main
.
The fix is to remove it and add new badges for Test, Lint, and Docs.
Check the action tab.
No response
No response
For consistency and also because it already is inside the workflows file.
Currently, it is being done manually. Instead, we should try to create a DataFrame and write to csv.
Define the model in sets, indices, constraints, variables, etc.
Epics Overview
1. ESDL round trip
2. Data structure
3. Model definition
4. Output comparison
Part of the README references "TulipaBulb.jl" which has since been changed to "TulipaEnergyModel." This should be updated.
None!
The current README.dev.md includes a contributing workflow without git commands. It would be handy, especially for beginners like us, to have the git commands also included there.
I propose to add the commands from the notes https://hackmd.io/l1XUZ2n-QfSIbRl74FWk6g.
Ensure compatibility between ESDL asset/flows attributes with the model formulation.
The strategy is to play with the map editor to understand how parameters are assigned to flows/assets in ESDL. Then, compare with formulation and see if something has to be changed either on the ESDL side or on the model side.
The linting is failing for the following files after the update in the spacing format of the YML files:
-ADDITION-REQUEST.yml
-BUG-REPORT.yml
-IMPROVEMENT-REQUEST.yml
1. Go to git bash
2. then run the command "pre-commit run -a"
3. The error message is shown in the Logs section.
prettier.................................................................Failed
- hook id: prettier
- files were modified by this hook
.github/ISSUE_TEMPLATE/ADDITION-REQUEST.yml
.github/ISSUE_TEMPLATE/BUG-REPORT.yml
.github/ISSUE_TEMPLATE/IMPROVEMENT-REQUEST.yml
No response
This would go on all new issues to help keep track of what still needs to be discussed.
Like a high-level TODO list, or a collection of user stories.
See Suvayu's email for the correct setup
This key is used by the TagBot and can be used by CompatHelper. It allows them to make commits, pull requests, etc., using a user's SSH key.
To generate use
pkg> activate --temp
pkg> add DocumenterTools
julia> using DocumenterTools
julia> DocumenterTools.genkeys(user="TulipaEnergy", repo="TulipaEnergyModel.jl")
Then follow the instructions.
None.
No response
We need an input describing what flows are free, and we chose to use GML.
Here is an example of GML file:
graph [
comment "This is a sample graph"
directed 1
id 42
label "Hello, I am a graph"
node [
id 1
label "node 1"
thisIsASampleAttribute 42
]
node [
id 2
label "node 2"
thisIsASampleAttribute 43
]
node [
id 3
label "node 3"
thisIsASampleAttribute 44
]
edge [
source 1
target 2
label "Edge from node 1 to node 2"
]
edge [
source 2
target 3
label "Edge from node 2 to node 3"
]
edge [
source 3
target 1
label "Edge from node 3 to node 1"
]
]
It looks like it doesn't support data to be attached to nodes and edges (@suvayu, do you know?). If that is the case, we might have to find something else.
@datejada, is there anything else apart from the profile that is attached to an edge?
Change the names to register the package in the future in Julia.
NA
No response
Dicts are
D = Dict(:a => 1, :b => 2)
and NamedTuples are
N = (a = 1, b = 2)
You can access named tuples via .
, like N.a
.
NamedTuples are like structures without name. They don't use strings and they are immutable, so they might be more efficient.
Also, it makes more sense, since they are parameters that won't be changed within the code.
We should publish the package ASAP so we can dibs the name.
Do it, quick!
We might start seeing responses from the "community."
We have to start dealing with version releases.
No response
The Benchmark workflow is supposed to run the benchmarks and comment the resources in the PR. However, it needs permissions that can't be granted if the PR is from a fork.
The "straightforward but not simple solution" would be to change our workflow entirely and use branches in the main repo instead of forks.
@suvayu also posted the idea below:
IMO this should be a bot, and a cron job. Bot to manually trigger it in a PR, and cron that checks performance regression, say, once a week.
Originally posted by @suvayu in #50 (comment)
@suvayu, do you know how to set that up, do you know if it works without permissions?
Maybe something like https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63 but on a smaller scale?
Originally posted by datejada August 22, 2023
I can foresee three data files in the model that need to be considered as inputs and outputs for the model; see Figure below.
Maybe we need more types of files; I'm not sure. In addition, the pre-processing and post-processing can be either in Julia or Python; these steps should be able to link the information in all the data sources with the optimization model.
I hope these comments and general overview help in the discussion for next week's meeting to talk about the design of the model.
Add to documentation
In VSCode (or similar) you can change your settings so that the Julia Formatter runs when you save. We should tell people to enable this in the README.dev.
This makes sure your code works in the Julia Formatter before running pre-commit, etc.
Add explicit permissions in the workflow files. The default will be changed to read and write by #39, so it is safer to be explicit.
All unspecified permissions are set to no access (https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token).
Add some code like
permissions:
contents: read
None that I can see.
No response
The Julia files don't follow the Julia Formatter definitions. One option to update them all is running the pre-commit hook and committing the changes in the files.
Go through the ESDL file and map ports to connections to create a graph in Julia.
The esdl ports link to a hash that later must be scanned to find the right connection.
Also, obtain the assets and flows data
Removed the following because this will happen before GML+CSV are created, i.e., before Julia is involved.
Possible implementation
We should have a function to create the model that directly receives the parameters, and another function that reads from the data. This will be useful for benchmarking as well.
Codecov integration is not complete. I believe it needs to be enabled at https://app.codecov.io by an owner.
Although I could do it, it might be interesting for someone from TNO to check it out.
Update the formulation such that the flow variable is from asset
There are at least changes in the following parts:
Currently, the model creates dictionaries to obtain the parameter values.
For instance,
p_variable_cost = Dict((row.a) => row.pVarCost for row in eachrow(assets_df))
This is needed because the model is indexed by the values of the sets. For instance,
A = assets_df.a
...
@variable(model, 0 <= v_float[A,...])
Instead, we can index via the numerical index of the set:
num_assets = length(assets_df.a)
A = 1:num_assets
...
p_variable_cost = assets_df.pVarCost
However, to do this, the parameters p_demand
and p_availability
would need some extra attention, since they are not, technically, 1-dimensional.
If it is possible to create this version, a comparison will help decide which strategy to follow.
We need to add the stable documentation of the README, as right now there is no file linked to this, and an error will occur in the pre-commit when not fixed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.