Skip to content

Commit 6c29c4c

Browse files
authored
add Python syntax highlighting
1 parent 50abfb2 commit 6c29c4c

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,18 @@ While for this example, the scaffolding code seems unnecessarily complex, it sca
3737

3838
For a better learning experience, one can also launch `ipython` and execute the lines of `runme.py` step by step, inspecting the created objects with one eye on the [Pyomo Online Documentation](https://software.sandia.gov/downloads/pub/pyomo/PyomoOnlineDocs.html):
3939

40-
import coopr.environ
41-
from coopr.opt.base import SolverFactory
42-
import bacon
43-
44-
data = bacon.read_excel('input.xlsx')
45-
model = bacon.create_model(data)
46-
prob = model.create()
47-
optim = SolverFactory('glpk')
48-
result = optim.solve(prob, tee=True)
49-
prob.load(result)
40+
```python
41+
import coopr.environ
42+
from coopr.opt.base import SolverFactory
43+
import bacon
44+
45+
data = bacon.read_excel('input.xlsx')
46+
model = bacon.create_model(data)
47+
prob = model.create()
48+
optim = SolverFactory('glpk')
49+
result = optim.solve(prob, tee=True)
50+
prob.load(result)
51+
```
5052

5153
All the work happens in the functions defined within `bacon.py`.
5254

0 commit comments

Comments
 (0)