CCSI-Toolset / FOQUS

FOQUS: Framework for Optimization and Quantification of Uncertainty and Surrogates
https://foqus.readthedocs.io
Other
46 stars 54 forks source link

Sorting Fails with an Operation #312

Closed CSRussell2319 closed 5 years ago

CSRussell2319 commented 5 years ago

If I attempt to sort flowsheet results with two conditions it will fail with an error for every operation except "NOT". I have tested the rules individually and they run without error. Below is the picture of the error. I have included screenshots of the error and a report of the output from my test.

sort_error_1 sort_error_2 AutoErrLog_fs.txt

eslickj commented 5 years ago

This one is user error. It's partly my fault though for writing this thing using reverse Polish notation. The and pops two things off the stack and put one back on. In the example screen shot, and is in the middle. There is only one thing to on the stack at that point.

One thing we could do to get around this is finish removing this filter system and use calculated columns to do it instead. You could pick a calculated column that evaluates to True or False. True is in False is out. The syntax for calculated columns is just regular Python so it would be even more flexible and easier to understand.

eslickj commented 5 years ago

Change the way this works with PR #353. That may get refined a bit, but I don't think we'll go back to this way of filtering.