Skip to content

Commit

Permalink
Change of limitation on minsearch.
Browse files Browse the repository at this point in the history
- If the constraint formula is not satisfied, out_of_range = true.
  • Loading branch information
H-Iwamoto-research committed Oct 17, 2023
1 parent b59a903 commit 1d268cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/py2dmat/algorithm/min_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def _f_calc(x_list: np.ndarray, extra_data: bool = False) -> float:
)
)
out_of_range = True

if not self.runner.limitation.judge(x_list):
msg ="Warning: "
msg+="Variables do not satisfy the constraint formula.\n"
for index in range(dimension):
msg+="{} = {}\n".format(label_list[index],x_list[index])
print(msg,end="")
out_of_range = True

for index in range(dimension):
x_list[index] /= unit_list[index]
Expand Down

0 comments on commit 1d268cf

Please sign in to comment.