• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.55.1 Introduction
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(simplex): Solve linear programming problems
          • Introduction
            • gen_state/1
            • constraint/3
            • maximize/3
            • minimize/3
            • variable_value/3
            • objective/2
    • Packages
Availability::- use_module(library(simplex)).
constraint(+Constraint, +S0, -S)
Adds a linear or integrality constraint to the linear program corresponding to state S0. A linear constraint is of the form Left Op C, where Left is a list of Coefficient*Variable terms (variables in the context of linear programs can be atoms or compound terms) and C is a non-negative numeric constant. The list represents the sum of its elements. Op can be =, =< or >=. The coefficient 1 can be omitted. An integrality constraint is of the form integral(Variable) and constrains Variable to an integral value.
ClioPatria (version V3.1.1-51-ga0b30a5)