# Read a csv tabular data to use in a p median model

**URL:** <https://discourse.julialang.org/t/read-a-csv-tabular-data-to-use-in-a-p-median-model/91515>\
**Category:** Optimization (Mathematical)\
**Created:** [December 10, 2022, 6:02pm UTC](https://discourse.julialang.org/t/read-a-csv-tabular-data-to-use-in-a-p-median-model/91515 "2022-12-10T18:02:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aninha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aninha/32/45037_2.png) [@aninha](https://discourse.julialang.org/u/aninha)\
**Post date:** [December 10, 2022, 6:02pm UTC](https://discourse.julialang.org/t/read-a-csv-tabular-data-to-use-in-a-p-median-model/91515/1 "2022-12-10T18:02:53Z")

</div>

Can u help me to to print an objective function?

@objective(m, Min, sum(custo[j,i]\*x[i,j] for i in destino, j in origem))

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 11, 2022, 9:44am UTC](https://discourse.julialang.org/t/read-a-csv-tabular-data-to-use-in-a-p-median-model/91515/2 "2022-12-11T09:44:51Z")

</div>

Could you give some more details? The title of the thread doesn’t seem to have anything to do with your question.

Are you using JuMP? Here’s the section of the docs describing how to query an objective function:

[https://jump.dev/JuMP.jl/stable/manual/objective/#Query-the-objective-function](https://jump.dev/JuMP.jl/stable/manual/objective/#Query-the-objective-function)

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [December 11, 2022, 7:55pm UTC](https://discourse.julialang.org/t/read-a-csv-tabular-data-to-use-in-a-p-median-model/91515/3 "2022-12-11T19:55:16Z")

</div>

If your question is really about the `Read a CSV` part, then there are various tutorials in the JuMP documentation that will help:

- [Getting started with data and plotting · JuMP](https://jump.dev/JuMP.jl/stable/tutorials/getting_started/getting_started_with_data_and_plotting/)
- [The factory schedule example · JuMP](https://jump.dev/JuMP.jl/stable/tutorials/linear/factory_schedule/)
