module clp use iso_c_binding use clp_callback, only: fortran_cb use clp_constants implicit none interface ! Version Routines function Clp_Version_C() bind(C,name="Clp_Version") use iso_c_binding type(c_ptr) :: Clp_Version_C end function function Clp_VersionMajor() bind(C,name="Clp_VersionMajor") use iso_c_binding integer(c_int) :: Clp_VersionMajor end function function Clp_VersionMinor() bind(C,name="Clp_VersionMinor") use iso_c_binding integer(c_int) :: Clp_VersionMinor end function function Clp_VersionRelease() bind(C,name="Clp_VersionRelease") use iso_c_binding integer(c_int) :: Clp_VersionRelease end function ! Model management function Clp_newModel() bind(C,name="Clp_newModel") use iso_c_binding type(c_ptr) :: Clp_newModel end function subroutine Clp_deleteModel(model) bind(C,name="Clp_deleteModel") use iso_c_binding type(c_ptr), value :: model end subroutine ! Solver management function ClpSolve_new() bind(C,name="ClpSolve_new") use iso_c_binding type(c_ptr) :: ClpSolve_new end function subroutine ClpSolve_delete(solve) bind(C,name="ClpSolve_delete") use iso_c_binding type(c_ptr), value :: solve end subroutine subroutine Clp_loadProblem_C(model,numcols,numrows,start, & index,value,collb,colub,obj,rowlb,rowub) bind(C,name="Clp_loadProblem") use iso_c_binding use clp_constants type(c_ptr), value :: model integer(c_int), value ::numcols integer(c_int), value ::numrows type(c_ptr), value :: start type(c_ptr), value :: index type(c_ptr), value :: value type(c_ptr), value :: collb type(c_ptr), value :: colub type(c_ptr), value :: obj type(c_ptr), value :: rowlb type(c_ptr), value :: rowub end subroutine subroutine Clp_loadQuadraticObjective(model,numberColumns, & start,column,element) bind(C,name="Clp_loadQuadraticObjective") use iso_c_binding use clp_constants type(c_ptr), value :: model integer(c_int), value ::numberColumns integer(CoinBigIndex_t) :: start(*) integer(c_int) :: column(*) real(c_double) :: element(*) end subroutine function Clp_readMps_C(model,filename,keepNames,ignoreErrors) bind(C,name="Clp_readMps") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: filename integer(c_int), value ::keepNames integer(c_int), value ::ignoreErrors integer(c_int) :: Clp_readMps_C end function subroutine Clp_copyInIntegerInformation_C(model,information) bind(C,name="Clp_copyInIntegerInformation") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: information end subroutine subroutine Clp_deleteIntegerInformation(model) bind(C,name="Clp_deleteIntegerInformation") use iso_c_binding type(c_ptr), value :: model end subroutine subroutine Clp_resize(model,newNumberRows,newNumberColumns) bind(C,name="Clp_resize") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::newNumberRows integer(c_int), value ::newNumberColumns end subroutine subroutine Clp_deleteRows(model,number,which) bind(C,name="Clp_deleteRows") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::number integer(c_int), dimension(*) :: which end subroutine subroutine Clp_addRows(model,number,rowLower, & rowUpper,rowStarts,columns,elements) bind(C,name="Clp_addRows") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::number real(c_double) :: rowLower(*) real(c_double) :: rowUpper(*) type(c_ptr), value :: rowStarts type(c_ptr), value :: columns real(c_double) :: elements(*) end subroutine subroutine Clp_deleteColumns(model,number,which) bind(C,name="Clp_deleteColumns") use iso_c_binding type(c_ptr), value :: model integer(c_int), value :: number integer(kind=c_int), dimension(*) :: which end subroutine subroutine Clp_addColumns(model,number,columnLower,columnUpper, & objective,columnStarts,rows,elements) bind(C,name="Clp_addColumns") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::number real(c_double) :: columnLower(*) real(c_double) :: columnUpper(*) real(c_double) :: objective(*) integer(c_long) :: columnStarts(*) integer(c_int) :: rows(*) real(c_double) :: elements(*) end subroutine subroutine Clp_chgRowLower(model,rowLower) bind(C,name="Clp_chgRowLower") use iso_c_binding type(c_ptr), value :: model real(c_double) :: rowLower(*) end subroutine subroutine Clp_chgRowUpper(model,rowUpper) bind(C,name="Clp_chgRowUpper") use iso_c_binding type(c_ptr), value :: model real(c_double) :: rowUpper(*) end subroutine subroutine Clp_chgColumnLower(model,columnLower) bind(C,name="Clp_chgColumnLower") use iso_c_binding type(c_ptr), value :: model real(c_double) :: columnLower(*) end subroutine subroutine Clp_chgColumnUpper(model,columnUpper) bind(C,name="Clp_chgColumnUpper") use iso_c_binding type(c_ptr), value :: model real(c_double) :: columnUpper(*) end subroutine subroutine Clp_chgObjCoefficients(model,objIn) bind(C,name="Clp_chgObjCoefficients") use iso_c_binding type(c_ptr), value :: model real(c_double) :: objIn(*) end subroutine subroutine Clp_dropNames(model) bind(C,name="Clp_dropNames") use iso_c_binding type(c_ptr), value :: model end subroutine subroutine Clp_copyNames_C(model,rowNames,columnNames) bind(C,name="Clp_copyNames") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: rowNames type(c_ptr), value :: columnNames end subroutine function Clp_numberRows(model) bind(C,name="Clp_numberRows") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_numberRows end function function Clp_numberColumns(model) bind(C,name="Clp_numberColumns") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_numberColumns end function function Clp_primalTolerance(model) bind(C,name="Clp_primalTolerance") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_primalTolerance end function subroutine Clp_setPrimalTolerance(model,value) bind(C,name="Clp_setPrimalTolerance") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_dualTolerance(model) bind(C,name="Clp_dualTolerance") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_dualTolerance end function subroutine Clp_setDualTolerance(model,value) bind(C,name="Clp_setDualTolerance") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_dualObjectiveLimit(model) bind(C,name="Clp_dualObjectiveLimit") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_dualObjectiveLimit end function subroutine Clp_setDualObjectiveLimit(model,value) bind(C,name="Clp_setDualObjectiveLimit") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_objectiveOffset(model) bind(C,name="Clp_objectiveOffset") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_objectiveOffset end function subroutine Clp_setObjectiveOffset(model,value) bind(C,name="Clp_setObjectiveOffset") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine subroutine Clp_problemName_C(model,maxNumberCharacters,array) bind(C,name="Clp_problemName") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::maxNumberCharacters type(c_ptr), value :: array end subroutine function Clp_setProblemName_C(model,maxNumberCharacters,array) bind(C,name="Clp_setProblemName") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::maxNumberCharacters type(c_ptr) :: array integer(c_int) :: Clp_setProblemName_C end function function Clp_numberIterations(model) bind(C,name="Clp_numberIterations") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_numberIterations end function subroutine Clp_setNumberIterations(model,numberIterations) bind(C,name="Clp_setNumberIterations") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::numberIterations end subroutine function maximumIterations(model) bind(C,name="maximumIterations") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: maximumIterations end function subroutine Clp_setMaximumIterations(model,value) bind(C,name="Clp_setMaximumIterations") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::value end subroutine function Clp_maximumSeconds(model) bind(C,name="Clp_maximumSeconds") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_maximumSeconds end function subroutine Clp_setMaximumSeconds(model,value) bind(C,name="Clp_setMaximumSeconds") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_hitMaximumIterations(model) bind(C,name="Clp_hitMaximumIterations") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_hitMaximumIterations end function function Clp_status(model) bind(C,name="Clp_status") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_status end function subroutine Clp_setProblemStatus(model,problemStatus) bind(C,name="Clp_setProblemStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::problemStatus end subroutine function Clp_secondaryStatus(model) bind(C,name="Clp_secondaryStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_secondaryStatus end function subroutine Clp_setSecondaryStatus(model,status) bind(C,name="Clp_setSecondaryStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::status end subroutine function Clp_optimizationDirection(model) bind(C,name="Clp_optimizationDirection") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_optimizationDirection end function subroutine Clp_setOptimizationDirection(model,value) bind(C,name="Clp_setOptimizationDirection") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_primalRowSolution_C(model) bind(C,name="Clp_primalRowSolution") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_primalRowSolution_C end function function Clp_primalColumnSolution_C(model) bind(C,name="Clp_primalColumnSolution") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_primalColumnSolution_C end function function Clp_dualRowSolution_C(model) bind(C,name="Clp_dualRowSolution") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_dualRowSolution_C end function function Clp_dualColumnSolution_C(model) bind(C,name="Clp_dualColumnSolution") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_dualColumnSolution_C end function function Clp_rowLower_C(model) bind(C,name="Clp_rowLower") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_rowLower_C end function function Clp_rowUpper_C(model) bind(C,name="Clp_rowUpper") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_rowUpper_C end function function Clp_objective_C(model) bind(C,name="Clp_objective") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_objective_C end function function Clp_columnLower_C(model) bind(C,name="Clp_columnLower") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_columnLower_C end function function Clp_columnUpper_C(model) bind(C,name="Clp_columnUpper") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_columnUpper_C end function function Clp_getNumElements(model) bind(C,name="Clp_getNumElements") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_getNumElements end function function Clp_getVectorStarts_C(model) bind(C,name="Clp_getVectorStarts") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getVectorStarts_C end function function Clp_getIndices_C(model) bind(C,name="Clp_getIndices") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getIndices_C end function function Clp_getVectorLengths_C(model) bind(C,name="Clp_getVectorLengths") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getVectorLengths_C end function function Clp_getElements_C(model) bind(C,name="Clp_getElements") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getElements_C end function function Clp_objectiveValue(model) bind(C,name="Clp_objectiveValue") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_objectiveValue end function function Clp_integerInformation_C(model) bind(C,name="Clp_integerInformation") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_integerInformation_C end function function Clp_infeasibilityRay_C(model) bind(C,name="Clp_infeasibilityRay") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_infeasibilityRay_C end function function Clp_unboundedRay_C(model) bind(C,name="Clp_unboundedRay") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_unboundedRay_C end function subroutine Clp_freeRay_C(model,ray) bind(C,name="Clp_freeRay") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: ray end subroutine function Clp_statusExists(model) bind(C,name="Clp_statusExists") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_statusExists end function function Clp_statusArray(model) bind(C,name="Clp_statusArray") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_statusArray end function subroutine Clp_copyinStatus(model,statusArray) bind(C,name="Clp_copyinStatus") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: statusArray end subroutine function Clp_getColumnStatus(model,sequence) bind(C,name="Clp_getColumnStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::sequence integer(c_int) :: Clp_getColumnStatus end function function Clp_getRowStatus(model,sequence) bind(C,name="Clp_getRowStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::sequence integer(c_int) :: Clp_getRowStatus end function subroutine Clp_setColumnStatus(model,sequence,value) bind(C,name="Clp_setColumnStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::sequence integer(c_int), value ::value end subroutine subroutine Clp_setRowStatus(model,sequence,value) bind(C,name="Clp_setRowStatus") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::sequence integer(c_int), value ::value end subroutine subroutine Clp_setUserPointer(model,pointer) bind(C,name="Clp_setUserPointer") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: pointer end subroutine subroutine Clp_getUserPointer(model) bind(C,name="Clp_getUserPointer") use iso_c_binding type(c_ptr) :: model end subroutine subroutine Clp_registerCallBack_C(model,userCallBack) bind(C,name="Clp_registerCallBack") use iso_c_binding type(c_ptr), value :: model type(c_funptr), value :: userCallBack end subroutine subroutine Clp_clearCallBack(model) bind(C,name="Clp_clearCallBack") use iso_c_binding type(c_ptr), value :: model end subroutine subroutine Clp_setLogLevel(model,value) bind(C,name="Clp_setLogLevel") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::value end subroutine function Clp_logLevel(model) bind(C,name="Clp_logLevel") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_logLevel end function function Clp_lengthNames(model) bind(C,name="Clp_lengthNames") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_lengthNames end function subroutine Clp_rowName_C(model,iRow,np) bind(C,name="Clp_rowName") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::iRow type(c_ptr), value :: np end subroutine subroutine Clp_columnName_C(model,iColumn,np) bind(C,name="Clp_columnName") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::iColumn type(c_ptr), value :: np end subroutine function Clp_initialSolve(model) bind(C,name="Clp_initialSolve") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_initialSolve end function function Clp_initialSolveWithOptions(model,solver) bind(C,name="Clp_initialSolveWithOptions") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: solver integer(c_int) :: Clp_initialSolveWithOptions end function function Clp_initialDualSolve(model) bind(C,name="Clp_initialDualSolve") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_initialDualSolve end function function Clp_initialPrimalSolve(model) bind(C,name="Clp_initialPrimalSolve") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_initialPrimalSolve end function function Clp_initialBarrierSolve(model) bind(C,name="Clp_initialBarrierSolve") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_initialBarrierSolve end function function Clp_initialBarrierNoCrossSolve(model) bind(C,name="Clp_initialBarrierNoCrossSolve") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_initialBarrierNoCrossSolve end function function Clp_dual(model,ifValuesPass) bind(C,name="Clp_dual") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::ifValuesPass integer(c_int) :: Clp_dual end function function Clp_primal(model,ifValuesPass) bind(C,name="Clp_primal") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::ifValuesPass integer(c_int) :: Clp_primal end function subroutine Clp_idiot(model,tryhard) bind(C,name="Clp_idiot") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::tryhard end subroutine subroutine Clp_scaling(model,mode) bind(C,name="Clp_scaling") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::mode end subroutine function Clp_scalingFlag(model) bind(C,name="Clp_scalingFlag") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_scalingFlag end function function Clp_crash(model,gap,pivot) bind(C,name="Clp_crash") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: gap integer(c_int), value ::pivot integer(c_int) :: Clp_crash end function function Clp_primalFeasible(model) bind(C,name="Clp_primalFeasible") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_primalFeasible end function function Clp_dualFeasible(model) bind(C,name="Clp_dualFeasible") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_dualFeasible end function function Clp_dualBound(model) bind(C,name="Clp_dualBound") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_dualBound end function subroutine Clp_setDualBound(model,value) bind(C,name="Clp_setDualBound") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_infeasibilityCost(model) bind(C,name="Clp_infeasibilityCost") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_infeasibilityCost end function subroutine Clp_setInfeasibilityCost(model,value) bind(C,name="Clp_setInfeasibilityCost") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine function Clp_perturbation(model) bind(C,name="Clp_perturbation") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_perturbation end function subroutine Clp_setPerturbation(model,value) bind(C,name="Clp_setPerturbation") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::value end subroutine function Clp_algorithm(model) bind(C,name="Clp_algorithm") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_algorithm end function subroutine Clp_setAlgorithm(model,value) bind(C,name="Clp_setAlgorithm") use iso_c_binding type(c_ptr), value :: model integer(c_int), value ::value end subroutine function Clp_sumDualInfeasibilities(model) bind(C,name="Clp_sumDualInfeasibilities") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_sumDualInfeasibilities end function function Clp_numberDualInfeasibilities(model) bind(C,name="Clp_numberDualInfeasibilities") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_numberDualInfeasibilities end function function Clp_sumPrimalInfeasibilities(model) bind(C,name="Clp_sumPrimalInfeasibilities") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_sumPrimalInfeasibilities end function function Clp_numberPrimalInfeasibilities(model) bind(C,name="Clp_numberPrimalInfeasibilities") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_numberPrimalInfeasibilities end function function Clp_saveModel_C(model,fileName) bind(C,name="Clp_saveModel") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: fileName integer(c_int) :: Clp_saveModel_C end function function Clp_restoreModel_C(model,fileName) bind(C,name="Clp_restoreModel") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: fileName integer(c_int) :: Clp_restoreModel_C end function subroutine Clp_checkSolution(model) bind(C,name="Clp_checkSolution") use iso_c_binding type(c_ptr), value :: model end subroutine function Clp_getNumRows(model) bind(C,name="Clp_getNumRows") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_getNumRows end function function Clp_getNumCols(model) bind(C,name="Clp_getNumCols") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_getNumCols end function function Clp_getIterationCount(model) bind(C,name="Clp_getIterationCount") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_getIterationCount end function function Clp_isAbandoned(model) bind(C,name="Clp_isAbandoned") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isAbandoned end function function Clp_isProvenOptimal(model) bind(C,name="Clp_isProvenOptimal") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isProvenOptimal end function function Clp_isProvenPrimalInfeasible(model) bind(C,name="Clp_isProvenPrimalInfeasible") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isProvenPrimalInfeasible end function function Clp_isProvenDualInfeasible(model) bind(C,name="Clp_isProvenDualInfeasible") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isProvenDualInfeasible end function function Clp_isPrimalObjectiveLimitReached(model) bind(C,name="Clp_isPrimalObjectiveLimitReached") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isPrimalObjectiveLimitReached end function function Clp_isDualObjectiveLimitReached(model) bind(C,name="Clp_isDualObjectiveLimitReached") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isDualObjectiveLimitReached end function function Clp_isIterationLimitReached(model) bind(C,name="Clp_isIterationLimitReached") use iso_c_binding type(c_ptr), value :: model integer(c_int) :: Clp_isIterationLimitReached end function function Clp_getObjSense(model) bind(C,name="Clp_getObjSense") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_getObjSense end function subroutine Clp_setObjSense(model,objsen) bind(C,name="Clp_setObjSense") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: objsen end subroutine function Clp_getRowActivity_C(model) bind(C,name="Clp_getRowActivity") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getRowActivity_C end function function Clp_getColSolution_C(model) bind(C,name="Clp_getColSolution") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getColSolution_C end function subroutine Clp_setColSolution(model,input) bind(C,name="Clp_setColSolution") use iso_c_binding type(c_ptr), value :: model real(c_double) :: input(*) end subroutine function Clp_getRowPrice_C(model) bind(C,name="Clp_getRowPrice") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getRowPrice_C end function function Clp_getReducedCost_C(model) bind(C,name="Clp_getReducedCost") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getReducedCost_C end function function Clp_getRowLower_C(model) bind(C,name="Clp_getRowLower") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getRowLower_C end function function Clp_getRowUpper_C(model) bind(C,name="Clp_getRowUpper") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getRowUpper_C end function function Clp_getObjCoefficients_C(model) bind(C,name="Clp_getObjCoefficients") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getObjCoefficients_C end function function Clp_getColLower_C(model) bind(C,name="Clp_getColLower") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getColLower_C end function function Clp_getColUpper_C(model) bind(C,name="Clp_getColUpper") use iso_c_binding type(c_ptr), value :: model type(c_ptr) :: Clp_getColUpper_C end function function Clp_getObjValue(model) bind(C,name="Clp_getObjValue") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_getObjValue end function subroutine Clp_printModel_C(model,prefix) bind(C,name="Clp_printModel") use iso_c_binding type(c_ptr), value :: model type(c_ptr), value :: prefix end subroutine function Clp_getSmallElementValue(model) bind(C,name="Clp_getSmallElementValue") use iso_c_binding type(c_ptr), value :: model real(c_double) :: Clp_getSmallElementValue end function subroutine Clp_setSmallElementValue(model,value) bind(C,name="Clp_setSmallElementValue") use iso_c_binding type(c_ptr), value :: model real(c_double), value :: value end subroutine subroutine ClpSolve_setSpecialOption(solver,which,value,extraInfo) bind(C,name="ClpSolve_setSpecialOption") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::which integer(c_int), value ::value integer(c_int), value ::extraInfo end subroutine function ClpSolve_getSpecialOption(solver,which) bind(C,name="ClpSolve_getSpecialOption") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::which integer(c_int) :: ClpSolve_getSpecialOption end function subroutine ClpSolve_setSolveType(solver,method,extraInfo) bind(C,name="ClpSolve_setSolveType") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::method integer(c_int), value ::extraInfo end subroutine function ClpSolve_getSolveType(solver) bind(C,name="ClpSolve_getSolveType") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_getSolveType end function subroutine ClpSolve_setPresolveType(solver,amount,extraInfo) bind(C,name="ClpSolve_setPresolveType") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::amount integer(c_int), value ::extraInfo end subroutine function ClpSolve_getPresolveType(solver) bind(C,name="ClpSolve_getPresolveType") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_getPresolveType end function function ClpSolve_getPresolvePasses(solver) bind(C,name="ClpSolve_getPresolvePasses") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_getPresolvePasses end function function ClpSolve_getExtraInfo(solver,which) bind(C,name="ClpSolve_getExtraInfo") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value :: which integer(c_int) :: ClpSolve_getExtraInfo end function subroutine ClpSolve_setInfeasibleReturn(solver,trueFalse) bind(C,name="ClpSolve_setInfeasibleReturn") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::trueFalse end subroutine function ClpSolve_infeasibleReturn(solver) bind(C,name="ClpSolve_infeasibleReturn") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_infeasibleReturn end function function ClpSolve_doDual(solver) bind(C,name="ClpSolve_doDual") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doDual end function subroutine ClpSolve_setDoDual(solver,doDual) bind(C,name="ClpSolve_setDoDual") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doDual end subroutine function ClpSolve_doSingleton(solver) bind(C,name="ClpSolve_doSingleton") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doSingleton end function subroutine ClpSolve_setDoSingleton(solver,doSingleton) bind(C,name="ClpSolve_setDoSingleton") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value :: doSingleton end subroutine function ClpSolve_doDoubleton(solver) bind(C,name="ClpSolve_doDoubleton") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doDoubleton end function subroutine ClpSolve_setDoDoubleton(solver,doDoubleton) bind(C,name="ClpSolve_setDoDoubleton") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doDoubleton end subroutine function ClpSolve_doTripleton(solver) bind(C,name="ClpSolve_doTripleton") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doTripleton end function subroutine ClpSolve_setDoTripleton(solver,doTripleton) bind(C,name="ClpSolve_setDoTripleton") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doTripleton end subroutine function ClpSolve_doTighten(solver) bind(C,name="ClpSolve_doTighten") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doTighten end function subroutine ClpSolve_setDoTighten(solver,doTighten) bind(C,name="ClpSolve_setDoTighten") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doTighten end subroutine function ClpSolve_doForcing(solver) bind(C,name="ClpSolve_doForcing") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doForcing end function subroutine ClpSolve_setDoForcing(solver,doForcing) bind(C,name="ClpSolve_setDoForcing") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doForcing end subroutine function ClpSolve_doImpliedFree(solver) bind(C,name="ClpSolve_doImpliedFree") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doImpliedFree end function subroutine ClpSolve_setDoImpliedFree(solver,doImpliedFree) bind(C,name="ClpSolve_setDoImpliedFree") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value :: doImpliedFree end subroutine function ClpSolve_doDupcol(solver) bind(C,name="ClpSolve_doDupcol") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doDupcol end function subroutine ClpSolve_setDoDupcol(solver,doDupcol) bind(C,name="ClpSolve_setDoDupcol") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doDupcol end subroutine function ClpSolve_doDuprow(solver) bind(C,name="ClpSolve_doDuprow") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doDuprow end function subroutine ClpSolve_setDoDuprow(solver,doDuprow) bind(C,name="ClpSolve_setDoDuprow") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doDuprow end subroutine function ClpSolve_doSingletonColumn(solver) bind(C,name="ClpSolve_doSingletonColumn") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_doSingletonColumn end function subroutine ClpSolve_setDoSingletonColumn(solver,doSingleton) bind(C,name="ClpSolve_setDoSingletonColumn") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::doSingleton end subroutine function ClpSolve_presolveActions(solver) bind(C,name="ClpSolve_presolveActions") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_presolveActions end function subroutine ClpSolve_setPresolveActions(solver,action) bind(C,name="ClpSolve_setPresolveActions") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::action end subroutine function ClpSolve_substitution(solver) bind(C,name="ClpSolve_substitution") use iso_c_binding type(c_ptr), value :: solver integer(c_int) :: ClpSolve_substitution end function subroutine ClpSolve_setSubstitution(solver,value) bind(C,name="ClpSolve_setSubstitution") use iso_c_binding type(c_ptr), value :: solver integer(c_int), value ::value end subroutine end interface contains subroutine Clp_Version(s) use clp_interface_utils, only: populate_fortran_string implicit none character(len=*), intent(out)::s call populate_fortran_string(Clp_Version_C(), s) end subroutine Clp_Version function Clp_readMps(model,filename,keepNames,ignoreErrors) use clp_interface_utils use iso_c_binding implicit none type(c_ptr)::model character(len=*)::filename integer, intent(in)::keepNames integer, intent(in)::ignoreErrors integer::Clp_readMps type(c_ptr)::c_filename c_filename = allocate_and_populate_c_string(filename) Clp_readMps = Clp_readMps_C(model, c_filename, keepNames, ignoreErrors) call c_free(c_filename) end function Clp_readMps subroutine Clp_copyInIntegerInformation(model, information) use clp_interface_utils use iso_c_binding implicit none type(c_ptr), intent(in)::model character(len=*), intent(in)::information type(c_ptr)::c_info c_info = allocate_and_populate_c_string(information) call Clp_copyInIntegerInformation_C(model, c_info) call c_free(c_info) end subroutine Clp_copyInIntegerInformation function Clp_setProblemName(model, maxNumberCharacters, array) use clp_interface_utils use iso_c_binding implicit none type(c_ptr), intent(in)::model integer, intent(in)::maxNumberCharacters character(len=*)::array type(c_ptr)::c_array integer::Clp_setProblemName c_array = allocate_and_populate_c_string(array) Clp_setProblemName = Clp_setProblemName_C(model, maxNumberCharacters, c_array) call c_free(c_array) end function Clp_SetProblemName subroutine Clp_problemName(model,array) use clp_interface_utils use iso_c_binding implicit none type(c_ptr) :: model character(len=*), intent(out) :: array type(c_ptr)::c_array array = ' ' c_array = c_allocate(int(len(array) + 1, kind=c_size_t)) if(c_associated(c_array)) then call Clp_problemName_C(model, len(array), c_array) call populate_fortran_string(c_array, array) call c_free(c_array) end if end subroutine Clp_problemName subroutine Clp_copyNames(model,rowNames,columnNames) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model character(len=*), dimension(:), intent(in) :: rowNames character(len=*), dimension(:), intent(in) :: columnNames type(c_ptr), dimension(:), pointer :: rn_c type(c_ptr), dimension(:), pointer :: cn_c integer::i allocate(rn_c(size(rowNames))) allocate(cn_c(size(columnNames))) do i = 1, size(rowNames) rn_c(i) = allocate_and_populate_c_string(rowNames(i)) end do do i = 1, size(columnNames) rn_c(i) = allocate_and_populate_c_string(columnNames(i)) end do call Clp_copyNames_C(model, c_loc(rn_c), c_loc(cn_c)) do i = 1, size(rowNames) if(c_associated(rn_c(i))) then call c_free(rn_c(i)) end if end do do i = 1, size(columnNames) if(c_associated(cn_c(i))) then call c_free(cn_c(i)) end if end do deallocate(rn_c) deallocate(cn_c) end subroutine Clp_copyNames subroutine Clp_rowName(model,iRow,name) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model integer, intent(in)::iRow character(*), intent(out) :: name type(c_ptr) :: np name = ' ' np = c_allocate(int(Clp_LengthNames(model)+1, kind=c_size_t)) if(c_associated(np)) then call Clp_rowName_C(model, int(iRow, kind=c_int), np) call populate_fortran_string(np, name) call c_free(np) end if end subroutine Clp_rowName subroutine Clp_columnName(model,iColumn,name) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model integer, intent(in)::iColumn character(*), intent(out) :: name type(c_ptr) :: np name = ' ' np = c_allocate(int(Clp_LengthNames(model)+1, kind=c_size_t)) if(c_associated(np)) then call Clp_columnName_C(model, int(iColumn, kind=c_int), np) call populate_fortran_string(np, name) call c_free(np) end if end subroutine Clp_columnName function Clp_saveModel(model,fileName) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model character(len=*) :: fileName integer :: Clp_saveModel type(c_ptr) :: fileName_C Clp_saveModel = -1 fileName_C = allocate_and_populate_c_string(fileName) if(c_associated(fileName_C)) then Clp_saveModel = Clp_saveModel_C(model, fileName_C) call c_free(fileName_C) end if end function Clp_saveModel function Clp_restoreModel(model,fileName) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model character(len=*) :: fileName integer :: Clp_restoreModel type(c_ptr) :: fileName_C Clp_restoreModel = -1 fileName_C = allocate_and_populate_c_string(fileName) if(c_associated(fileName_C)) then Clp_restoreModel = Clp_restoreModel_C(model, fileName_C) call c_free(fileName_C) end if end function Clp_restoreModel subroutine Clp_printModel(model,prefix) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model character(len=*) :: prefix type(c_ptr) :: prefix_C prefix_C = allocate_and_populate_c_string(prefix) if(c_associated(prefix_C)) then call Clp_printModel_C(model, prefix_C) call c_free(prefix_C) end if end subroutine Clp_printModel function Clp_getVectorStarts(model) result(starts) use iso_c_binding use clp_constants implicit none type(c_ptr) :: model integer(kind=CoinBigIndex_t), dimension(:), pointer :: starts type(c_ptr) :: c_res integer::ncols starts => null() c_res = Clp_getVectorStarts_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, starts, (/ ncols /)) end if end function Clp_getVectorStarts function Clp_getRowActivity(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_getRowActivity_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_getRowActivity function Clp_getColSolution(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_getColSolution_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_getColSolution function Clp_getRowPrice(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_getRowPrice_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_getRowPrice function Clp_getReducedCost(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_getReducedCost_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_getReducedCost function Clp_getRowLower(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_getRowLower_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_getRowLower function Clp_rowLower(model) implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: Clp_rowLower Clp_rowLower => Clp_getRowLower(model) end function Clp_rowLower function Clp_getRowUpper(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_getRowUpper_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_getRowUpper function Clp_rowUpper(model) implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: Clp_rowUpper Clp_rowUpper => Clp_getRowUpper(model) end function Clp_rowUpper function Clp_objective(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_objective_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_objective function Clp_getObjCoefficients(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_getObjCoefficients_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_getObjCoefficients function Clp_getColLower(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_getColLower_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_getColLower function Clp_columnLower(model) implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: Clp_columnLower Clp_columnLower => Clp_getColLower(model) end function Clp_columnLower function Clp_getColUpper(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_getColUpper_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_getColUpper function Clp_columnUpper(model) implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: Clp_columnUpper Clp_columnUpper => Clp_getColUpper(model) end function Clp_columnUpper function Clp_primalRowSolution(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_primalRowSolution_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_primalRowSolution function Clp_primalColumnSolution(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_primalColumnSolution_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_primalColumnSolution function Clp_dualRowSolution(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_dualRowSolution_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_dualRowSolution function Clp_dualColumnSolution(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_dualColumnSolution_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_dualColumnSolution function Clp_infeasibilityRay(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_infeasibilityRay_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_infeasibilityRay function Clp_unboundedRay(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_unboundedRay_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_unboundedRay subroutine Clp_freeRay(model, ray) use iso_c_binding implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: ray call Clp_freeRay_C(model, c_loc(ray)) end subroutine Clp_freeRay function Clp_getIndices(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model integer(c_int), dimension(:), pointer :: res integer::nrows type(c_ptr) :: c_res res => null() c_res = Clp_getIndices_C(model) if(c_associated(c_res)) then nrows = Clp_Numberrows(model) call c_f_pointer(c_res, res, (/ nrows /)) end if end function Clp_getIndices function Clp_getVectorLengths(model) result(res) use iso_c_binding implicit none type(c_ptr) :: model integer(c_int), dimension(:), pointer :: res integer::ncols type(c_ptr) :: c_res res => null() c_res = Clp_getVectorLengths_C(model) if(c_associated(c_res)) then ncols = Clp_Numbercolumns(model) call c_f_pointer(c_res, res, (/ ncols /)) end if end function Clp_getVectorLengths function Clp_getElements(model) result(res) use iso_c_binding use clp_constants implicit none type(c_ptr) :: model real(c_double), dimension(:), pointer :: res integer :: n type(c_ptr) :: c_res res => null() c_res = Clp_getElements_C(model) if(c_associated(c_res)) then n = Clp_getNumElements(model) call c_f_pointer(c_res, res, (/ n /)) end if end function Clp_getElements subroutine Clp_integerInformation(model, str) use iso_c_binding use clp_interface_utils implicit none type(c_ptr) :: model character(*), intent(out) :: str type(c_ptr) :: cstr str = ' ' cstr = Clp_integerInformation_C(model) if(c_associated(cstr)) then call populate_fortran_string(cstr, str) end if end subroutine Clp_integerInformation subroutine Clp_registerCallback(model, cb) use iso_c_binding use clp_callback implicit none type(c_ptr) :: model procedure(fortran_cb) :: cb if(associated(current_callback)) then Write(*,*) "*** WARNING: Clp Fortran Library supports only a single callback" Write(*,*) "*** Reassigning current callback" end if current_callback => cb call Clp_Registercallback_C(model, c_funloc(Clp_boundCallbackInterface)) end subroutine Clp_registerCallback subroutine Clp_loadProblem(model,numcols,numrows,start,vindex,vvalue,& collb,colub,obj,rowlb,rowub) use iso_c_binding use clp_constants implicit none type(c_ptr) :: model integer(c_int), intent(in) ::numcols integer(c_int), intent(in) ::numrows integer(CoinBigIndex_t), dimension(:), target:: start ! ia integer(c_int), dimension(:), target :: vindex ! ja real(c_double), dimension(:), target :: vvalue real(c_double), dimension(:), target, optional :: collb real(c_double), dimension(:), target, optional :: colub real(c_double), dimension(:), target, optional :: obj real(c_double), dimension(:), target, optional :: rowlb real(c_double), dimension(:), target, optional :: rowub type(c_ptr)::collb_ptr, colub_ptr, obj_ptr, rowlb_ptr, rowub_ptr if(present(collb)) then collb_ptr = c_loc(collb) else collb_ptr = c_null_ptr end if if(present(colub)) then colub_ptr = c_loc(colub) else colub_ptr = c_null_ptr end if if(present(obj)) then obj_ptr = c_loc(obj) else obj_ptr = c_null_ptr end if if(present(rowlb)) then rowlb_ptr = c_loc(rowlb) else rowlb_ptr = c_null_ptr end if if(present(rowub)) then rowub_ptr = c_loc(rowub) else rowub_ptr = c_null_ptr end if call Clp_loadProblem_C(model, numcols, numrows, c_loc(start), c_loc(vindex), c_loc(vvalue), & collb_ptr, colub_ptr, obj_ptr, rowlb_ptr, rowub_ptr) end subroutine Clp_loadProblem end module clp