Comments (3)
I'm not keen to add all this extra core syntax math - the helper functions are there to extend the math in a way that remains modular. Although they are wordy, they are relatively explicit (they can certainly be given better names!). "<<" and ">>" are creating a whole new syntax, and "[-1]" and "[0]" overlap with existing slicing syntax which will make them difficult to parse.
You're right that those two helpers are specific to ordered sets and we have no way of controlling for someone applying them in the wrong context. We could have some check in the helpers for either user-defined metadata (ordered: true
) or it being a datetime/numeric dtype. As a user, you could feasibly ensure the ordering of your sets by reorganising the input data dimensions, we just need to provide an API for that.
from calliope.
Defining ordered sets in theory should also allow us to perform more complicated summations with conditionals (like "sum new capacity installed for all investsteps lower than this one").
I've yet to land on an approach that is easy to read for these cases, though...
from calliope.
I'm fine with not implementing the extra syntax :)
However, a personal wish is to use ordered sets for numeric comparisons. Kind of: sum over this dimension while it is lower than [some position]. Would be a god send for pathways math.
I will close this issue as "not planned", and rewrite another with your feedback in mind.
from calliope.
Related Issues (20)
- Feature: allow for complete math overrides HOT 5
- debug functionality missing in Model.__init__ HOT 1
- Potential desync in model configuration at the model.py level HOT 1
- Outdated 'dimensions' formalism in some parts of the docs
- .inf not parsed correctly in math syntax HOT 2
- Incorrect net_cdf serialisation for top level attributes HOT 4
- Unwanted spillover and overwriting across cost dimensions HOT 3
- model.backend.update_parameter does not propagate in all equations HOT 4
- Data duplication in the Calliope backend HOT 1
- Ensuring data and model configuration remain in sync at all times (model, backend, backendmath) HOT 11
- Mispaced math documentation guide in pre-defined math HOT 1
- Improving the handling of invalid backends HOT 1
- Invalid configuration showing for un-activated modes due to schema defaults HOT 4
- Account for python's optimize mode to enable faster model building HOT 2
- Use of native sparse array support in xarray / pandas / netCDF HOT 6
- Default parameter duplication HOT 9
- Isolate postprocessing data creation methods HOT 1
- AttrDict fails when uniting regular dicts HOT 4
- Defining parameters and additional dimensions in `model.yaml`
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 calliope.