-
Notifications
You must be signed in to change notification settings - Fork 3
STMTS
Filipe Brandão edited this page May 20, 2016
·
16 revisions
There are three types of statements:
${python code}$
-
EVAL:
${python expression}$
$CMD{python parameters or code};
$CMD[AMPL parameters]{python arguments or code};
-
SET:
$SET[set_name]{values};
-
PARAM:
$PARAM[param_name]{values, i0=0};
-
VAR:
$VAR[var_name]{typ="", lb=None, ub=None, index_set=None};
-
CON:
$CON[constraint_name]{left, sign, right};
Additional statements:
- Statements for VPSolver:
-
VBP_FLOW:
$VBP_FLOW[zvar]{W, w, b, bounds=None, binary=False};
-
VBP_GRAPH:
$VBP_GRAPH[V_name, A_name]{W, w, labels, bounds=None, binary=False, S="S", T="T", LOSS="LOSS"};
-
MVP_FLOW:
$MVP_FLOW[zvars]{Ws, ws, b, bounds=None, binary=False, i0=0};
-
MVP_GRAPH:
$MVP_GRAPH[V_name, A_name]{Ws, ws, labels, bounds=None, binary=False, S="S", Ts=None, LOSS="LOSS"};
- Statements for special ordered sets and piecewise linear functions:
- Statements for TSP:
-
ATSP_MTZ:
$ATSP_MTZ{xvars, DL=False, cuts=False};
-
ATSP_SCF:
$ATSP_SCF{xvars, cuts=False};
-
ATSP_MCF:
$ATSP_SCF{xvars, cuts=False};
- Statements for Lot-sizing (LS-LIB, implemented in collaboration with Laurence Wolsey):
-
Wagner-Whitin models:
$WW_*{...};
-
Lot-sizing models:
$LS_*{...};
-
Discrete lot-sizing models:
$DLSI_*{...};
and$DLS_*{...};
Note: The values between []
are usually used to name new AMPL variables, constraints, sets, or parameters. Names starting with a ^
indicate that the corresponding AMPL element should not be defined by the command. This prefix is useful when the corresponding AMPL element has already been declared before and we do not want to declared it again.
Copyright © 2015-2016 Filipe Brandão < [email protected] >. All rights reserved.