question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to define (or simulate) binary variables?
Can I add a constraint that x^2=x?
Does x always have to be strictly positive? Is there an approximation?
Can the “positive constants” be 0?

My motivating usage is that at least one of two constraints over variables must hold (whichever is best for the objective). I can work the “binary” variables into the constraints and require that their sum >= 1.

Here is another example: image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
adishavitcommented, Feb 10, 2020

Thanks for all your help!

1reaction
1ozturkbecommented, Feb 10, 2020

@adishavit sorry to disappoint. But I do think that cvxpy or JuMP are more suited to address these problems, and the syntax is not so different from GPkit! Best of luck, and unless you have further questions I will close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Binary Variable: Definition, Examples - Statistics How To
A binary variable is a variable with only two values. For example: ... Although binary variables are commonly used in statistics (i.e. for...
Read more >
Binary data - Wikipedia
Binary variables​​ A binary variable is a random variable of binary type, meaning with two possible values. Independent and identically distributed (i.i.d.)  ......
Read more >
What is Binary Variables? - Tutorialspoint
A binary variable has only two states such as 0 or 1, where 0 defines that the variable is absent, and 1 defines...
Read more >
Econometrics - Binary Variables and Categorical ... - YouTube
This video will introduce the concept of binary variables (also known as dummy variables or indicator variables) and categorical variables.
Read more >
Creating Binary Variables - Q Wiki
Binary variables are variables which only take two values. For example, Male or Female, True or False and Yes or No. While many...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found