F
function F(UF:userfunc, arg:linctr):nlctr
 function F(UF:userfunc, arg:nlctr):nlctr
 function F(UF:userfunc, arg:list of nlctr):nlctr
 function F(UF:userfunc, arg:array(any sets) of nlctr):nlctr
 function F(UF:userfunc, arg:list of nlctr, returnarg:integer):nlctr
 function F(UF:userfunc, arg:array(any sets) of nlctr, returnarg:integer):nlctr
 | 
     UF 
     | 
      A user function of type
     userfunc
     | 
| 
     arg 
     | 
      Argument to be passed to the user function
     | 
| 
     returnarg 
     | 
      Return argument to be substituted into the formula for multivalued user functions
     | 
model "SimpleUF"
 uses "mmxnlp"
 declarations
  obj: nlctr
  x: mpvar
  MinusSine: userfunc
 end-declarations
! Creation and assignment of the user function
 MinusSine := userfuncMosel("MinusSineImplementation")
! which can then be embedded into any nonlinear expression
 obj := F(MinusSine,x)
 minimize(obj)
 public function MinusSineImplementation (x:real): real
  returned := -sin(x)
 end-function
end-model
    
© 2001-2023 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
 
