4

pyomo を介して iopt オプションを設定する際に問題が発生しています。

一部のオプションについては、単純に使用できます

executable = os.getcwd()+'/Ipopt/Ipopt/build/bin/ipopt.exe'
opt = SolverFactory("ipopt", executable=executable,solver_io='nl')
opt.options['nlp_scaling_method'] = 'user-scaling'

これはうまくいきます。「fixed_variable_treat」のオプションを設定しようとすると、次のようになります。

opt.options['fixed_variable_treatment'] = 'make_parameter'

次のエラーが表示されます。

ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 599, solve
        Solver (asl) returned non-zero return code (1)
ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 604, solve
        Solver log:
        Unknown keyword "fixed_variable_treatment"

これは、Python ですべてのオプションを設定できないためだと思いますか?

これを克服するための助けや方法は大歓迎です。ありがとう

4

1 に答える 1