from scipy.optimize import linprog
# Cost coefficients
c_transport = [4, 3, 6, 5, 2, 5, 3, 4, 7, 6, 4, 3]  
A_transport = [  # Coefficients for constraints (Supply + Demand)
    [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],  # W1 supply
    [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0],  # W2 supply
    [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],  # W3 supply
    [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],  # S1 demand
    [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0],  # S2 demand
    [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0],  # S3 demand
    [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1],  # S4 demand
]
b_transport = [250, 300, 400, 200, 200, 250, 300]  # Supply & Demand constraints
bounds_transport = [(0, None)] * 12  # Non-negativity
res_transport = linprog(
    c_transport, 
    A_ub = A_transport[:3], 
    b_ub = b_transport[:3], 
    A_eq = A_transport[3:], 
    b_eq = b_transport[3:], 
    bounds = bounds_transport, 
    method='highs')
res_transport        message: Optimization terminated successfully. (HiGHS Status 7: Optimal)
        success: True
         status: 0
            fun: 2850.0
              x: [ 5.000e+01  2.000e+02  0.000e+00  0.000e+00  1.500e+02
                   0.000e+00  1.500e+02  0.000e+00  0.000e+00  0.000e+00
                   1.000e+02  3.000e+02]
            nit: 6
          lower:  residual: [ 5.000e+01  2.000e+02  0.000e+00  0.000e+00
                              1.500e+02  0.000e+00  1.500e+02  0.000e+00
                              0.000e+00  0.000e+00  1.000e+02  3.000e+02]
                 marginals: [ 0.000e+00  0.000e+00  1.000e+00  1.000e+00
                              0.000e+00  4.000e+00  0.000e+00  2.000e+00
                              4.000e+00  4.000e+00  0.000e+00  0.000e+00]
          upper:  residual: [       inf        inf        inf        inf
                                    inf        inf        inf        inf
                                    inf        inf        inf        inf]
                 marginals: [ 0.000e+00  0.000e+00  0.000e+00  0.000e+00
                              0.000e+00  0.000e+00  0.000e+00  0.000e+00
                              0.000e+00  0.000e+00  0.000e+00  0.000e+00]
          eqlin:  residual: [ 0.000e+00  0.000e+00  0.000e+00  0.000e+00]
                 marginals: [ 4.000e+00  3.000e+00  5.000e+00  4.000e+00]
        ineqlin:  residual: [ 0.000e+00  0.000e+00  0.000e+00]
                 marginals: [-0.000e+00 -2.000e+00 -1.000e+00]
 mip_node_count: 0
 mip_dual_bound: 0.0
        mip_gap: 0.0