diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000000000000000000000000000000000000..3f79d095e36ff1efe1d802003b469af63595ca00
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+Example.py
\ No newline at end of file
diff --git a/.idea/pythonProject.iml b/.idea/Example.iml
similarity index 100%
rename from .idea/pythonProject.iml
rename to .idea/Example.iml
diff --git a/.idea/modules.xml b/.idea/modules.xml
index e15ec35fe054f3b2c7c21e3dcca866d6a79ca0ba..545a37658e35bd79e2e19d7d70e26889fdd7037b 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/pythonProject.iml" filepath="$PROJECT_DIR$/.idea/pythonProject.iml" />
+      <module fileurl="file://$PROJECT_DIR$/.idea/Example.iml" filepath="$PROJECT_DIR$/.idea/Example.iml" />
     </modules>
   </component>
 </project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7f4cb416c083d265558da75d457237d671..35eb1ddfbbc029bcab630581847471d7f238ec53 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+    <mapping directory="" vcs="Git" />
   </component>
 </project>
\ No newline at end of file
diff --git a/Example.py b/Example.py
new file mode 100644
index 0000000000000000000000000000000000000000..c2b02ead65e64c930eb6abb97d00a935b956965c
--- /dev/null
+++ b/Example.py
@@ -0,0 +1,35 @@
+#导入包
+#pyomo environment
+from pyomo.environ import *
+#pyomo optimization
+from pyomo.opt import SolverFactory
+
+#实例化一个具体model,一般的最优化问题用到的都是concrete model,而不是abstract model。
+#create a model 实例化类
+model = ConcreteModel()
+
+#declare decision variables 宣布决策变量
+#domain 域
+model.x = Var(domain = NonNegativeReals)
+model.y = Var(domain = NonNegativeReals)
+
+#对于没有index的版本,直接列公式即可。
+#expr是objective function的公式,sense是我们要最大化还是最小化
+model.obj = Objective(expr=3 * model.x + 4 * model.y, sense=minimize)
+
+#declare constraint 宣布约束条件
+model.con1 = Constraint(expr=2 * model.x + model.y >= 15)
+
+model.con2 = Constraint(expr=model.x + 2 * model.y >= 17)
+
+model.con3 = Constraint(expr=model.x + model.y >= 10)
+
+#SolverFactory通过使用给出的求解器名称的参数用来创建执行优化的对象。
+result = SolverFactory("gurobi").solve(model)
+
+#pprint():Data pretty printer。模块提供了美化打印任意python数据类型的功能,让显示结果显得更加漂亮"
+#print()输出结果都在一行,不方便查看,而pprint采用了分行打印输出
+model.pprint()
+
+#solve函数将结果加载到model中,因此以下一行写出更新后的值。
+model.display()
diff --git a/main.py b/main.py
deleted file mode 100644
index 8141457b2e919129d812ffd41d93a05c47e4862e..0000000000000000000000000000000000000000
--- a/main.py
+++ /dev/null
@@ -1,29 +0,0 @@
-<<<<<<< HEAD
-from pyomo.environ import *
-from pyomo.opt import SolverFactory
-
-model = ConcreteModel()
-
-model.x = Var(domain = NonNegativeReals)
-model.y = Var(domain = NonNegativeReals)
-
-model.obj = Objective(expr=3 * model.x + 4 * model.y, sense=minimize)
-
-model.con1 = Constraint(expr=2 * model.x + model.y >= 15)
-
-model.con2 = Constraint(expr=model.x + 2 * model.y >= 17)
-
-model.con3 = Constraint(expr=model.x + model.y >= 10)
-
-result = SolverFactory("glpk").solve(model)
-
-model.pprint()
-
-model.display()
-=======
-l = ['a', 'x', 'b', 'x', 'c', 'x']
-print(l)
-l.pop(2) # remove the first item with value 'x'
-print(l)
-
->>>>>>> origin/main