-
Notifications
You must be signed in to change notification settings - Fork 258
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
solve problem with multi-threads #918
Conversation
2. solveFirstInterruptOthers 3. add copy model method 4. add copy model solution 5. add some Solution methods
Thanks for the PR @liangbug !
|
Appendix 1. from pyscipopt import Model
def main():
orig_scip = Model()
copy_scip = Model.copyModel(orig_scip)
new_scip = Model(sourceModel=orig_scip)
orig_scip_param_names = orig_scip.getParams().keys()
copy_scip_param_names = copy_scip.getParams().keys()
new_scip_param_names = new_scip.getParams().keys()
lost_params = sorted(list(set(orig_scip_param_names) - set(new_scip_param_names)))
print('The count of orig scip params:', len(orig_scip_param_names))
print('The count of copy scip params:', len(copy_scip_param_names))
print('The count of new scip params:', len(new_scip_param_names))
print('The lost of new scip params:', lost_params)
if __name__ == "__main__":
main()
|
Hey @liangbug! Last week, @Opt-Mucca, @mmghannam, and I discussed this PR and came to the following conclusions.
However, we understand the frustration with using What do you think of this, @liangbug? Does it sound reasonable? |
I understand yours concerns. |
2. model addOrigVarsConssObjectiveFrom 3. add some Solution methods
Hi @Opt-Mucca @Joao-Dionisio
|
Co-authored-by: João Dionísio <57299939+Joao-Dionisio@users.noreply.github.com>
Thank you for your contribution @liangbug!! We'll now work on adding some of your code to the examples, to show people how they can change the interface. |
I want to solve problem with multi-threads and different random seeds
So I added some methods including
The copyed model from init method argument sourceModel loses some scip components.
The new copy model method use full scip components.