Comments (3)
Since I was the one bothered by this, I assigned it to myself.
There is a default Date formatter, but its output is rather long:
julia> 123456789123456 |> Dates.Nanosecond |> Dates.CompoundPeriod |> Dates.canonicalize
1 day, 10 hours, 17 minutes, 36 seconds, 789 milliseconds, 123 microseconds, 456 nanoseconds
I'd rather have something like:
1d 10h 17m 36s 789ms 123μs 456ns
I looked at the existing packages that output time in this format (TimerOutputs.jl and BenchmarkTools.jl), and they both implement their own formatters. We can do the same, it's not hard to write a formatter like this. The question is, should this be a part of Tulipa or a separate thing (e.g., a micropackage with just a few pretty formatting tools). It's not really a part of TulipaEnergyModel per se, and I can see other libraries like TulipaPlots using the formatting tools later.
Or maybe I missed something and there exists a nice time formatting library we can use?
@abelsiqueira @suvayu thoughts?
from tulipaenergymodel.jl.
Most Tulipa*
libraries will depend on TEM
. So I wouldn't bother creating a separate package, because then to use it easily you would need to register it as well.
from tulipaenergymodel.jl.
I'm in favour of not implementing anything new for this. Instead, maybe we change how we use the timing packages to benefit from their printing.
If that doesn't work, we can check with, for instance, TimerOutputs, to see if it makes sense to export their pretty printing function.
from tulipaenergymodel.jl.
Related Issues (20)
- Rename `rep_periods_data.id` to `rep_periods_data.rep_period` for consistency HOT 2
- Update documentation with max/min energy outgoing flow for assets
- Use the original assets and flows profiles table HOT 5
- run_scenario for connection or other convenience functions
- Move timing from run_scenario to EnergyProblem function
- Merge all profiles-* files into one
- EU benchmark files are too big, store somewhere else HOT 2
- Accept default of missing timeframe and partition tables
- Apply BestieTemplate.jl HOT 1
- Time creating dataframes et al. separately from reading CSV
- Split `profile_name` in the `profiles_table` HOT 3
- Create a meaningful year data for the Norse Case
- Create a site (web or new repo) for the whole pipeline documentation
- Define as input the `resolution` input data in the `rep_periods_data` from somewhere in the pipeline
- Test `TimeStruct.jl` package to handle the flexible time resolution in the model
- Write down and review the formulation including different levels of detail HOT 2
- [BUG] - Change aggregation function for the max/min energy outgoing flow for assets
- Add remote url fix to readme.dev
- Fix readme.dev to our fork workflow HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tulipaenergymodel.jl.