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

add SolSavingEnvironment, halving pickle size #1503

Merged
merged 1 commit into from
Jul 14, 2020
Merged

add SolSavingEnvironment, halving pickle size #1503

merged 1 commit into from
Jul 14, 2020

Conversation

bqpd
Copy link
Contributor

@bqpd bqpd commented Jul 14, 2020

Per #1497

@pgkirsch this halves pickle size without removing any solution information. Between this and the compression I'd expect that 110MB file to drop to less than 10MB.

@bqpd
Copy link
Contributor Author

bqpd commented Jul 14, 2020

test models please

@bqpd bqpd merged commit e967b01 into master Jul 14, 2020
@bqpd bqpd deleted the solsavingenv branch July 14, 2020 11:47
@pgkirsch
Copy link
Contributor

@bqpd just curious: what do the "construction/solve attributes" allow you to do with an already-computed solution? Re-solve without needing the original model object?

@bqpd
Copy link
Contributor Author

bqpd commented Jul 14, 2020

The following constraint attributes are removed: ["mfm", "pmap", "bounded", "meq_bounded", "v_ss", "unsubbed", "varkeys"].

mfm: maps how monomials simplified during substitution so that sensitivities can be properly mapped back
pmap: maps how the constant term (if any) was taken to the <= 1 side and divided out
bounded: which variables were upper or lower bounded by this constraint at its creation
meq_bounded: which variables were conditionally upper or lower bounded through a monomial equality
v_ss: the individual variable sensitivities in each constraint
unsubbed: presubstitution polynomial representations of the constraint
varkeys: set of varkeys in the constraint

All of these except for v_ss are recreatable by initing a new constraint with the left, oper, and right of the saved version.

@pgkirsch
Copy link
Contributor

Ah awesome, thanks for the detailed explanation!

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.

None yet

2 participants