This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/mosel/test.mos
Oleh Prypin 6f43092173
Also add auto-updatable output-based tests to examplefiles (#1689)
Co-authored-by: Georg Brandl <georg@python.org>
2021-01-20 10:48:45 +01:00

34 lines
844 B
Text

(!*******************************************************
Multiline comment
*******************************************************!)
model 'pygments test'
uses "mmxprs"
forward public procedure main ! Test forward declaration
public procedure main
declarations
MySet = {1, 2}
I: range
Coefficients: array(I) of real
Vars: array(I) of mpvar
end-declarations
Coefficients :: [2.2, -3.3, 4.4, 5.5, 1.1, -3.3, 7.7]
! Single line comment
forall (i in I) Vars(i) is_binary
! Constraint
sum (i in I) Vars(i) <= 3
maximize(sum(i in I) Coefficients(i) * Vars(i))
forall (i in I| Vars(i).sol <> 0) do
writeln("Vars(", i,") = ", Vars(i).sol)
end-do
end-procedure
main
end-model