Esempio n. 1
0
func SolveDIMACS(text string) (solvable bool, soln []bool) {
	slv := C.make_solver()
	res := C.solve(slv, C.CString(text))
	if res == 1 {
		solvable = true
		soln = solution(slv)
	} else {
		solvable = false
		soln = nil
	}
	C.solver_delete(slv)
	return
}
Esempio n. 2
0
func (l *LP) Solve() {
	C.solve(l.ptr)
}
Esempio n. 3
0
File: lp.go Progetto: gaffo/golp
// Solve the linear (or mixed integer) program and return the solution type
// See http://lpsolve.sourceforge.net/5.5/solve.htm
func (l *LP) Solve() SolutionType {
	return SolutionType(C.solve(l.ptr))
}