Open makansij opened 2 years ago
@makansij I encounter a similar error message:
bad line 121 of /tmp/tmpk5vuidmv.pyomo.nl: 1 array([-10000.])
terminate called after throwing an instance of 'Ipopt::TNLP::INVALID_TNLP'
Ipopt 3.13.2: option_file_name=/tmp/tmpzywh121k_ipopt.opt
ERROR: Solver (ipopt) returned non-zero return code (-6)
This seems to be occuring because the model you use to initialize the CustomSet
class has components which are initialized to 1-D Numpy arrays instead of numeric type objects---and these components are carried through to the feasibility problem solved by PyROS to determine whether your IntersectionSet
instance represents an empty set. In particular, in your script, you are initializing a Param
component 'b_0'
with the function b_0_init
(in add_inputs
), defined through:
def b_0_init(m, s):
b_0 = np.array([[ 1.0e+04], [-1.0e+00], [-1.0e+00], [-1.0e+00], [ 9.9e+01], [ 9.9e+01]])
return b_0[s]
This function returns a 1-D Numpy array instead of a numerical value as b_0
is a 2-D Numpy array. Hence, each member of the Param
component will be initialized to a 1-D array instead of a float
-like value. Was there any particular reason you defined b_0
to be a 2-D array? Alternatively, you could return b_0[s, 0]
. If I do that, PyROS now appears to have successfully solved the problem and at a latter stage, raises the exception:
ValueError: No performance constraints identified for the postulated robust optimization problem.
Provided you have resolved your IntersectionSet
instance, you may want to check your model constraints.
I’m experimenting with intersection uncertainty sets, and I’ve run into a problem where:
The nominal point is in the intersection set
But PyROS implies that the intersection is empty when solving the
nlp
in line 1094 ofuncertainty_sets.py
in the pyros library.I’ve tried using a variety of solvers, and I’ve verified that
point_in_set
returnsTrue
when executed on the nominal point. Also, my problem is a general NLP, so the solvers that I’ve tried should be able to solve (IPOPT, COUENNE). The code is shown below.There is an error from the solver when I run with
tee=True
, however it doesn’t tell me much, and the solver runs successfully on other problems....
The minimal example shown below has a flag
MA_27_flag
to be able to toggle between different solvers. Is there another way to set up the intersection set that can get around this problem? Thanks.