Add contract component model, userspecified ts-attributes, unit-group fixes
Overview
Closes #838 (closed) #837 (closed) #839 (closed) #835 (closed)
New functionality
- contract and portfolio (1st iteration)
- '. ts' user specified ts attributes for energy-market objects (in general, including the existing core model)
Fixes
- for dtsm.unit-group not part of bind/evaluate
- gcc 12.1 and boost.geometry compile time issues, ref. https://github.com/boostorg/geometry/issues/1006 , shyft now have embedded draft solution for this issue in epsg_fast.h.
Compatibility, upgrades
We have added the .tsm as part of the base-classe in the energy-market model, but using boost serialization versioning to handle already stored core models. This means the core-model clients/servers will work with old stored models.
The if upgrading a core-model server, then all the clients must also be upgraded(server might present the clients with models with the new version, that they are not capable of understanding). There is however no need for explicit upgrade of already stored models.
Remaining work before merge
We think some, or all of the items should be in place before merge.
-
Add doxygen type of doc for the main c++ classes, use doxygen ///<for attribs etc. -
dstm. rebind ts: does it work on ts_maps, (added element to existing tests) -
py test/example/demo to illustrate ts-map -
dstm.evaluate for .tsm tested -
ensure to doc all new (ts) attributes with un-prefixed SI units? -
reconsider scalar/metadata related attributes, consider removing them and utilizing json attribute instead for such information. -
Introduce buyer,seller (as strings for now, representing the parties in the contract) -
.quantity ( instead of .volume), and defined to be W (J/s) ( the informational attributes might be used to indicate the original quantity unit, e.g. m3/s for gas delivery) -
.price defined to be Money/J (the price/unit -
Ensure .ts["user_specified"]is exposed on all relevant energy market types. -
dstm.tsm web-api, request/reply -
update web_api/stm/request_handler.cpp::get_proxy_attributes(..) to check for attributes of the form 'ts.something", and then use the object.tsm['something'] to check/address the time-series. -
extend the cpp/test/em_web_api.cpp to include the 'ts.profit' to the market request, also extend test-case to fill in some data for the em market attribute -
verify the response contains the values as pr. the test-setup, and update the reqression test result.
-
-
Ensure that win/lin binary serialization interop works(int64 kind of ensures this). Manual verify by using win vbox client, vs. lin, ensure ltm/stm models works, also for dstm. -
Verify bw.compat before merge by extra test on internal apps statkraft, e.g. test ltm model core model store, because ensuring this before merge saves us the time and the trouble if it turns out to not work for reasons not recovered in our test. E.g. using existing models (we have >1k of them, will it just work?)
Tasks for consideration in later merge request(s)
- Improved (more generic) python proxy wrapping of tsm series.
- Consider add .quantity_max, .quantity_min to represent effect constraints on quantity for physical contracts
- Handling of status: Currently two separate attributes; active and validation.
- Handling of actors: Add actors to model, then replace buyer/seller with refs to actors