For solving a model in the standard form, you don’t need a special syntax but you do need to know slack/surplus variables to interpret the solution. Here is how I would solve a LP in the standard form.
using JuMP, Clp
C =[-2.0,3.0,0.0, 0.0]
A=[1.0 1.0 1.0 0.0;
1.0 -1.0 0.0 1.0]
b= [4.0,6.0]
model = Model(Clp.Optimizer)
set_optimizer_attribute(model,"SolveType",1) # SolveType 1 is for primal simplex
@variable(model,x[1:4]>=0)
@objective(model,Min,C'*x)
@constraint(model,A*x.==b)
optimize!(model)
value.(x)
Use print(model) to see the model you are solving:
julia> print(model)
Min -2 x[1] + 3 x[2]
Subject to
x[1] + x[2] + x[3] == 4.0
x[1] - x[2] + x[4] == 6.0
x[1] >= 0.0
x[2] >= 0.0
x[3] >= 0.0
x[4] >= 0.0
To define the same model in JuMP, I would use:
using JuMP, Clp
model = Model(Clp.Optimizer)
set_optimizer_attribute(model,"SolveType",1)
@variable(model,x[1:2]>=0)
@objective(model,Min,-2*x[1]+3*x[2])
@constraint(model,con_1,sum(x[i] for i in 1:2) <=4)
@constraint(model,con_2,x[1] - x[2] <=6)
optimize!(model)
value.(x)
Now use print(model) and compare with the standard form
julia> print(model)
Min -2 x[1] + 3 x[2]
Subject to
con_1 : x[1] + x[2] <= 4.0
con_2 : x[1] - x[2] <= 6.0
x[1] >= 0.0
x[2] >= 0.0