能够
from docplex.mp.model import Model
mdl = Model(name='example')
z1=2;
z2=3;
mdl.x1 = mdl.continuous_var(0,10,name='x1')
mdl.x2 = mdl.continuous_var(0,10,name='x2')
mdl.x3 = mdl.continuous_var(0,10,name='x3')
mdl.x4 = mdl.continuous_var(0,10,name='x4')
mdl.x5 = mdl.continuous_var(0,10,name='x5')
mdl.add_constraint(mdl.x2+mdl.x3==z1*(1-mdl.x1), 'A')
mdl.add_constraint(mdl.x4+mdl.x5==z2*(1-mdl.x1), 'B')
mdl.solve()
print(mdl.x1.solution_value);
print(mdl.x2.solution_value);
print(mdl.x3.solution_value);
print(mdl.x4.solution_value);
print(mdl.x5.solution_value);