Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SDPA format in pyhon#2

yangbo116 started this conversation inGeneral
Discussion options

I use the SDPA python (https://sdpa-python.github.io/docs/usage/) version to generate a SDPA format as the Sparse Input Data File in user Manual, but I get the follow format:
3
1
2S
-4.8000000000000000e+01 +8.0000000000000000e+00 -2.0000000000000000e+01
0 1 1 1 +1.1000000000000000e+01
0 1 2 2 -2.3000000000000000e+01
1 1 1 1 -1.0000000000000000e+01
1 1 1 2 -4.0000000000000000e+00
2 1 2 2 -4.0000000000000000e+00
3 1 1 2 +8.0000000000000000e+00
3 1 2 2 +2.0000000000000000e+00
, which is not consistent with the results in user Manual:
"Example 1: mDim = 3, nBLOCK = 1, {2}"
3 = mDIM
1 = nBLOCK
2 = bLOCKsTRUCT
{48, -8, 20}
0 1 1 1 -11
0 1 2 2 23
1 1 1 1 10
1 1 1 2 4
2 1 2 2 -8
3 1 1 2 -8
3 1 2 2 -2
, at the m=2, 1 block, (2, 2): value -8, but in python,this position is -4. So, is anything wrong in python code?

You must be logged in to vote

Replies: 1 comment

Comment options

Jan 2025 edit: Since the sign conventions of the.dat-s read/write routines were not intuitive to the user, as of version 0.2.2, thefromsdpa routine is being deprecated in favor ofimportsdpa. It's accompanied byexportsdpa (which replaces the existingtosdpa routine in the original SDPAP code).

Upon both import and export, the new routines will automatically perform sign flipping (which is a consequence of the inverse relationship between SDPA and SeDuMi formats).

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@yangbo116@usamamuneeb

[8]ページ先頭

©2009-2025 Movatter.jp