Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LP MIP Equation Solver
Message
From
11/07/2018 07:55:05
 
 
To
10/07/2018 02:41:07
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01661088
Message ID:
01661104
Views:
77
Likes (1)
>Hi folks
>
>I have some change to work on Linear Programming, but have not found any example with VFP. There are some open source solver projects like GLPK, but I do not have any idea how to use it in vfp.
>
>Please share you experience and guide me if anyone have used any solver.

Think you won't find any vfp examples

Read the GLPK manual. You will have to declare the necessary API's

From what I remember
(1) Arrays are one-based ( not zero)
(2) To pass an array, declare it as a string by reference ( @s)
Build the string from the array by concatenating the elements

Integer array
s = ''
local i
for i = 1 to alen(aa)
	s = m.s + bintoc(m.aa[m.i], '4rs')
endfor
Array of doubles
s = ''
local i
for i = 1 to alen(aa)
	s = m.s + bintoc(m.aa[m.i], 'B')
endfor
Best thing to do is to write a class that
(1) you use to define the problem
(2) handles the interaction with the API's ( adapter pattern)
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform