aboutsummaryrefslogtreecommitdiff
path: root/src/main.f90
diff options
context:
space:
mode:
authorJeff Armstrong <jeffrey.armstrong@approximatrix.com>2020-10-08 11:21:16 -0400
committerJeff Armstrong <jeffrey.armstrong@approximatrix.com>2020-10-08 11:21:16 -0400
commit8bcc342eb757f7d5c6930b0adc13983e74efee78 (patch)
tree33b03105928374b29bb900fd39f828beadb0328a /src/main.f90
downloadclp_fortran-8bcc342eb757f7d5c6930b0adc13983e74efee78.tar.gz
clp_fortran-8bcc342eb757f7d5c6930b0adc13983e74efee78.zip
Initial commit of original code
Diffstat (limited to 'src/main.f90')
-rw-r--r--src/main.f9030
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main.f90 b/src/main.f90
new file mode 100644
index 0000000..ee69d39
--- /dev/null
+++ b/src/main.f90
@@ -0,0 +1,30 @@
+program main
+ use iso_c_binding
+ use clp
+ use clp_constants
+ implicit none
+
+ integer :: ret
+
+ type(c_ptr) :: lp
+ real(8), dimension(0:4) :: obj
+ real(8), dimension(0:4) :: row1
+
+ lp = Clp_newModel()
+
+ call Clp_resize(lp,4,4)
+
+! row1(0) = 0; row1(1) = 1; row1(2) = 1; row1(3) = 1; ret = add_constraint(lp,row1,LE,100.0_8);
+
+! write (*,*) Clp_VersionMajor()
+! write (*,*) Clp_VersionMinor()
+! write (*,*) Clp_VersionRelease()
+
+
+ write (*,*) Clp_numberRows(lp)
+ write (*,*) Clp_numberColumns(lp)
+
+! call Clp_printModel(lp,"name"//c_null_char) ! seems to be broken when model is not defined
+
+ call Clp_deleteModel(lp)
+end