Skip to content

Commit

Permalink
Use two constraints in example problem (#688)
Browse files Browse the repository at this point in the history
* Use vararg problem constructor in README.md example

* add second example with vector of constraints

* Update README.md
  • Loading branch information
ericphanson authored May 23, 2024
1 parent ffa49cc commit fdaf900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ x = Variable(n)

# The problem is to minimize ||Ax - b||^2 subject to x >= 0
# This can be done by: minimize(objective, constraints)
problem = minimize(sumsquares(A * x - b), [x >= 0])
problem = minimize(sumsquares(A * x - b), [x >= 0, x <= 1])

# Solve the problem by calling solve!
solve!(problem, SCS.Optimizer)
Expand Down

0 comments on commit fdaf900

Please sign in to comment.