You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support combining different diversity measures and constraining them (#189)
* Add support for combining different diversity measures and constrainting them.
* Fix formatting
---------
Co-authored-by: Jip J. Dekker <[email protected]>
f"array [1..{len(prevsol)}] of var {varprevtype}: dist_{varname} :: output = [{distfun}({varname}, {varprevname}[sol,{dotdots}]) | sol in 1..{len(prevsol)}];\n"
191
191
)
192
192
193
+
# Add minimum distance to the diversity distance measurement in the model code
194
+
ifvar["lb"] !="infinity":
195
+
inst.add_string(
196
+
f"constraint forall(sol in 1..{len(prevsol)})( dist_{varname}[sol] >= {var['lb']});"
197
+
)
198
+
199
+
# Add maximum distance to the diversity distance measurement in the model code
200
+
ifvar["ub"] !="infinity":
201
+
inst.add_string(
202
+
f"constraint forall(sol in 1..{len(prevsol)})( dist_{varname}[sol] <= {var['ub']});"
0 commit comments