-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use absl's locale-independent conversion functions in XPRESS MPSolver interface #4382
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
Conversation
Use absl's locale-independent conversion functions in XPRESS interface
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hi @lperron it seems that this fix was neither shipped into v9.11 nor v9.12 since it was merged into google:main. Do you plan to ship it in the next version ? |
|
Can you check on the v99bugfix branch ?
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mar. 3 juin 2025, 14:01, Florian Omnès ***@***.***> a
écrit :
… *flomnes* left a comment (google/or-tools#4382)
<#4382 (comment)>
Hi @lperron <https://github.com/lperron> it seems that this fix was
neither shipped into v9.11 nor v9.12 since it was merged into google:main.
Do you plan to ship it in the next version ?
—
Reply to this email directly, view it on GitHub
<#4382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3LL4MD5NJVJT3J3RV33BWFBRAVCNFSM6AAAAAB6PSGVUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMZUHEYTAMRYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Unfortunately the |
|
And in main ? Sorry, I cannot check myself.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mar. 3 juin 2025 à 16:00, Florian Omnès ***@***.***> a
écrit :
… *flomnes* left a comment (google/or-tools#4382)
<#4382 (comment)>
Can you check on the v99bugfix branch ?
Unfortunately the ScopedLocale class is still defined & used in branch
v99bugfix (commit 6275619
<6275619>
).
—
Reply to this email directly, view it on GitHub
<#4382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3I7YEP5SBAKNKSASED3BWS6FAVCNFSM6AAAAAB6PSGVUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMZVGM4TONBVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, oddly enough |
|
OK, we will re-apply the patch .
Thanks for flagging.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mar. 3 juin 2025 à 16:32, Florian Omnès ***@***.***> a
écrit :
… *flomnes* left a comment (google/or-tools#4382)
<#4382 (comment)>
And in main ? Sorry, I cannot check myself.
Yes, oddly enough ScopedLocale can also be found in google:main (commit
a90d9d9
<a90d9d9>
)
—
Reply to this email directly, view it on GitHub
<#4382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3JYSTQZOLFTT7SHDKD3BWWZVAVCNFSM6AAAAAB6PSGVUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMZVGYYDCNZSGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You're welcome ! |
* Also add few fix from rte-france/or-tools fork (`main` branch)
|
@flomnes can you check 1aad3b5 note: I've used https://raw.githubusercontent.com/rte-france/or-tools/refs/heads/main/ortools/linear_solver/xpress_interface.cc as source of truth + |
The proposed commit reverts the removal of |
* Also add few fix from rte-france/or-tools fork (`main` branch)
Granted ! Update the patch 573927e |
* Also add few fix from rte-france/or-tools fork (`main` branch)
* Also add few fix from rte-france/or-tools fork (`main` branch)
|
@flommes should we backport #4667 to |
Using such functions as
std::stoi,std::stod, etc. caused us a lot of trouble because these functions are locale dependent, as illustrated belowAt first, we thought that using
ScopedLocalewould allow us to temporarily use the "C" locale, but this approach has multiple problemsstd::stodwhen the locale is being changed throughstd::setlocaleis undefined behavior source.const char*pointers easily become dangling or invalid without the caller knowingWe ran into an issue where the locale wasn't properly restored after using
MPSolver::XpressInterface. So we decided to use absl's locale independent functions to perform that task.