5.8. pyopus.problems.lvu — Lukšan-Vlček set of unconstrained problems

Inheritance diagram of pyopus.problems.lvu

Unconstrained test functions by Lukšan and Vlček (PyOPUS subsystem name: LVU)

This module is independent of PyOPUS, meaning that it can be taken as is and used as a module in some other package. It depends only on the cpi and the _lvu modules.

The code in the binary module shares variables. Therefore the function should be created and then used immediately. Creating another function may change the previously created one. This sucks, but what can you do? I know! Rewrite the FORTRAN code :)

lvu

Lukšan L., Vlček J.: Test Problems for Unconstrained Optimization, Technical report V-897, ICS AS CR, Prague, 2003.

class pyopus.problems.lvu.LVU(name=None, number=None, n=10)[source]

Unconstrained problems from the Lukšan-Vlček test suite.

  • name - problem name

  • number - problem number (0-91)

Attributes:

  • name - problem name

  • n - number of variables

  • initial - initial values of variables

All test functions in this class are maps from \(R^n\) to \(R\).

cpi()[source]

Returns the common problem interface.

Gradient is not supported.

xmin and fmin are not available.

See the CPI class for more information.

f(x)[source]

Returns the value of the function at x.

names = ['ChainedRosenbrock', 'ChainedWood', 'ChainedPowelSingular', 'ChainedCraggAndLevy', 'GeneralizedBroydenTridiagonal1', 'GeneralizedBroydenBanded1', 'SevenDiagonalBroyden', 'ModifiedNazarethTrigonometric', 'AnotherTrigonometric', 'TointTrigonometric', 'AugmentedLagrangian', 'GeneralizedBrown1', 'GeneralizedBrown2', 'DiscreteBoundaryValue1', 'DiscreteVariational', 'BandedTrigonometric', 'Variational1', 'Variational2', 'Variational3', 'Variational4', 'Variational5', 'VariationalCalvar2', 'Penalty2', 'Penalty3', 'ExtendedRosenbrock', 'ExtendedPowellSingular', 'Penalty1', 'VariablyDimensioned', 'BrownAlmostLinear', 'DiscreteBoundaryValue2', 'BroydenTridiagonal1', 'GeneralizedBroydenTridiagonal2', 'GeneralizedBroydenBanded2', 'ChainedFreudensteinAndRoth', 'WrightAndHoltZeroResidual', 'TointQuadraticMerging', 'ChainedExponential', 'ChainedSerpentine', 'ChainedModifiedHS47', 'ChainedModifiedHS48_1', 'SparseSignomial', 'SparseExponential', 'SparseTrigonometric', 'CountercurrentReactors', 'TridiagonalSystem', 'StructuredJacobian', 'ModifiedDiscreteBoundaryValue', 'ChainedModifiedHS48_2', 'AttractingRepelling', 'TointExponentialTrigonometricMerging', 'CountercurrentReactors2', 'TrigonometricExponential1', 'TrigonometricExponential2', 'SingularBroyden', 'FiveDiagonal', 'SevenDiagonal', 'ExtendedFreudensteinAndRoth', 'ExtendedCraggAndLevy', 'BroydenTridiagonal2', 'ExtendedPowellBadlyScaled', 'ExtendedWood', 'TridiagonalExponential', 'Brent', 'Troesch', 'FlowInChannel', 'SwirlingFlow', 'Bratu', 'Poisson1', 'Poisson2', 'PorousMedium', 'ConvectionDifussion', 'NonlinearBiharmonic', 'DrivenCavity', 'Problem74', 'Problem201_27', 'Problem202_27', 'Problem205_27', 'Problem206_27', 'Problem207_27', 'Problem208_27', 'Problem209_27', 'Problem212_27', 'Problem213_27', 'Problem214_27', 'GheriAndMancino', 'OrtegaAndRheinboldt', 'AscherAndRussel1', 'AscherAndRussel2', 'AllgowerAndGeorg', 'PotraAndRheinboldt', 'Problem91', 'Problem92']

List of all function names

setup()[source]

Initializes the binary implementation of the function. After this function is called no other function from the same test set may be created or initialized because that will change the internal variables and break the function. Returns an info structure.

Example file lvu.py in folder demo/problems/

# -*- coding: UTF-8 -*-
# Lukšan-Vlček unconstrained problems test suite

from pyopus.problems.lvu import *

if __name__=='__main__':
	print("Unconstrained problems, n=50")
	for ii in range(len(LVU.names)):
		prob=LVU(number=ii, n=50)
		
		# These problems need setting up before they are used. 
		# Only one problem can be uset at a time. 
		prob.setup()
		
		print("%2d: %40s: f0=%e" % (ii, prob.name, prob.f(prob.initial)))
	print()