--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Dear Bob,
Thank you for your help.
Now I am having a problem with sets.
Lets say I have a set
# the set of admissible flight levels for each type of airplane in (*10^3 Feet)
set Z{TYPE} ordered;
in data file
# the set of admissible flight levels for each type of airplane in (*10^3 Feet)
set Z[type1] := 30 35 40;
set Z[type2] := 25 30 35;
set Z[type3] := 20 25 30;
set Z[type4] := 15 20 25;
the set of airplanes
set AIRPLANES;
and the parameter
# The type of each airplane
param ktype {AIRPLANES} symbolic in TYPE;
and I have plane1 and plane2 and I want to define their intersections in flight levels Z to be not empty.
So I write
Subject to Constraint {plane1 in AIRPLANES, plane2 in AIRPLANES, z in Z[ktype[plane1]] inter Z[ktype[plane2]]:
plane1 <> plane2 and Z[ktype[plane1]] inter Z[ktype[plane2]] <> {}}:
….then I write the expression of constraint.
But I get a syntax error.
Could you please let me know the problem. I have realized that the problem must be in this expression <> {}
However in your book you say that the empty set is symbolized as {}.
Thank you in advance,
Best,
Charis
Από: Robert Fourer
Αποστολή: Τετάρτη, 20 Απριλίου 2016 5:15 μμ
Προς: am...@googlegroups.com
Θέμα: RE: [AMPL 11852] How to define a parameter x(t)=an element from a set
--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/bq-cun75dxs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.