Skip to content

Conversation

odow
Copy link
Member

@odow odow commented Nov 2, 2023

Closes #2335

cc @WalterMadelim

I need to think about what to do for vector constraints.

@blegat
Copy link
Member

blegat commented Nov 2, 2023

Maybe we can print it after the set, like in PSDCone() (name). It is consistent with the (1) you have at the end of the equations in LaTeX's environment equation or align. Then we could do the same for scalar constraint for consistency but then the names are not aligned but at least the start of the functions are aligned

This would give

   ScalarQuadraticFunction{Float64}-in-LessThan{Float64}
     0.0 + 1.0 y - 1.0 z + 2.0 x² <= 1.0 (c5)

    VectorOfVariables-in-SecondOrderCone
     ┌ ┐
     │x│
     │y│
     └ ┘ in SecondOrderCone(2) (c3)

@odow
Copy link
Member Author

odow commented Nov 2, 2023

That's a reasonable solution. Thoughts, @WalterMadelim?

@WalterMadelim
Copy link

WalterMadelim commented Nov 2, 2023

Good morning, @odow. I think it’s also pretty to print at the end of a line after a constraint. It’s consistent with paper publications. And it seems to save the space of a line on screen for those Vector constraints.

We don’t worry about whether the name is easily seen or not, as long as it’s printed. We can use ctrl+f to search the name we want to inspect, e.g., in an Julia REPL, in Vscode.

@odow
Copy link
Member Author

odow commented Nov 2, 2023

Updated

@odow odow merged commit 75249a8 into master Nov 3, 2023
@odow odow deleted the od/add-printing-for-name branch November 3, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Print a constraint with Name

3 participants