-
Notifications
You must be signed in to change notification settings - Fork 32
CEP 30 - Improvements to Cyclus Supply-Demand Framework #396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: source
Are you sure you want to change the base?
Changes from 1 commit
4daeb4f
e6efa48
35dd452
9906da6
0d579b7
9fc71a6
1cba85c
0dc341f
997b0eb
a24c543
e7c2bec
8bf7695
e28ffbd
351a938
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| CEP 30 - Improvements to Cyclus Supply-Demand Framework | ||
| ********************************************************* | ||
|
|
||
| :CEP: 30 | ||
| :Title: Improvements to Cyclus Supply-Demand Framework | ||
| :Last-Modified: 2024-12-27 | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| :Author: Dean Krueger <[email protected]> | ||
| :BDFP: Paul Wilson | ||
| :Status: Draft | ||
| :Type: Standards Track | ||
| :Created: 2024-11-26 | ||
| :Cyclus-Version: 1.6.0 | ||
|
|
||
|
|
||
| Abstract | ||
| ======== | ||
|
|
||
| The DRE of the current version of CYCLUS handles the cost of materials being traded in a | ||
| way which was always intended to be expanded upon as discussed in the Supply-Demand | ||
| Framework section of CEP 18. This CEP references moving the Supply-Demand from being | ||
| requester based to being supplier based, with more considerations for economics. As a part | ||
| of moving the DRE in that direction, it is necessary to add economic-based elements to | ||
| the definitions of the Region, Institution, and Facility in such a way as to allow them | ||
| to interact with each other economically. The proposal for doing so is to add sub-classes | ||
| to each which will act as a method of communicating economic information between layers | ||
| of the simulation. | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Copyright: | ||
| ============================== | ||
|
|
||
| CEP 30 will be placed in the public domain as required by CEP 1. | ||
|
|
||
| Specification: | ||
| ============================ | ||
|
|
||
| The new feature being proposed is a subclass for each of the Region, Institution, and | ||
| Facility classes which will allow the communication of economic data between each layer | ||
| of the CYCLUS simulation. The main feature of the subclass will be a hash table | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| (enabled by std::unordered_map) which contains pairs of keys (std::string) and values | ||
| (doubles), as well as functions to set and get elements in the table. | ||
|
|
||
| Motivation: | ||
| ================== | ||
|
|
||
| The major motivation for this new feature is that currently when a Facility tries to access | ||
| information about its Institution, it can only reliably use the public API of the Institution | ||
| base class. That is, it is dangerous to try to access something that is only in the public | ||
| API of a derived Institution archetype because it may not always be there. Because of the | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| interdependence of imagined economic functionality on the Facility-Institution-Region | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| relationship (a facility’s cost may be impacted by its own capital cost, as well as its | ||
| parent institution’s minimum acceptable rate of return and the regional tax rate, for | ||
| instance), the ability of a facility to access information about its parent Agents is | ||
| crucial. | ||
|
|
||
| Rationale: | ||
| =========================== | ||
|
|
||
| It was decided to make the overall feature a subclass is to keep it in line with the class-subclass | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| structure of other CYCLUS functionality, such as the Facility Institution Region - Agent structure. | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The reasons for choosing a hash table over another data structure are that they allow quick and | ||
| easy expansion both by developers and within the simulation itself, as well as search, insert, and | ||
| delete operations being ostensibly O(1). | ||
|
|
||
| During the public vetting stage of CEP 30’s lifecycle two alternative ideas for implementing this | ||
| behavior were proposed. The first was to use the code injection functionality of cycpp files to | ||
| add economic information to archetypes themselves at the beginning of simulations. This was tested, | ||
dean-krueger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| but it was discovered that there were problems accessing the information of parent agents, and it | ||
| was determined that this approach would be some combination of too cumbersome and less certain to | ||
| work. The second idea was to implement some sort of registry, similar to how Microsoft Windows | ||
|
||
| (and other operating systems) handle some of their internal operations, but this was deemed to be | ||
| too much of a bloat hazard, as registries can become very complicated very quickly. | ||
|
|
||
| Backwards Compatibility: | ||
| =========================== | ||
|
|
||
| Since this feature is proposed as a subclass of each of the three agent subclasses, it will be | ||
| optional to use, and therefore entirely possible to completely ignore it. This means it should | ||
| require no work to ensure backwards compatibility with older versions of CYCLUS. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This title is vague and all-encompassing.
This CEP should be targeted at sharing financial parameters between the R-I-F hierarchy, and the title should be clear at this more narrow scope.