Skip to content

Commit

Permalink
Update lpgen.go
Browse files Browse the repository at this point in the history
  • Loading branch information
TimLai666 committed Oct 17, 2024
1 parent ac4a7f6 commit 4064997
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lpgen/lpgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ func (lp *LPModel) GenerateLPFile(filename string) {

// 添加整數變數
if len(lp.IntegerVars) > 0 {
file.WriteString("General\n")
_, err = file.WriteString("General\n")
if err != nil {
insyra.LogWarning("lpgen.GenerateLPFile: Failed to write general: %v, returning", err)
return
}
for _, intVar := range lp.IntegerVars {
_, err = file.WriteString(" " + intVar + "\n")
if err != nil {
Expand Down

0 comments on commit 4064997

Please sign in to comment.