Пример #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
}
Пример #2
0
func (l *LP) Solve() {
	C.solve(l.ptr)
}
Пример #3
0
Файл: lp.go Проект: 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))
}