API of NLPmodels cons(nlp, x) can't work #49
Replies: 4 comments 1 reply
-
Hi @Hongy-Wang, can you share more of the problem? Your error comes from this lines: which means that the call to the underlying AMPL function had an error. Without more information of what you are trying to run and what is working vs what is not, we can't help you debug easily. |
Beta Was this translation helpful? Give feedback.
-
@Hongy-Wang AmplNLWriter is not one of our packages. It's not necessary for your example. Are you able to share |
Beta Was this translation helpful? Give feedback.
-
Thank tou for your reply @dpo! I am sorry, i am not sure if or not i can share the files with you, but before that, i can share the reading results with you
```
Problem name: hda_scaled.nl
All variables: ████████████████████ 1176 All constraints: ████████████████████ 1172 free: ████████████⋅⋅⋅⋅⋅⋅⋅⋅ 691 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ██⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 113 lower: █⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 2 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: █⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 low/upp: ███████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 372 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ████████████████████ 1169 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 99.70% sparsity) 2052 linear: ███████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 359 nonlinear: ██████████████⋅⋅⋅⋅⋅⋅ 813
nnzj: ( 99.70% sparsity) 4079
Problem name: tsa.nl All variables: ████████████████████ 2815 All constraints: ████████████████████ 2815 free: ████████████████⋅⋅⋅⋅ 2204 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: █⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 5 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: █⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: █████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 605 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ████████████████████ 2815 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 nnzh: ( 98.22% sparsity) 70375 linear: ████████████⋅⋅⋅⋅⋅⋅⋅⋅ 1595 nonlinear: █████████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 1220 nnzj: ( 99.76% sparsity) 19132
```
在 2024-06-05 21:10:25,"Dominique" ***@***.***> 写道:
@Hongy-Wang AmplNLWriter is not one of our packages. It's not necessary for your example.
Are you able to share hda_scaled.mod/hda_scaled.dat so we can try it out? If not, what is the value of nlp.meta.ncon?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@Hongy-Wang Your message above is quite hard to read and I'm not able to format it. Would you please edit it so the model statistics are between triple backticks and appear as they do in the terminal? Thank you. |
Beta Was this translation helpful? Give feedback.
-
When i try to get the constraints value at some point x, the following error was reported. AmplException("Error while evaluating constraints") How should i deal with it? What mistake i do? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions