# Simplex solver

**URL:** <https://discourse.julialang.org/t/simplex-solver/49827>\
**Category:** Optimization (Mathematical)\
**Tags:** question, package\
**Created:** [November 9, 2020, 9:25am UTC](https://discourse.julialang.org/t/simplex-solver/49827 "2020-11-09T09:25:26Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![JohnZ](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@JohnZ](https://discourse.julialang.org/u/JohnZ)\
**Post date:** [November 10, 2020, 11:32am UTC](https://discourse.julialang.org/t/simplex-solver/49827/6 "2020-11-10T11:32:58Z")

</div>

> [@fusion809](#):
>
> - The constraint coefficients.
> - Add new variable(s).
> - Add new constraint(s).

You can do all of this in JuMP, but it requires basic expertise in Julia and JuMP.  
To change coefficients of constraints, you can wrap the model into a function and then use a loop that builds function for different sets of data before calling `optimize!`. Check a similar question [here](https://discourse.julialang.org/t/workaround-for-modifying-coefficients-in-constraints-in-jump/27123/5)

You can add new variables and constraints to a model. Check the example given in the documentation:  
[https://jump.dev/JuMP.jl/stable/variables/](https://jump.dev/JuMP.jl/stable/variables/)

```julia
function add_component_to_model(model::JuMP.Model)
    x = model[:x]
    # ... code that uses x
end
function build_model()
    model = Model()
    @variable(model, x)
    add_component_to_model(model)
end

```

---

_[View the full topic](https://discourse.julialang.org/t/simplex-solver/49827)._
