Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric colums with values >= 1e7 make solution FALSE #30

Closed
edwindj opened this issue Nov 27, 2020 · 4 comments
Closed

Numeric colums with values >= 1e7 make solution FALSE #30

edwindj opened this issue Nov 27, 2020 · 4 comments
Labels

Comments

@edwindj
Copy link
Member

edwindj commented Nov 27, 2020

rules <- validator( profit == turnover - cost
                  , cost >= 0.6 * turnover
                  , turnover >= 0
                  )

data <- data.frame(profit = 1e10, cost = 200, turnover = 300)
el <- locate_errors(data, rules)
el$errors
##     profit cost turnover
##[1,]   TRUE TRUE     TRUE

el$status
# 2 

This large a value makes the MIP problem unsolveable.
Thanks to Garðar Páll Gíslason for reporting!
edwindj added a commit that referenced this issue Nov 27, 2020
…s were flagged erroneous.

Thanks to Garðar Páll Gíslason
@edwindj
Copy link
Member Author

edwindj commented Nov 27, 2020

This issue is fixed in github. Issue will be closed when on CRAN.

edwindj added a commit that referenced this issue Nov 27, 2020
@edwindj edwindj added the bug label Nov 27, 2020
@edwindj
Copy link
Member Author

edwindj commented Nov 27, 2020

New behavior is:

rules <- validator( profit == turnover - cost
                  , cost >= 0.6 * turnover
                  , turnover >= 0
                  )

data <- data.frame(profit = 1e10, cost = 200, turnover = 300)
el <- locate_errors(data, rules)

el$errors
##     profit cost turnover
##[1,]   TRUE FALSE     FALSE

el$status
# 0

@edwindj
Copy link
Member Author

edwindj commented Jan 29, 2021

Is fixed

@edwindj edwindj closed this as completed Jan 29, 2021
@edwindj
Copy link
Member Author

edwindj commented Jan 29, 2021

(it generates a warning though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant