# **********************************************************************************
# * Copyright (c) 2019 Process Systems Engineering (AVT.SVT), RWTH Aachen University
# *
# * This program and the accompanying materials are made available under the
# * terms of the Eclipse Public License 2.0 which is available at
# * http://www.eclipse.org/legal/epl-2.0.
# *
# * SPDX-License-Identifier: EPL-2.0
# *
# * @file problem.txt
# *
# * @brief File containing an exemplary optimization problem in ALE syntax
# *
# **********************************************************************************

definitions:
# Variables
binary x;
real y in [-2,2];

# Initialize parameters
real a  := 20;
real p1 := 0.2;
real p2 := 3.14159265358979323846; # ~ PI

# Reduced-space variables
real temp1 := -p1 * sqrt( (x^2 + y^2) / 2 ); # This is neither an optimization variable nor an equality constraint
real temp2 := (cos(p2*x) + cos(p2*y)) / 2;   # This is neither an optimization variable nor an equality constraint

# Initial point
x.init <- 0;
y.init <- 1;

constraints:
# Inequality constraints
x <= 1 "x <= 1";

# Equality constraints
pow(x,2) + sqr(y) = 1 "circle equality";

relaxation only constraints:
# Relaxation-only inequality
#y - 1 <= 0 "y <= 1";

# Relaxation-only equality
#y + x = 1 "y + x = 1";

outputs:
# Additional output
temp1 "Result of temp1";

objective: # Always minimizing
# Objective given as the Ackley function
-a * exp(temp1) - exp(temp2) + a + exp(1);