Comments (5)
I mean option A). There should be a simplistic model with just slack buses and one component in the centre, everything set up, so that it's quick to create and optimise the model and to evaluate the results.
from oemof-solph.
@lensum and I discussed this in a chat. He had some points in favour of lp file diff tests:
- With I/O tests, the pipeline needs a lot longer to run bc we need to actually solve the problems.
- Writing tests for complex behaviour (min up-/downtime) can be tedious (though I believe this is also the case with the current pipeline.
And here are some counter-arguments against the points I posted here earlier.
Please understand this as a "devils advocate" situation, I'm not strictly against the change :)
Pyomo dependency
I have little experience with that, but does pyomo regularly change the structure of LP-files they generate? I would expect this to be limited to major version changes, if any.Also, to bring a benefit wrt other backends:
The backends would always need to provide the functionality to formulate the exact same problem the "basic" solph backend (which ever it might be in the future) does. For all other backends, the tests need to be rewritten either way (for example backends that focus on stochastic optimization and thus create different constraints and results).
I think it also depends on how the different backends are incorporated into solph. If each backend gets its own repository, I (personally) don't see a reason to switch from the tried-and-tested LP-based tests to results-based-tests.
Hard to understand
I recently learned that some people actually prefer to read and compare LP files than result dataframes, so this might be personal preference (though I'm with you on this one).Multiple parts of the code
I think both possible solutions (LP-based tests and solution-based tests) will test stuff from multiple parts of the code. Where the LP-file probably directly shows me the involved components in the constraints (making it easy to see if its a harmless thing like a renaming of a component, for example), the solution-based tests might make it a little harder to find the reason for the test failure. (It could very well be that this opinion/experience is influenced by bad testing styles ;) ).Changing constraint formulation without failing tests
True, this can be a benefit. But if I'm not mistaken it also requires the tests to cover every edge-case. Or to put it differently: it would be possible to create situations where a test would pass, but some configuration of the constraint behaves differently than previously, due to the constraint-changes. (Might be due to bad tests).
from oemof-solph.
* With I/O tests, the pipeline needs a lot longer to run bc we need to actually solve the problems.
Is it possible to limit the testing pipeline to merges into dev
(and changes on dev
)? This way, devs could still run the tests locally, push changes to other branches without causing unnecessary computations and everything that makes it into dev
would be tested. Or is this how it's implemented right now?
from oemof-solph.
Is it possible to limit the testing pipeline to merges into
dev
(and changes ondev
)? This way, devs could still run the tests locally, push changes to other branches without causing unnecessary computations and everything that makes it intodev
would be tested. Or is this how it's implemented right now?
I think this does not improve the situation too much, as most of the changes are at branches with an existing request to merge into dev. Maybe, it's more fruitful to have a model stub tailored in a way that solving is fast.
from oemof-solph.
most of the changes are at branches with an existing request to merge into dev.
True, I didn't think of this circumstance.
Maybe, it's more fruitful to have a model stub tailored in a way that solving is fast.
Sorry, I don't understand what you mean with "model stub" here. Do you mean that
a) the optimization problems in the testing pipeline should be designed so that they solve fast (possibly using pytext-fixtures), or
b) there should be a separate Model
class for testing purposes that somehow solves faster, or
c) something else I can't think of?
from oemof-solph.
Related Issues (20)
- Allow multiple outputs at OffsetConverter HOT 4
- Results processing should check if optimisation succeeded
- Using `custom_attributes` of `Source` and `Sink` classes fails HOT 1
- Add periodic values to invest relation of generic storage
- Implement alternative back-end to Pyomo (e.g. linopy) HOT 9
- How to define a switching Converter ? HOT 7
- The `OffsetConverter` is broken in the new implementation HOT 4
- The basic_example.py is broken HOT 1
- Aggregate all sorts of tools configurations in `pyproject.toml` HOT 1
- The online documentation could have a more appealing/modern look
- Investment limit AttributeError if storage investment only HOT 1
- Remove cellular model stub HOT 2
- Refine timeindex
- running oemof_installation_test on venv HOT 6
- Formulation of "gradient limit" needs rework
- Compare `master` with `dev` in the bagde "commits since ..." HOT 2
- N+1 timesteps regarded in storage_costs for GenericStorage HOT 1
- Update Indexing of Pandas Objects to the New Version HOT 1
- NonConvex initial_status=1 does not work as assumed HOT 1
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 oemof-solph.