Hello,
I have installed pyomo on my linux machine. However, when I
try to run even the simplest optimization program I am given the
following error: "invalid literal for int() with base 10: 'c' "
I
have attempted to look up the error and found many links for errors
associated with Python. I have attempted to run the diet1.py with
diet.dat test case available from the pyomo documentation. I have tried
with both abstract and concrete models and the errors are the same. I
don't believe that it is a solver problem as I have attempted to use the
server option for the solver and have gotten the same result. An image
of the normal output is attached below.
Thank you,
Matt
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
WARNING: converting to the 'pyomo solve' subcommand
Traceback (most recent call last):
File "/Users/ganghe/anaconda/bin/pyomo", line 11, in <module>
sys.exit(main())
File "/Users/ganghe/anaconda/lib/python3.5/site-packages/pyomo/scripting/pyomo_main.py", line 71, in main
retval = ret[0].func(*ret)
File "/Users/ganghe/anaconda/lib/python3.5/site-packages/pyomo/scripting/plugins/solve.py", line 199, in solve_exec
val = pyomo.scripting.util.get_config_values(_options.model_or_config_file)
File "/Users/ganghe/anaconda/lib/python3.5/site-packages/pyomo/scripting/util.py", line 1004, in get_config_values
raise IOError("ERROR: Unexpected configuration file '%s'" % filename)
OSError: ERROR: Unexpected configuration file 'solve'
Not sure what caused this problem?
$ pyomo solve diet.py diet.dat --solver=glpk
[ 0.00] Setting up Pyomo environment
[ 0.00] Applying Pyomo preprocessing actions
[ 0.00] Creating model
[ 0.02] Applying solver
invalid literal for int() with base 10: 'c'
[ 0.03] Pyomo Finished
ERROR: Unexpected exception while running model:
Error parsing solution data file, line 1
# With "-c"
$ pyomo -c solve diet.py diet.dat --solver=glpk
WARNING: converting to the 'pyomo solve' subcommand
Traceback (most recent call last):
File "/Users/ganghe/anaconda/bin/pyomo", line 11, in <module>
sys.exit(main())
File "/Users/ganghe/anaconda/lib/python3.5/site-packages/pyomo/scripting/pyomo_main.py", line 71, in main
retval = ret[0].func(*ret)
File "/Users/ganghe/anaconda/lib/python3.5/site-packages/pyomo/scripting/plugins/solve.py", line 199, in solve_exec
val = pyomo.scripting.util.get_config_values(_options.model_or_config_file)
File "/Users/ganghe/anaconda/lib/python3.5/site-packages/pyomo/scripting/util.py", line 1004, in get_config_values
raise IOError("ERROR: Unexpected configuration file '%s'" % filename)
OSError: ERROR: Unexpected configuration file 'solve'
$ pyomo -c solve diet.py diet.dat --solver=glpk
pyomo solve -c --solver=glpk test_pyomo.py
[ 0.00] Setting up Pyomo environment
[ 0.00] Applying Pyomo preprocessing actions
[ 0.00] Creating model
[ 0.00] Applying solver
invalid literal for int() with base 10: 'c'
[ 0.01] Pyomo Finished
ERROR: Unexpected exception (ValueError) while running model test_pyomo.py:
Error parsing solution data file, line 1
Traceback (most recent call last):
File "/usr/bin/pyomo", line 9, in <module>
load_entry_point('Pyomo==4.3.11329', 'console_scripts', 'pyomo')()
File "/usr/lib/python3.5/site-packages/pyomo/scripting/pyomo_main.py", line 83, in main
retval = _options.func(_options, _unparsed)
File "/usr/lib/python3.5/site-packages/pyomo/scripting/plugins/solve.py", line 214, in solve_exec
name='pyomo solve')
File "/usr/lib/python3.5/site-packages/pyutilib/workflow/task.py", line 109, in __call__
self.execute()
File "/usr/lib/python3.5/site-packages/pyomo/util/_task.py", line 160, in execute
retval = self._fn(**self._kwds)
File "/usr/lib/python3.5/site-packages/pyomo/scripting/util.py", line 931, in run_command
retval = command(options=options, parser=parser)
File "/usr/lib/python3.5/site-packages/pyomo/scripting/pyomo_command.py", line 349, in run_pyomo
instance=model_data.instance)
File "/usr/lib/python3.5/site-packages/pyutilib/workflow/task.py", line 109, in __call__
self.execute()
File "/usr/lib/python3.5/site-packages/pyomo/util/_task.py", line 163, in execute
retval = self._fn(data, **self._kwds)
File "/usr/lib/python3.5/site-packages/pyomo/scripting/util.py", line 588, in apply_optimizer
results = solver_mngr.solve(instance, opt=opt, **keywords)
File "/usr/lib/python3.5/site-packages/pyomo/opt/parallel/async_solver.py", line 33, in solve
return self.execute(*args, **kwds)
File "/usr/lib/python3.5/site-packages/pyomo/opt/parallel/manager.py", line 106, in execute
ah = self.queue(*args, **kwds)
File "/usr/lib/python3.5/site-packages/pyomo/opt/parallel/manager.py", line 121, in queue
return self._perform_queue(ah, *args, **kwds)
File "/usr/lib/python3.5/site-packages/pyomo/opt/parallel/local.py", line 58, in _perform_queue
results = opt.solve(*args, **kwds)
File "/usr/lib/python3.5/site-packages/pyomo/opt/base/solvers.py", line 580, in solve
result = self._postsolve()
File "/usr/lib/python3.5/site-packages/pyomo/opt/solver/shellcmd.py", line 267, in _postsolve
results = self.process_output(self._rc)
File "/usr/lib/python3.5/site-packages/pyomo/opt/solver/shellcmd.py", line 329, in process_output
self.process_soln_file(results)
File "/usr/lib/python3.5/site-packages/pyomo/solvers/plugins/solvers/GLPK.py", line 455, in process_soln_file
raise ValueError(msg)