Skip to content

Commit

Permalink
Update lpgen.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TimLai666 committed Nov 1, 2024
1 parent 3c1ad93 commit b02a71c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Docs/lpgen.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `LPModel` struct is the core of the `lpgen` package, allowing users to defin
- **BinaryVars**: Specifies which variables are binary.
- **IntegerVars**: Specifies which variables are integers.

#### Functions in `lpgen`
#### General Functions and Methods in `lpgen`

1. **`NewLPModel`**:
Creates a new LPModel instance.
Expand Down Expand Up @@ -109,3 +109,10 @@ lpModel.GenerateLPFile("my_model.lp")

This example defines a simple linear programming model with two variables and constraints, and saves it as an LP file named `my_model.lp`.

#### LINGO Support

1. `ParseLingoModel_txt`
Parse LINGO model from txt file. Go to `LINGO > Generate > Display Model` in LINGO to get the model.
```go
func ParseLingoModel_txt(filePath string) *LPModel
```

0 comments on commit b02a71c

Please sign in to comment.