Skip to content
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

Alamopy gaussian rbf basis function evaluate surrogate issue #1223

Closed
Clint321836 opened this issue Jul 14, 2023 · 1 comment · Fixed by #1226
Closed

Alamopy gaussian rbf basis function evaluate surrogate issue #1223

Clint321836 opened this issue Jul 14, 2023 · 1 comment · Fixed by #1226
Assignees
Labels
bug Something isn't working core Issues dealing with core modeling components Priority:Normal Normal Priority Issue or PR surrogates wontfix This will not be worked on

Comments

@Clint321836
Copy link

I'm getting a syntax error in the alamopy file at line 1224 when trying to create the lambda for the surrogate model. Looking through the traceback, it looks like the lambda is attempting to read a string from alamo and convert it to python syntax.

It works fine for all of the other basis functions I've tried, but for the grbf Alamo returns surrogate expressions like this:

'Y1 == - 482267.41297314106486738 * exp ( -1. * sum of distances from initial data point 32 )'

It looks like the function has no idea what to do with the sum of distances from initial data point 32 variable and needs a way to parse these and generate the lambda.

Here's a simpler sample code that produces the same issue of not being able to parse the alamo output:
alamopy_grbf_error.txt

@andrewlee94
Copy link
Member

@Clint321836 Yes, the existing lambda function would not know how to handle that, and off hand I do not know of an easy way to do that as the current ALAMOpy interface has no idea about distances from initial points. We also do not have a lot of time available to looking into supporting this within the IDAES team right now. Unless you have the time and can think of a way to support these, then I think that for now ALAMOpy will not support radial basis functions and that configuration option should be removed.

For radial basis functions, I would suggest looking at Pysmo instead, as it already supports these: https://idaes-pse.readthedocs.io/en/stable/explanations/modeling_extensions/surrogate/api/pysmo/index.html?highlight=pysmo

@andrewlee94 andrewlee94 added bug Something isn't working core Issues dealing with core modeling components surrogates labels Jul 14, 2023
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Jul 20, 2023
@andrewlee94 andrewlee94 added the wontfix This will not be worked on label Jul 21, 2023
@andrewlee94 andrewlee94 linked a pull request Jul 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Issues dealing with core modeling components Priority:Normal Normal Priority Issue or PR surrogates wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants