jckantor/ND-Pyomo-Cookbook

The example Path Planning for a Simple Car doesn't seem to work. 

zqNiu opened this issue · 0 comments

zqNiu commented

When I tried to run Path Planning for a Simple Car, it failed. I received that massage.


ValueError Traceback (most recent call last)
Input In [2], in <cell line: 76>()
74 # transform and solve
75 TransformationFactory('dae.finite_difference').apply_to(m, wrt=m.t, nfe=30)
---> 76 SolverFactory('ipopt').solve(m).write()

File D:\python_procedure\lib\site-packages\pyomo\opt\base\solvers.py:627, in OptSolver.solve(self, *args, **kwds)
625 else:
626 if self._load_solutions:
--> 627 _model.solutions.load_from(
628 result,
629 select=self._select_index,
630 default_variable_value=self._default_variable_value)
631 result._smap_id = None
632 result.solution.clear()

File C:\python_procedure\lib\site-packages\pyomo\core\base\PyomoModel.py:226, in ModelSolutions.load_from(self, results, allow_consistent_values_for_fixed_vars, comparison_tolerance_for_fixed_vars, ignore_invalid_labels, id, delete_symbol_map, clear, default_variable_value, select, ignore_fixed_vars)
222 logger.warning(
223 "Loading a SolverResults object with "
224 "an 'aborted' status, but containing a solution")
225 else:
--> 226 raise ValueError("Cannot load a SolverResults object "
227 "with bad status: %s"
228 % str(results.solver.status))
229 if clear:
230 #
231 # Clear the solutions, but not the symbol map
232 #
233 self.clear(clear_symbol_maps=False)

ValueError: Cannot load a SolverResults object with bad status: error