Is enumerator "MIP_NODES" currently working with ampls?

Hi!
I tried to use the following code line:

Current_node=self.getValue(ampls.Value.MIP_NODES).integer

But it didn’t work, reporting “Specified value unknown”.
I looked at some examples with similar code lines using as enumerator RUNTIME, ITERATIONS, etc. So, I searched the command list (Index — ampl::ampls-api 0.1 documentation) and after found MIP_NODES I thought that it may work. Please, let me know if there is another name for that enumerator, or it is still in development, or if I am using it wrong.
Thanks in advance

Hi Johnatan,

indeed there was a glitch in the Python version of ampls that was making that enumeration unusable.
On version 0.1.3, that is about to be released, you can do:

nnodes=self.get_value(ampls.Value.MIP_NODES)

Also, we will update the documentation shortly, in the meantime please refer to the examples in ampls-api/python/examples at master · ampl/ampls-api · GitHub.
And of course write to us here!

1 Like