-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updates to compact modeling logic #96
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This simplifies the use of coek intrinsics in cases where expressions result in double values, which we can directly evaluate.
This API mimics the API of smoek. We'll see if we keep this, but it seems to make sense.
... to avoid overloading with other coek functions.
1. Removing void* references to Var/Param reference types 2. Using shared pointer references instead, to ensure proper memory mangement. 3. MANY follow-on changes were required to implement this change. 4. A key change is the reversion of IndexVector to std::vector<int>. The simple memory management used in IndexVector is not sufficient to handle the potential for dynamic alloction/decallocation of IndexVectors. NOTE: These changes will likely incur a performance penalty in coek (especialy #4). But the earlier code design did not work properly when using mapped variables and parameters.
An integer value needs to be coerced correctly.
Using a base class to avoid cross-includes between the API and AST directories.
1. Reworking build logic to default build without spack. 2. "Fixing" iterator logic in pybind11 variables. This is still broken, since this doesn't work for multi-dimensional variable arrays.
This mimics the logic used for add_variable
1. Include name and fixed values when expanding variables 2. Various API extensions 3. Always store variable_map,variable_array, parameter_map and parameter_array objects on a Model object. 4. Added missing Model::add_parameter methods 5. Many extensions to pybind11 to capture compact models.
1. Adding missing data() functions 2. Fixed walker errors with DataRefTerms 3. Added tests for data() logic
Adding a few tests, but not enough
Now support the use of SequenceContexts
NOTE: This requires changing the Model object, so const-ness was removed from associated printing methods.
IndexSequence iterates over the IndexParameters associated with a ConcreteSet. Hence, this provides a more generic iterator concept than ExpressionSequence.
1. Fixing compact walker. 2. Updating tests
1. Extending pycoek to setup data/param/var data with SequenceContext objects 2. Enable expand() logic for Parameter's
1. Exposing coek::DataPortal within pycoek 2. Enabling initialization of ParameterMap with a dictionary. Note: There's also a preliminary hook for DataMap, but that's not working yet.
1. Fixing typename in indexed_container 2. Fixing logic associated with expansion of var/obj/con components
1. Fixing initialization of parameter values 2. Fixing bugs in compact LP writer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes a bunch of updates to coek to extend the API of map and array logic, and to fix issues with the compact expression logic.
Note that a major memory management bug was identified and resolved. However, this likely will result in a runtime degradation b.c. of frequent generation of small vectors.
This also includes various updates to poek that expose more functionality in coek, especially related to the initialization of compact expressions.