<jupyter_start><jupyter_text>simple LP  : CVXOPT- Cvxopt는 modeling 함수를 통해 symbolic form도 구현 가능합니다- 간단한 LP 예시- 작성자 : 차지원 (<EMAIL>)- 발표자료 : https://www.slideshare.net/JiwonCha3/pyconkr-2019-164237844![ex_screenshot](../image/matrix_lp.png)<jupyter_code># Source : https://cvxopt.org/examples/tutorial/lp.html
# 수정 : 차지원 (<EMAIL>)

from cvxopt import matrix, solvers
G = matrix([ [-1.0, -1.0, 0.0, 1.0], 
            [1.0, -1.0, -1.0, -2.0] ])
h = matrix([ 1.0, -2.0, 0.0, 4.0 ])
c = matrix([ 2.0, 1.0 ])
sol=solvers.lp(c=c,G=G,h=h)

print(sol['x'])
#[ 5.00e-01]
#[ 1.50e+00]<jupyter_output>pcost       dcost       gap    pres   dres   k/t
 0:  2.6471e+00 -7.0588e-01  2e+01  8e-01  2e+00  1e+00
 1:  3.0726e+00  2.8437e+00  1e+00  1e-01  2e-01  3e-01
 2:  2.4891e+00  2.4808e+00  1e-01  1e-02  2e-02  5e-02
 3:  2.4999e+00  2.4998e+00  1e-03  1e-04  2e-04  5e-04
 4:  2.5000e+00  2.5000e+00  1e-05  1e-06  2e-06  5e-06
 5:  2.5000e+00  2.5000e+00  1e-07  1e-08  2e-08  5e-08
Optimal solution found.
[ 5.00e-01]
[ 1.50e+00]
{'fraction_non_alphanumeric': 0.19117647058823528, 'fraction_numerical': 0.2196078431372549, 'mean_word_length': 2.5950704225352115, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '649751', 'license': 'MIT', 'n_tokens_mistral': 685, 'n_tokens_neox': 604, 'n_words': 105, 'path': 'problem1_simpleLP/cvxopt_simple.ipynb', 'repo_name': 'ryuncha/python_lpqp_optimization_tutorial', 'size': '1040'}