Issue With Syntax For BARON Solver

Hello I am having issues with using BARON to solve an optimization problem. Right now I am receiving errors about syntax errors concerning the use of scientific notation.

Below is the error I am receiving:
[ERROR]
line 32 offset 702
syntax error
context: 1 >>> 9.022e-06 <<<
[ERROR]
line 40 offset 830
syntax error
context: 1 >>> 577.67 <<<
[ERROR]
line 48 offset 952
syntax error
context: 1 >>> 4 <<<
[WARNING]
line 63 offset 1322
variable in = expression
context: param R_S := (1 - (1 - exp(-lambda_T*t)) * product {i in SENSORS} (1 - >>> exp(-lambda_S[i]*t))^(x[i]*sensor_set_size[i])); <<<
[WARNING]
line 66 offset 1489
variable in = expression
context: param R_v {j in WORKSTATIONS} := 1 - (1 - exp(-(lambda_H + lambda_N)*t))^(1 + >>> y[j]); <<<
Traceback (most recent call last):
File “c:\Users\dgoodma5\Desktop\AAMEN Project\Optimizer Code\BARON_Optimizer_V1.py”, line 83, in
ampl.eval(f"“”
File “amplpy/ampl.pyx”, line 356, in amplpy.ampl.AMPL.eval
File “amplpy/ampl.pyx”, line 709, in amplpy.ampl.AMPL.set_error_handler.ErrorHandlerWrapper.check
File “amplpy/ampl.pyx”, line 690, in amplpy.ampl.AMPL.set_error_handler.ErrorHandlerWrapper.error
File “amplpy/errorhandler.pxi”, line 43, in amplpy.ampl.ErrorHandler.error
amplpy.ampl.AMPLException: line 32 offset 702
syntax error
context: 1 >>> 9.022e-06 <<<

1 Like

Hello there,

Could you share the code? It’s hard to guess what’s wrong only with the error output

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.