Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Recent changes to the ets_fiberalloc package,
in reverse chronological order:

yet unreleased:
https://pfs-jira.naoj.org/jira/browse/FIBERALLOC-61
(Allow perturbation of target observation cost)

- v3.6:
adjust to cobraOps 2.0.6
- simpler bench creation
- new parameter "fiducialsAvoidDistance"
(no JIRA issue, since this is a temporary measure and will be
replaced in the future)

- v3.5:
https://pfs-jira.naoj.org/jira/browse/FIBERALLOC-59
(add support for cobraOps parameter "brokenCobrasMargin")
Expand Down
8 changes: 8 additions & 0 deletions ets_fiber_assigner/netflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def buildProblem(bench, targets, tpos, classdict, tvisit, vis_cost=None,
cobraSafetyMargin=0.,
cobraFeatureFlags=None,
brokenCobrasMargin=0.,
targetCostOffset=None,
fiducialsAvoidDistance=0):
"""Build the ILP problem for a given observation task

Expand Down Expand Up @@ -406,10 +407,15 @@ def buildProblem(bench, targets, tpos, classdict, tvisit, vis_cost=None,
This is given as a fraction of "brokenCobrasRmax", i.e. the maximum
patrol area radius of any broken Cobra.
Useful values should be in the range [0;1].
targetCostOffset: np.ndarray(float), same size as "targets"
per-target perturbation of the overall cost function, if this target
is observed. Used to break degeneracies and guarantee reproducible
assignments.
fiducialsAvoidDistance: float, optional
The distance in mm to use to avoid collisions with the fiducial
fibers. Default is 0, which means that targets will not be
invalidated based on their distance to the fiducials.

Returns
=======
LPProblem : the ILP problem object
Expand Down Expand Up @@ -539,6 +545,8 @@ def buildProblem(bench, targets, tpos, classdict, tvisit, vis_cost=None,
f = prob.addVar(makeName("STC_T", TC, tgt.ID), tmp, 1)
T_i[tidx].append(f)
STC_o[TC].append(f)
if targetCostOffset is not None and targetCostOffset[tidx] != 0:
prob.cost += f*targetCostOffset[tidx]
if len(STC_o[TC]) == 1: # freshly created
# Science Target class node to sink
f = prob.addVar(makeName("STC_sink", TC), 0, None)
Expand Down