Replies: 1 comment 6 replies
-
Hi Behrad :), Unfortunately I cannot reproduce your first error from the code you posted. From your code I assumed that you are referring to the first example in this notebook. When I run the code from this example replacing the original domain definition with your discrete input example the error i get is a different one This happens since Cheers |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear All,
I have been trying out one of the examples of DOE using DiscreteInput and I am encountering the following error:
"ValueError:
bounds
must specify both lower and upper limits for each decision variable."Here is my code:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
from bofire.data_models.constraints.api import (
NonlinearEqualityConstraint,
NonlinearInequalityConstraint,
LinearEqualityConstraint,
LinearInequalityConstraint,
InterpointEqualityConstraint,
)
from bofire.data_models.domain.api import Domain
from bofire.data_models.features.api import ContinuousInput, ContinuousOutput, DiscreteInput
from bofire.strategies.doe.design import find_local_max_ipopt
domain = Domain(
inputs = [
DiscreteInput(key="x1", values=[i for i in range(400, 850, 50)]),
DiscreteInput(key="x2", values=[0, 0.025, 0.05, 0.075, 0.1]),
DiscreteInput(key="x3", values=[1, 2, 3])
],
outputs = [ContinuousOutput(key="y")]
)
I tried to specify the bounds as well, but I encounter another error:
"ValidationError: 1 validation error for DiscreteInput
bounds
Extra inputs are not permitted [type=extra_forbidden, input_value=(400, 850), input_type=tuple]
For further information visit https://errors.pydantic.dev/2.8/v/extra_forbidden"
I would highly appreciate your help in this regard. Looking forward to hearing from you.
Thanks,
Behrad
Beta Was this translation helpful? Give feedback.
All reactions