Skip to content

Two ways to define objectives, should be one #68

Description

@explodingdinosaurs

Currently, there are two way to define objectives:

  1. Through association of an objective with a port, then adding it to the ObjectiveSet.objective_list attribute
  2. Through setting port.objective

When optimiser.optimise is called, it calls optimiser.build_model_and_objective, which calls optimiser._build_objective which collects all the objectives from the ObjectiveSet as well as scans across all ports in the graph to see if there's objectives in port.objective.

Maybe there is a reason for this but @explodingdinosaurs and @mikejturner couldn't find one. We will need to have a conversation with @annaskobeleva and probably @joshvote to make a decision about what to do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions