[AutoTool | PrimitiveOffer] remove priority_bias in favor of cost_at
This commit is contained in:
parent
0edd735a11
commit
8712398990
4 changed files with 85 additions and 45 deletions
|
|
@ -350,11 +350,16 @@ class Solver:
|
|||
)
|
||||
|
||||
def offer_key(offer: PrimitiveOffer) -> tuple[Any, ...]:
|
||||
cost_key: tuple[str, float | int]
|
||||
if callable(offer.cost):
|
||||
cost_key = ('callable', id(offer.cost))
|
||||
else:
|
||||
cost_key = ('factor', round(float(offer.cost), 9))
|
||||
return (
|
||||
type(offer).__qualname__,
|
||||
offer.in_ptype,
|
||||
offer.out_ptype,
|
||||
round(float(offer.priority_bias), 9),
|
||||
cost_key,
|
||||
tuple(round(float(value), 9) for value in offer.parameter_domain),
|
||||
getattr(offer, 'ccw', None),
|
||||
id(offer.endpoint_planner),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue